Files
cinder/cinder/api/v3/snapshot_manage.py
T
Gorka Eguileor 0d2dceddd0 Add more operations to cluster
This patch adds cluster support to these methods:
 - update_consistencygroup
 - update_group
 - create_cgsnapshot
 - create_group_snapshot
 - create_snapshot
 - copy_volume_to_image
 - accept_transfer
 - get_backup_device
 - secure_file_operations_enabled
 - get_manageable_volumes
 - get_manageable_snapshots

APIImpact: Now listings of manageable volumes and snapshots accept
           cluster parameter.
Specs: https://review.openstack.org/327283
Implements: blueprint cinder-volume-active-active-support
Change-Id: I5d25fd2e442c0cc077149bec6a58f5a5380365be
2016-12-20 19:20:52 +01:00

34 lines
1.3 KiB
Python

# Copyright (c) 2016 Stratoscale, Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from cinder.api.contrib import snapshot_manage as snapshot_manage_v2
from cinder.api.openstack import wsgi
from cinder.api.v3 import resource_common_manage as common
class SnapshotManageController(common.ManageResource,
snapshot_manage_v2.SnapshotManageController):
def __init__(self, *args, **kwargs):
super(SnapshotManageController, self).__init__(*args, **kwargs)
self._set_resource_type('snapshot')
@wsgi.response(202)
def create(self, req, body):
self._ensure_min_version(req, "3.8")
return super(SnapshotManageController, self).create(req, body)
def create_resource():
return wsgi.Resource(SnapshotManageController())