volumes = db.volume_get_active_by_window(admin_context,
begin,
end)
- LOG.debug("Found %d volumes"), len(volumes)
+ LOG.debug("Found %d volumes", len(volumes))
for volume_ref in volumes:
try:
LOG.debug("Send exists notification for <volume_id: "
snapshots = db.snapshot_get_active_by_window(admin_context,
begin,
end)
- LOG.debug("Found %d snapshots"), len(snapshots)
+ LOG.debug("Found %d snapshots", len(snapshots))
for snapshot_ref in snapshots:
try:
LOG.debug("Send notification for <snapshot_id: %(snapshot_id)s> "
consistencygroup_id = utils.create_consistencygroup(self.context)['id']
utils.create_volume(
self.context,
- consistencygroup_id=consistencygroup_id)['id']
+ consistencygroup_id=consistencygroup_id)
body = {"cgsnapshot": {"name": "cg1",
"description":
consistencygroup_id = utils.create_consistencygroup(self.context)['id']
utils.create_volume(
self.context,
- consistencygroup_id=consistencygroup_id)['id']
+ consistencygroup_id=consistencygroup_id)
body = {"cgsnapshot": {"name": "cg1",
"description":
consistencygroup_id = utils.create_consistencygroup(self.context)['id']
utils.create_volume(
self.context,
- consistencygroup_id=consistencygroup_id)['id']
+ consistencygroup_id=consistencygroup_id)
body = {"cgsnapshot": {"name": "cg1",
"description":
properties = {'owner_id': 'proj1'}
fixture['properties'] = properties
- self.service.create(self.context, fixture)['id']
+ self.service.create(self.context, fixture)
proj = self.context.project_id
self.context.project_id = 'proj1'
backup['parent_id'] = None
backup['size'] = 5 * 1024 * 1024
backup['object_count'] = 22
- db.backup_create(self.context, backup)['id']
+ db.backup_create(self.context, backup)
lvm_driver.check_for_setup_error()
raise exception.ManageExistingInvalidReference(
existing_ref=existing_ref, reason=reason)
lun_info = {}
- lun_info.setdefault('path', path) if path else None
+ lun_info.setdefault('path', path if path else None)
if hasattr(self, 'vserver') and uuid:
lun_info['uuid'] = uuid
luns = self.zapi_client.get_lun_by_args(**lun_info)
"""Creates host on array."""
path = "/storage-systems/{system-id}/hosts"
data = {'name': label, 'hostType': host_type}
- data.setdefault('groupId', group_id) if group_id else None
- data.setdefault('ports', ports) if ports else None
+ data.setdefault('groupId', group_id if group_id else None)
+ data.setdefault('ports', ports if ports else None)
return self._invoke('POST', path, data)
def create_host_with_port(self, label, host_type, port_id,
"""Registers storage system with web service."""
path = "/storage-systems"
data = {'controllerAddresses': controller_addresses}
- data.setdefault('wwn', wwn) if wwn else None
- data.setdefault('password', password) if password else None
+ data.setdefault('wwn', wwn if wwn else None)
+ data.setdefault('password', password if password else None)
return self._invoke('POST', path, data, use_system=False)
def update_stored_system_password(self, password):
snapshot still depends on the parent.
"""
try:
- snap and volume.set_snap(snap)
+ if snap:
+ volume.set_snap(snap)
pool, parent, parent_snap = tuple(volume.parent_info())
- snap and volume.set_snap(None)
+ if snap:
+ volume.set_snap(None)
# Strip the tag off the end of the volume name since it will not be
# in the snap name.
if volume_name.endswith('.deleted'):