summaryrefslogtreecommitdiff
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py4
-rw-r--r--nova/api/metadata/base.py4
-rw-r--r--nova/api/openstack/compute/contrib/extended_volumes.py4
-rw-r--r--nova/api/openstack/compute/contrib/volumes.py10
-rw-r--r--nova/api/openstack/compute/plugins/v3/extended_volumes.py8
-rw-r--r--nova/api/openstack/compute/plugins/v3/servers.py4
-rw-r--r--nova/api/openstack/compute/servers.py4
7 files changed, 19 insertions, 19 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 82c765fb51..b159668481 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -41,8 +41,8 @@ from nova import exception
from nova.image import s3
from nova import network
from nova.network.security_group import neutron_driver
+from nova import objects
from nova.objects import base as obj_base
-from nova.objects import block_device as block_device_obj
from nova.objects import ec2 as ec2_obj
from nova.objects import flavor as flavor_obj
from nova.objects import instance as instance_obj
@@ -1058,7 +1058,7 @@ class CloudController(object):
"""Format InstanceBlockDeviceMappingResponseItemType."""
root_device_type = 'instance-store'
mapping = []
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance_uuid)
for bdm in bdms:
volume_id = bdm.volume_id
diff --git a/nova/api/metadata/base.py b/nova/api/metadata/base.py
index 020314b31e..bf848e9539 100644
--- a/nova/api/metadata/base.py
+++ b/nova/api/metadata/base.py
@@ -30,8 +30,8 @@ from nova.compute import flavors
from nova import conductor
from nova import context
from nova import network
+from nova import objects
from nova.objects import base as obj_base
-from nova.objects import block_device as block_device_obj
from nova.objects import instance as instance_obj
from nova.objects import security_group as secgroup_obj
from nova.openstack.common import importutils
@@ -524,7 +524,7 @@ def get_metadata_by_instance_id(conductor_api, instance_id, address,
def _format_instance_mapping(ctxt, instance):
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
ctxt, instance.uuid)
return block_device.instance_block_mapping(instance, bdms)
diff --git a/nova/api/openstack/compute/contrib/extended_volumes.py b/nova/api/openstack/compute/contrib/extended_volumes.py
index 645c3f836b..f4af2f3d63 100644
--- a/nova/api/openstack/compute/contrib/extended_volumes.py
+++ b/nova/api/openstack/compute/contrib/extended_volumes.py
@@ -18,7 +18,7 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import compute
-from nova.objects import block_device as block_device_obj
+from nova import objects
authorize = extensions.soft_extension_authorizer('compute', 'extended_volumes')
@@ -29,7 +29,7 @@ class ExtendedVolumesController(wsgi.Controller):
self.compute_api = compute.API()
def _extend_server(self, context, server, instance):
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance['uuid'])
volume_ids = [bdm.volume_id for bdm in bdms if bdm.volume_id]
key = "%s:volumes_attached" % Extended_volumes.alias
diff --git a/nova/api/openstack/compute/contrib/volumes.py b/nova/api/openstack/compute/contrib/volumes.py
index 9597f0ba2e..8a613c8bcc 100644
--- a/nova/api/openstack/compute/contrib/volumes.py
+++ b/nova/api/openstack/compute/contrib/volumes.py
@@ -24,7 +24,7 @@ from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
from nova import compute
from nova import exception
-from nova.objects import block_device as block_device_obj
+from nova import objects
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.openstack.common import strutils
@@ -355,7 +355,7 @@ class VolumeAttachmentController(wsgi.Controller):
except exception.NotFound as e:
raise exc.HTTPNotFound(explanation=e.format_message())
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance['uuid'])
if not bdms:
@@ -468,7 +468,7 @@ class VolumeAttachmentController(wsgi.Controller):
except exception.NotFound as e:
raise exc.HTTPNotFound(explanation=e.format_message())
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance.uuid)
found = False
try:
@@ -513,7 +513,7 @@ class VolumeAttachmentController(wsgi.Controller):
volume = self.volume_api.get(context, volume_id)
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance['uuid'])
if not bdms:
msg = _("Instance %s is not attached.") % server_id
@@ -557,7 +557,7 @@ class VolumeAttachmentController(wsgi.Controller):
except exception.NotFound as e:
raise exc.HTTPNotFound(explanation=e.format_message())
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance['uuid'])
limited_list = common.limited(bdms, req)
results = []
diff --git a/nova/api/openstack/compute/plugins/v3/extended_volumes.py b/nova/api/openstack/compute/plugins/v3/extended_volumes.py
index 29eeb954c1..6d5eb48630 100644
--- a/nova/api/openstack/compute/plugins/v3/extended_volumes.py
+++ b/nova/api/openstack/compute/plugins/v3/extended_volumes.py
@@ -23,7 +23,7 @@ from nova.api.openstack import wsgi
from nova.api import validation
from nova import compute
from nova import exception
-from nova.objects import block_device as block_device_obj
+from nova import objects
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova import volume
@@ -46,7 +46,7 @@ class ExtendedVolumesController(wsgi.Controller):
self.volume_api = volume.API()
def _extend_server(self, context, server, instance):
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance['uuid'])
volume_ids = [bdm['volume_id'] for bdm in bdms if bdm['volume_id']]
key = "%s:volumes_attached" % ExtendedVolumes.alias
@@ -70,7 +70,7 @@ class ExtendedVolumesController(wsgi.Controller):
instance = common.get_instance(self.compute_api, context, id,
want_objects=True)
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance.uuid)
found = False
try:
@@ -185,7 +185,7 @@ class ExtendedVolumesController(wsgi.Controller):
except exception.VolumeNotFound as e:
raise exc.HTTPNotFound(explanation=e.format_message())
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance.uuid)
if not bdms:
msg = _("Volume %(volume_id)s is not attached to the "
diff --git a/nova/api/openstack/compute/plugins/v3/servers.py b/nova/api/openstack/compute/plugins/v3/servers.py
index d5ee560764..e1ccd37c55 100644
--- a/nova/api/openstack/compute/plugins/v3/servers.py
+++ b/nova/api/openstack/compute/plugins/v3/servers.py
@@ -32,7 +32,7 @@ from nova import compute
from nova.compute import flavors
from nova import exception
from nova.image import glance
-from nova.objects import block_device as block_device_obj
+from nova import objects
from nova.objects import instance as instance_obj
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
@@ -895,7 +895,7 @@ class ServersController(wsgi.Controller):
instance = self._get_server(context, req, id)
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance.uuid)
try:
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 216fb15f61..a1da4ccb25 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -33,7 +33,7 @@ from nova import block_device
from nova import compute
from nova.compute import flavors
from nova import exception
-from nova.objects import block_device as block_device_obj
+from nova import objects
from nova.objects import instance as instance_obj
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
@@ -1435,7 +1435,7 @@ class Controller(wsgi.Controller):
instance = self._get_server(context, req, id)
- bdms = block_device_obj.BlockDeviceMappingList.get_by_instance_uuid(
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
context, instance.uuid)
try: