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
This commit is contained in:
@@ -30,6 +30,7 @@ import six
|
||||
from cinder.db import base
|
||||
from cinder import exception
|
||||
from cinder.i18n import _, _LE, _LI
|
||||
from cinder import objects
|
||||
from cinder import quota
|
||||
from cinder import quota_utils
|
||||
from cinder.volume import api as volume_api
|
||||
@@ -162,7 +163,7 @@ class API(base.Base):
|
||||
raise exception.InvalidAuthKey(reason=msg)
|
||||
|
||||
volume_id = transfer['volume_id']
|
||||
vol_ref = self.db.volume_get(context.elevated(), volume_id)
|
||||
vol_ref = objects.Volume.get_by_id(context.elevated(), volume_id)
|
||||
if vol_ref['consistencygroup_id']:
|
||||
msg = _("Volume %s must not be part of a consistency "
|
||||
"group.") % vol_ref['id']
|
||||
|
||||
Reference in New Issue
Block a user