except exception.ServiceNotFound as error:
raise exc.HTTPInternalServerError(explanation=error.msg)
- retval = self._view_builder.summary(req, dict(new_backup.iteritems()))
+ retval = self._view_builder.summary(req, dict(new_backup))
return retval
@wsgi.response(202)
explanation=error.msg, headers={'Retry-After': 0})
retval = self._view_builder.restore_summary(
- req, dict(new_restore.iteritems()))
+ req, dict(new_restore))
return retval
@wsgi.response(200)
raise exc.HTTPBadRequest(explanation=error.msg)
retval = self._view_builder.export_summary(
- req, dict(backup_info.iteritems()))
+ req, dict(backup_info))
LOG.debug('export record output: %s.', retval)
return retval
except exception.ServiceNotFound as error:
raise exc.HTTPInternalServerError(explanation=error.msg)
- retval = self._view_builder.summary(req, dict(new_backup.iteritems()))
+ retval = self._view_builder.summary(req, dict(new_backup))
LOG.debug('import record output: %s.', retval)
return retval
retval = self._view_builder.summary(
req,
- dict(new_cgsnapshot.iteritems()))
+ dict(new_cgsnapshot))
return retval
retval = self._view_builder.summary(
req,
- dict(new_consistencygroup.iteritems()))
+ dict(new_consistencygroup))
return retval
@wsgi.response(202)
retval = self._view_builder.summary(
req,
- dict(new_consistencygroup.iteritems()))
+ dict(new_consistencygroup))
return retval
@wsgi.serializers(xml=ConsistencyGroupTemplate)
except Exception:
return
if image_meta:
- resp_volume['volume_image_metadata'] = dict(
- image_meta.iteritems())
+ resp_volume['volume_image_metadata'] = dict(image_meta)
@wsgi.extends
def show(self, req, resp_obj, id):
msg = _("Service not found.")
raise exc.HTTPNotFound(explanation=msg)
- new_volume = dict(new_volume.iteritems())
+ new_volume = dict(new_volume)
utils.add_visible_admin_metadata(new_volume)
return self._view_builder.detail(req, new_volume)
raise exc.HTTPNotFound(explanation=error.msg)
transfer = self._view_builder.create(req,
- dict(new_transfer.iteritems()))
+ dict(new_transfer))
return transfer
@wsgi.response(202)
transfer = \
self._view_builder.summary(req,
- dict(accepted_transfer.iteritems()))
+ dict(accepted_transfer))
return transfer
def delete(self, req, id):
filters=search_opts,
viewable_admin_meta=True)
- volumes = [dict(vol.iteritems()) for vol in volumes]
+ volumes = [dict(vol) for vol in volumes]
for volume in volumes:
utils.add_visible_admin_metadata(volume)
# TODO(vish): Instance should be None at db layer instead of
# trying to lazy load, but for now we turn it into
# a dict to avoid an error.
- new_volume = dict(new_volume.iteritems())
+ new_volume = dict(new_volume)
retval = _translate_volume_detail_view(context, new_volume, image_uuid)
filters=filters,
viewable_admin_meta=True)
- volumes = [dict(vol.iteritems()) for vol in volumes]
+ volumes = [dict(vol) for vol in volumes]
for volume in volumes:
utils.add_visible_admin_metadata(volume)
# TODO(vish): Instance should be None at db layer instead of
# trying to lazy load, but for now we turn it into
# a dict to avoid an error.
- new_volume = dict(new_volume.iteritems())
+ new_volume = dict(new_volume)
retval = self._view_builder.detail(req, new_volume)
return retval
def get(self, context, backup_id):
check_policy(context, 'get')
rv = self.db.backup_get(context, backup_id)
- return dict(rv.iteritems())
+ return dict(rv)
def delete(self, context, backup_id):
"""Make the RPC call to delete a volume backup."""
def get(self, context, group_id):
rv = self.db.consistencygroup_get(context, group_id)
- group = dict(rv.iteritems())
+ group = dict(rv)
check_policy(context, 'get', group)
return group
def get_cgsnapshot(self, context, cgsnapshot_id):
check_policy(context, 'get_cgsnapshot')
rv = self.db.cgsnapshot_get(context, cgsnapshot_id)
- return dict(rv.iteritems())
+ return dict(rv)
def get_all_cgsnapshots(self, context, search_opts=None):
check_policy(context, 'get_all_cgsnapshots')
if _FACADE is None:
_FACADE = db_session.EngineFacade(
CONF.database.connection,
- **dict(CONF.database.iteritems())
+ **dict(CONF.database)
)
if CONF.profiler.profiler_enabled:
host_state = self.host_state_cls(host,
capabilities=capabilities,
service=
- dict(service.iteritems()))
+ dict(service))
self.host_state_map[host] = host_state
# update capabilities and attributes in host_state
host_state.update_from_volume_capability(capabilities,
service=
- dict(service.iteritems()))
+ dict(service))
active_hosts.add(host)
self._no_capabilities_hosts = no_capabilities_hosts
snapshot_obj = objects.Snapshot.get_by_id(self.context, snapshot_id)
snap = db.snapshot_get(context.get_admin_context(), snapshot_id)
- result_dict = dict(snap.iteritems())
+ result_dict = dict(snap)
result_meta = {
result_dict['snapshot_metadata'][0].key:
result_dict['snapshot_metadata'][0].value}
def get(self, context, transfer_id):
rv = self.db.transfer_get(context, transfer_id)
- return dict(rv.iteritems())
+ return dict(rv)
def delete(self, context, transfer_id):
"""Make the RPC call to delete a volume transfer."""
else:
ctxt = context
rv = self.db.volume_get(ctxt, volume_id)
- volume = dict(rv.iteritems())
+ volume = dict(rv)
try:
check_policy(context, 'get', volume)
except exception.PolicyNotAuthorized:
check_policy(context, 'get_volume')
vref = self.db.volume_get(context, volume_id)
LOG.info(_LI("Volume retrieved successfully."), resource=vref)
- return dict(vref.iteritems())
+ return dict(vref)
def get_all_snapshots(self, context, search_opts=None):
check_policy(context, 'get_all_snapshots')
rv = self.db.volume_metadata_get(context, volume['id'])
LOG.info(_LI("Get volume metadata completed successfully."),
resource=volume)
- return dict(rv.iteritems())
+ return dict(rv)
@wrap_check_policy
def delete_volume_metadata(self, context, volume, key):
rv = self.db.volume_admin_metadata_get(context, volume['id'])
LOG.info(_LI("Get volume admin metadata completed successfully."),
resource=volume)
- return dict(rv.iteritems())
+ return dict(rv)
@wrap_check_policy
def delete_volume_admin_metadata(self, context, volume, key):