diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py index fbd33f6dbdc2..e7222abb7de8 100644 --- a/nova/api/openstack/__init__.py +++ b/nova/api/openstack/__init__.py @@ -319,7 +319,7 @@ class APIRouterV21(base_wsgi.Router): def _check_load_extension(ext): if (self.init_only is None or ext.obj.alias in self.init_only) and isinstance(ext.obj, - extensions.V3APIExtensionBase): + extensions.V21APIExtensionBase): # Check whitelist is either empty or if not then the extension # is in the whitelist diff --git a/nova/api/openstack/compute/access_ips.py b/nova/api/openstack/compute/access_ips.py index b75f73517562..bb2c9c1fa441 100644 --- a/nova/api/openstack/compute/access_ips.py +++ b/nova/api/openstack/compute/access_ips.py @@ -60,7 +60,7 @@ class AccessIPsController(wsgi.Controller): self._extend_server(req, server) -class AccessIPs(extensions.V3APIExtensionBase): +class AccessIPs(extensions.V21APIExtensionBase): """Access IPs support.""" name = "AccessIPs" diff --git a/nova/api/openstack/compute/admin_actions.py b/nova/api/openstack/compute/admin_actions.py index 6e011e20960f..dd542e02886f 100644 --- a/nova/api/openstack/compute/admin_actions.py +++ b/nova/api/openstack/compute/admin_actions.py @@ -82,7 +82,7 @@ class AdminActionsController(wsgi.Controller): instance.save(admin_state_reset=True) -class AdminActions(extensions.V3APIExtensionBase): +class AdminActions(extensions.V21APIExtensionBase): """Enable admin-only server actions Actions include: resetNetwork, injectNetworkInfo, os-resetState diff --git a/nova/api/openstack/compute/admin_password.py b/nova/api/openstack/compute/admin_password.py index 576988464a0d..c5d11317f75d 100644 --- a/nova/api/openstack/compute/admin_password.py +++ b/nova/api/openstack/compute/admin_password.py @@ -59,7 +59,7 @@ class AdminPasswordController(wsgi.Controller): common.raise_feature_not_supported(msg=msg) -class AdminPassword(extensions.V3APIExtensionBase): +class AdminPassword(extensions.V21APIExtensionBase): """Admin password management support.""" name = "AdminPassword" diff --git a/nova/api/openstack/compute/agents.py b/nova/api/openstack/compute/agents.py index 718c7bd173ab..d6247ddfb4de 100644 --- a/nova/api/openstack/compute/agents.py +++ b/nova/api/openstack/compute/agents.py @@ -157,7 +157,7 @@ class AgentController(wsgi.Controller): return {'agent': agent} -class Agents(extensions.V3APIExtensionBase): +class Agents(extensions.V21APIExtensionBase): """Agents support.""" name = "Agents" @@ -170,7 +170,7 @@ class Agents(extensions.V3APIExtensionBase): return resource def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/aggregates.py b/nova/api/openstack/compute/aggregates.py index 5440dcdddf2d..8ee13c2a632e 100644 --- a/nova/api/openstack/compute/aggregates.py +++ b/nova/api/openstack/compute/aggregates.py @@ -200,7 +200,7 @@ class AggregateController(wsgi.Controller): return {"aggregate": _aggregate} -class Aggregates(extensions.V3APIExtensionBase): +class Aggregates(extensions.V21APIExtensionBase): """Admin-only aggregate administration.""" name = "Aggregates" diff --git a/nova/api/openstack/compute/assisted_volume_snapshots.py b/nova/api/openstack/compute/assisted_volume_snapshots.py index 99e4921fa468..dcf08705d87c 100644 --- a/nova/api/openstack/compute/assisted_volume_snapshots.py +++ b/nova/api/openstack/compute/assisted_volume_snapshots.py @@ -90,7 +90,7 @@ class AssistedVolumeSnapshotsController(wsgi.Controller): return exc.HTTPNotFound(explanation=e.format_message()) -class AssistedVolumeSnapshots(extensions.V3APIExtensionBase): +class AssistedVolumeSnapshots(extensions.V21APIExtensionBase): """Assisted volume snapshots.""" name = "AssistedVolumeSnapshots" @@ -103,7 +103,7 @@ class AssistedVolumeSnapshots(extensions.V3APIExtensionBase): return res def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/attach_interfaces.py b/nova/api/openstack/compute/attach_interfaces.py index 4b917514664c..f569df47eed1 100644 --- a/nova/api/openstack/compute/attach_interfaces.py +++ b/nova/api/openstack/compute/attach_interfaces.py @@ -181,7 +181,7 @@ class InterfaceAttachmentController(wsgi.Controller): return {'interfaceAttachments': results} -class AttachInterfaces(extensions.V3APIExtensionBase): +class AttachInterfaces(extensions.V21APIExtensionBase): """Attach interface support.""" name = "AttachInterfaces" @@ -197,7 +197,7 @@ class AttachInterfaces(extensions.V3APIExtensionBase): return res def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/availability_zone.py b/nova/api/openstack/compute/availability_zone.py index 7e405b63846c..4638ffdd3605 100644 --- a/nova/api/openstack/compute/availability_zone.py +++ b/nova/api/openstack/compute/availability_zone.py @@ -115,7 +115,7 @@ class AvailabilityZoneController(wsgi.Controller): return self._describe_availability_zones_verbose(context) -class AvailabilityZone(extensions.V3APIExtensionBase): +class AvailabilityZone(extensions.V21APIExtensionBase): """1. Add availability_zone to the Create Server API. 2. Add availability zones describing. """ @@ -131,7 +131,7 @@ class AvailabilityZone(extensions.V3APIExtensionBase): return resource def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/baremetal_nodes.py b/nova/api/openstack/compute/baremetal_nodes.py index 9ea5b864d1ed..f8ea93d0fa8d 100644 --- a/nova/api/openstack/compute/baremetal_nodes.py +++ b/nova/api/openstack/compute/baremetal_nodes.py @@ -160,7 +160,7 @@ class BareMetalNodeController(wsgi.Controller): _no_ironic_proxy("port-delete") -class BareMetalNodes(extensions.V3APIExtensionBase): +class BareMetalNodes(extensions.V21APIExtensionBase): """Admin-only bare-metal node administration.""" name = "BareMetalNodes" @@ -174,7 +174,7 @@ class BareMetalNodes(extensions.V3APIExtensionBase): return resource def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/block_device_mapping.py b/nova/api/openstack/compute/block_device_mapping.py index 7b9038f9b769..1c209ab98d6d 100644 --- a/nova/api/openstack/compute/block_device_mapping.py +++ b/nova/api/openstack/compute/block_device_mapping.py @@ -29,7 +29,7 @@ ATTRIBUTE_NAME = "block_device_mapping_v2" LEGACY_ATTRIBUTE_NAME = "block_device_mapping" -class BlockDeviceMapping(extensions.V3APIExtensionBase): +class BlockDeviceMapping(extensions.V21APIExtensionBase): """Block device mapping boot support.""" name = "BlockDeviceMapping" diff --git a/nova/api/openstack/compute/block_device_mapping_v1.py b/nova/api/openstack/compute/block_device_mapping_v1.py index 308b0c2bc036..ad8537f3e6c2 100644 --- a/nova/api/openstack/compute/block_device_mapping_v1.py +++ b/nova/api/openstack/compute/block_device_mapping_v1.py @@ -28,7 +28,7 @@ ATTRIBUTE_NAME = "block_device_mapping" ATTRIBUTE_NAME_V2 = "block_device_mapping_v2" -class BlockDeviceMappingV1(extensions.V3APIExtensionBase): +class BlockDeviceMappingV1(extensions.V21APIExtensionBase): """Block device mapping boot support.""" name = "BlockDeviceMappingV1" diff --git a/nova/api/openstack/compute/cells.py b/nova/api/openstack/compute/cells.py index b09b9809f3d2..5b9d1e430826 100644 --- a/nova/api/openstack/compute/cells.py +++ b/nova/api/openstack/compute/cells.py @@ -303,7 +303,7 @@ class CellsController(wsgi.Controller): updated_since=updated_since, deleted=deleted) -class Cells(extensions.V3APIExtensionBase): +class Cells(extensions.V21APIExtensionBase): """Enables cells-related functionality such as adding neighbor cells, listing neighbor cells, and getting the capabilities of the local cell. """ diff --git a/nova/api/openstack/compute/certificates.py b/nova/api/openstack/compute/certificates.py index 6cea0756a54c..00d285d394b1 100644 --- a/nova/api/openstack/compute/certificates.py +++ b/nova/api/openstack/compute/certificates.py @@ -72,7 +72,7 @@ class CertificatesController(wsgi.Controller): return {'certificate': _translate_certificate_view(cert, pk)} -class Certificates(extensions.V3APIExtensionBase): +class Certificates(extensions.V21APIExtensionBase): """Certificates support.""" name = "Certificates" diff --git a/nova/api/openstack/compute/cloudpipe.py b/nova/api/openstack/compute/cloudpipe.py index e465d5f4b7c5..643d802dcc91 100644 --- a/nova/api/openstack/compute/cloudpipe.py +++ b/nova/api/openstack/compute/cloudpipe.py @@ -170,7 +170,7 @@ class CloudpipeController(wsgi.Controller): nw.save() -class Cloudpipe(extensions.V3APIExtensionBase): +class Cloudpipe(extensions.V21APIExtensionBase): """Adds actions to create cloudpipe instances. When running with the Vlan network mode, you need a mechanism to route @@ -191,7 +191,7 @@ class Cloudpipe(extensions.V3APIExtensionBase): return resource def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/config_drive.py b/nova/api/openstack/compute/config_drive.py index 23bd1e0ea9ae..a1cd87e820f5 100644 --- a/nova/api/openstack/compute/config_drive.py +++ b/nova/api/openstack/compute/config_drive.py @@ -53,7 +53,7 @@ class ConfigDriveController(wsgi.Controller): self._add_config_drive(req, servers) -class ConfigDrive(extensions.V3APIExtensionBase): +class ConfigDrive(extensions.V21APIExtensionBase): """Config Drive Extension.""" name = "ConfigDrive" diff --git a/nova/api/openstack/compute/console_auth_tokens.py b/nova/api/openstack/compute/console_auth_tokens.py index 9b7e37bd0e4a..f7e4b514bb16 100644 --- a/nova/api/openstack/compute/console_auth_tokens.py +++ b/nova/api/openstack/compute/console_auth_tokens.py @@ -58,7 +58,7 @@ class ConsoleAuthTokensController(wsgi.Controller): if i in connect_info}} -class ConsoleAuthTokens(extensions.V3APIExtensionBase): +class ConsoleAuthTokens(extensions.V21APIExtensionBase): """Console token authentication support.""" name = "ConsoleAuthTokens" alias = ALIAS diff --git a/nova/api/openstack/compute/console_output.py b/nova/api/openstack/compute/console_output.py index 60b40a3dcdd0..2e06552ae351 100644 --- a/nova/api/openstack/compute/console_output.py +++ b/nova/api/openstack/compute/console_output.py @@ -72,7 +72,7 @@ class ConsoleOutputController(wsgi.Controller): return {'output': output} -class ConsoleOutput(extensions.V3APIExtensionBase): +class ConsoleOutput(extensions.V21APIExtensionBase): """Console log output support, with tailing ability.""" name = "ConsoleOutput" diff --git a/nova/api/openstack/compute/consoles.py b/nova/api/openstack/compute/consoles.py index 86b121ece0d5..a79d886c0780 100644 --- a/nova/api/openstack/compute/consoles.py +++ b/nova/api/openstack/compute/consoles.py @@ -107,7 +107,7 @@ class ConsolesController(wsgi.Controller): raise exc.HTTPNotFound(explanation=e.format_message()) -class Consoles(extensions.V3APIExtensionBase): +class Consoles(extensions.V21APIExtensionBase): """Consoles.""" name = "Consoles" diff --git a/nova/api/openstack/compute/create_backup.py b/nova/api/openstack/compute/create_backup.py index 2a2375de52f9..1d81bb8c6f08 100644 --- a/nova/api/openstack/compute/create_backup.py +++ b/nova/api/openstack/compute/create_backup.py @@ -83,7 +83,7 @@ class CreateBackupController(wsgi.Controller): return resp -class CreateBackup(extensions.V3APIExtensionBase): +class CreateBackup(extensions.V21APIExtensionBase): """Create a backup of a server.""" name = "CreateBackup" diff --git a/nova/api/openstack/compute/deferred_delete.py b/nova/api/openstack/compute/deferred_delete.py index 0d8e26544302..d3cc9c8df895 100644 --- a/nova/api/openstack/compute/deferred_delete.py +++ b/nova/api/openstack/compute/deferred_delete.py @@ -62,7 +62,7 @@ class DeferredDeleteController(wsgi.Controller): raise webob.exc.HTTPConflict(explanation=e.format_message()) -class DeferredDelete(extensions.V3APIExtensionBase): +class DeferredDelete(extensions.V21APIExtensionBase): """Instance deferred delete.""" name = "DeferredDelete" diff --git a/nova/api/openstack/compute/disk_config.py b/nova/api/openstack/compute/disk_config.py index 037c1ab78406..2fc692edefa2 100644 --- a/nova/api/openstack/compute/disk_config.py +++ b/nova/api/openstack/compute/disk_config.py @@ -112,7 +112,7 @@ class ServerDiskConfigController(wsgi.Controller): self._show(req, resp_obj) -class DiskConfig(extensions.V3APIExtensionBase): +class DiskConfig(extensions.V21APIExtensionBase): """Disk Management Extension.""" name = "DiskConfig" diff --git a/nova/api/openstack/compute/evacuate.py b/nova/api/openstack/compute/evacuate.py index 2a77cf579249..b0d26b673c2e 100644 --- a/nova/api/openstack/compute/evacuate.py +++ b/nova/api/openstack/compute/evacuate.py @@ -98,7 +98,7 @@ class EvacuateController(wsgi.Controller): return {} -class Evacuate(extensions.V3APIExtensionBase): +class Evacuate(extensions.V21APIExtensionBase): """Enables server evacuation.""" name = "Evacuate" diff --git a/nova/api/openstack/compute/extended_availability_zone.py b/nova/api/openstack/compute/extended_availability_zone.py index ba6ad8bdd5c7..7b13b11f0161 100644 --- a/nova/api/openstack/compute/extended_availability_zone.py +++ b/nova/api/openstack/compute/extended_availability_zone.py @@ -53,7 +53,7 @@ class ExtendedAZController(wsgi.Controller): self._extend_server(context, server, db_instance) -class ExtendedAvailabilityZone(extensions.V3APIExtensionBase): +class ExtendedAvailabilityZone(extensions.V21APIExtensionBase): """Extended Availability Zone support.""" name = "ExtendedAvailabilityZone" diff --git a/nova/api/openstack/compute/extended_server_attributes.py b/nova/api/openstack/compute/extended_server_attributes.py index 6b34452eb4a8..76f8f4ee9c68 100644 --- a/nova/api/openstack/compute/extended_server_attributes.py +++ b/nova/api/openstack/compute/extended_server_attributes.py @@ -69,7 +69,7 @@ class ExtendedServerAttributesController(wsgi.Controller): req.api_version_request) -class ExtendedServerAttributes(extensions.V3APIExtensionBase): +class ExtendedServerAttributes(extensions.V21APIExtensionBase): """Extended Server Attributes support.""" name = "ExtendedServerAttributes" diff --git a/nova/api/openstack/compute/extended_status.py b/nova/api/openstack/compute/extended_status.py index b42d8eab5668..1d49be241a67 100644 --- a/nova/api/openstack/compute/extended_status.py +++ b/nova/api/openstack/compute/extended_status.py @@ -55,7 +55,7 @@ class ExtendedStatusController(wsgi.Controller): self._extend_server(server, db_instance) -class ExtendedStatus(extensions.V3APIExtensionBase): +class ExtendedStatus(extensions.V21APIExtensionBase): """Extended Status support.""" name = "ExtendedStatus" diff --git a/nova/api/openstack/compute/extended_volumes.py b/nova/api/openstack/compute/extended_volumes.py index b447507eb60f..8779a2649b93 100644 --- a/nova/api/openstack/compute/extended_volumes.py +++ b/nova/api/openstack/compute/extended_volumes.py @@ -65,7 +65,7 @@ class ExtendedVolumesController(wsgi.Controller): req.api_version_request) -class ExtendedVolumes(extensions.V3APIExtensionBase): +class ExtendedVolumes(extensions.V21APIExtensionBase): """Extended Volumes support.""" name = "ExtendedVolumes" diff --git a/nova/api/openstack/compute/extension_info.py b/nova/api/openstack/compute/extension_info.py index 069aaf52d68b..47417b7139b0 100644 --- a/nova/api/openstack/compute/extension_info.py +++ b/nova/api/openstack/compute/extension_info.py @@ -199,7 +199,7 @@ class ExtensionInfoController(wsgi.Controller): return dict(extension=self._translate(ext)) -class ExtensionInfo(extensions.V3APIExtensionBase): +class ExtensionInfo(extensions.V21APIExtensionBase): """Extension information.""" name = "Extensions" diff --git a/nova/api/openstack/compute/fixed_ips.py b/nova/api/openstack/compute/fixed_ips.py index c81cfa736e80..5441af724005 100644 --- a/nova/api/openstack/compute/fixed_ips.py +++ b/nova/api/openstack/compute/fixed_ips.py @@ -105,7 +105,7 @@ class FixedIPController(wsgi.Controller): raise webob.exc.HTTPBadRequest(explanation=msg) -class FixedIps(extensions.V3APIExtensionBase): +class FixedIps(extensions.V21APIExtensionBase): """Fixed IPs support.""" name = "FixedIPs" diff --git a/nova/api/openstack/compute/flavor_access.py b/nova/api/openstack/compute/flavor_access.py index a5f5bcac2651..f8a56aaa6b08 100644 --- a/nova/api/openstack/compute/flavor_access.py +++ b/nova/api/openstack/compute/flavor_access.py @@ -142,7 +142,7 @@ class FlavorActionController(wsgi.Controller): return _marshall_flavor_access(flavor) -class FlavorAccess(extensions.V3APIExtensionBase): +class FlavorAccess(extensions.V21APIExtensionBase): """Flavor access support.""" name = "FlavorAccess" diff --git a/nova/api/openstack/compute/flavor_manage.py b/nova/api/openstack/compute/flavor_manage.py index 76d9bb181197..11fac9ba9bb6 100644 --- a/nova/api/openstack/compute/flavor_manage.py +++ b/nova/api/openstack/compute/flavor_manage.py @@ -90,7 +90,7 @@ class FlavorManageController(wsgi.Controller): return self._view_builder.show(req, flavor) -class FlavorManage(extensions.V3APIExtensionBase): +class FlavorManage(extensions.V21APIExtensionBase): """Flavor create/delete API support.""" name = "FlavorManage" diff --git a/nova/api/openstack/compute/flavor_rxtx.py b/nova/api/openstack/compute/flavor_rxtx.py index cbfd44feec47..cd1b7fd3a170 100644 --- a/nova/api/openstack/compute/flavor_rxtx.py +++ b/nova/api/openstack/compute/flavor_rxtx.py @@ -49,7 +49,7 @@ class FlavorRxtxController(wsgi.Controller): self._extend_flavors(req, list(resp_obj.obj['flavors'])) -class FlavorRxtx(extensions.V3APIExtensionBase): +class FlavorRxtx(extensions.V21APIExtensionBase): """Support to show the rxtx status of a flavor.""" name = "FlavorRxtx" diff --git a/nova/api/openstack/compute/flavors.py b/nova/api/openstack/compute/flavors.py index f93a4210338d..5518245a2bb6 100644 --- a/nova/api/openstack/compute/flavors.py +++ b/nova/api/openstack/compute/flavors.py @@ -115,7 +115,7 @@ class FlavorsController(wsgi.Controller): return limited_flavors -class Flavors(extensions.V3APIExtensionBase): +class Flavors(extensions.V21APIExtensionBase): """Flavors Extension.""" name = "Flavors" alias = ALIAS diff --git a/nova/api/openstack/compute/flavors_extraspecs.py b/nova/api/openstack/compute/flavors_extraspecs.py index 0507244f27a6..716f347323b6 100644 --- a/nova/api/openstack/compute/flavors_extraspecs.py +++ b/nova/api/openstack/compute/flavors_extraspecs.py @@ -136,7 +136,7 @@ class FlavorExtraSpecsController(wsgi.Controller): raise webob.exc.HTTPNotFound(explanation=msg) -class FlavorsExtraSpecs(extensions.V3APIExtensionBase): +class FlavorsExtraSpecs(extensions.V21APIExtensionBase): """Flavors extra specs support.""" name = 'FlavorExtraSpecs' alias = ALIAS diff --git a/nova/api/openstack/compute/floating_ip_dns.py b/nova/api/openstack/compute/floating_ip_dns.py index 95374c157804..5da98a1b7a27 100644 --- a/nova/api/openstack/compute/floating_ip_dns.py +++ b/nova/api/openstack/compute/floating_ip_dns.py @@ -250,7 +250,7 @@ class FloatingIPDNSEntryController(wsgi.Controller): raise webob.exc.HTTPNotFound(explanation=e.format_message()) -class FloatingIpDns(extensions.V3APIExtensionBase): +class FloatingIpDns(extensions.V21APIExtensionBase): """Floating IP DNS support.""" name = "FloatingIpDns" @@ -273,7 +273,7 @@ class FloatingIpDns(extensions.V3APIExtensionBase): return resources def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/floating_ip_pools.py b/nova/api/openstack/compute/floating_ip_pools.py index 1f25051a535f..b9ea7866c112 100644 --- a/nova/api/openstack/compute/floating_ip_pools.py +++ b/nova/api/openstack/compute/floating_ip_pools.py @@ -50,7 +50,7 @@ class FloatingIPPoolsController(wsgi.Controller): return _translate_floating_ip_pools_view(pools) -class FloatingIpPools(extensions.V3APIExtensionBase): +class FloatingIpPools(extensions.V21APIExtensionBase): """Floating IPs support.""" name = "FloatingIpPools" @@ -63,7 +63,7 @@ class FloatingIpPools(extensions.V3APIExtensionBase): return resource def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/floating_ips.py b/nova/api/openstack/compute/floating_ips.py index f912b3cb04fe..3550e18df827 100644 --- a/nova/api/openstack/compute/floating_ips.py +++ b/nova/api/openstack/compute/floating_ips.py @@ -295,7 +295,7 @@ class FloatingIPActionController(wsgi.Controller): raise webob.exc.HTTPConflict(explanation=msg) -class FloatingIps(extensions.V3APIExtensionBase): +class FloatingIps(extensions.V21APIExtensionBase): """Floating IPs support.""" name = "FloatingIps" diff --git a/nova/api/openstack/compute/floating_ips_bulk.py b/nova/api/openstack/compute/floating_ips_bulk.py index e8f74c1415ce..c6e39494c37d 100644 --- a/nova/api/openstack/compute/floating_ips_bulk.py +++ b/nova/api/openstack/compute/floating_ips_bulk.py @@ -152,7 +152,7 @@ class FloatingIPBulkController(wsgi.Controller): raise exception.InvalidInput(reason=six.text_type(exc)) -class FloatingIpsBulk(extensions.V3APIExtensionBase): +class FloatingIpsBulk(extensions.V21APIExtensionBase): """Bulk handling of Floating IPs.""" name = "FloatingIpsBulk" @@ -165,7 +165,7 @@ class FloatingIpsBulk(extensions.V3APIExtensionBase): return resource def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/fping.py b/nova/api/openstack/compute/fping.py index 0afa36e61c13..8a71be611790 100644 --- a/nova/api/openstack/compute/fping.py +++ b/nova/api/openstack/compute/fping.py @@ -137,7 +137,7 @@ class FpingController(wsgi.Controller): } -class Fping(extensions.V3APIExtensionBase): +class Fping(extensions.V21APIExtensionBase): """Fping Management Extension.""" name = "Fping" diff --git a/nova/api/openstack/compute/hide_server_addresses.py b/nova/api/openstack/compute/hide_server_addresses.py index a027fb7726b4..07f23599dfd1 100644 --- a/nova/api/openstack/compute/hide_server_addresses.py +++ b/nova/api/openstack/compute/hide_server_addresses.py @@ -74,7 +74,7 @@ class Controller(wsgi.Controller): self._perhaps_hide_addresses(instance, server) -class HideServerAddresses(extensions.V3APIExtensionBase): +class HideServerAddresses(extensions.V21APIExtensionBase): """Support hiding server addresses in certain states.""" name = 'HideServerAddresses' diff --git a/nova/api/openstack/compute/hosts.py b/nova/api/openstack/compute/hosts.py index cdb3de69f383..07d41698410d 100644 --- a/nova/api/openstack/compute/hosts.py +++ b/nova/api/openstack/compute/hosts.py @@ -283,7 +283,7 @@ class HostController(wsgi.Controller): return {'host': resources} -class Hosts(extensions.V3APIExtensionBase): +class Hosts(extensions.V21APIExtensionBase): """Admin-only host administration.""" name = "Hosts" diff --git a/nova/api/openstack/compute/hypervisors.py b/nova/api/openstack/compute/hypervisors.py index a65b64855b32..c9a0af86472f 100644 --- a/nova/api/openstack/compute/hypervisors.py +++ b/nova/api/openstack/compute/hypervisors.py @@ -181,7 +181,7 @@ class HypervisorsController(wsgi.Controller): return dict(hypervisor_statistics=stats) -class Hypervisors(extensions.V3APIExtensionBase): +class Hypervisors(extensions.V21APIExtensionBase): """Admin-only hypervisor administration.""" name = "Hypervisors" diff --git a/nova/api/openstack/compute/image_metadata.py b/nova/api/openstack/compute/image_metadata.py index 2523883f9adc..0d2f450fc4ae 100644 --- a/nova/api/openstack/compute/image_metadata.py +++ b/nova/api/openstack/compute/image_metadata.py @@ -128,7 +128,7 @@ class ImageMetadataController(wsgi.Controller): raise exc.HTTPForbidden(explanation=e.format_message()) -class ImageMetadata(extensions.V3APIExtensionBase): +class ImageMetadata(extensions.V21APIExtensionBase): """Image Metadata API.""" name = "ImageMetadata" alias = ALIAS diff --git a/nova/api/openstack/compute/image_size.py b/nova/api/openstack/compute/image_size.py index 2f317b6c15f3..d4f8d71726e6 100644 --- a/nova/api/openstack/compute/image_size.py +++ b/nova/api/openstack/compute/image_size.py @@ -49,7 +49,7 @@ class ImageSizeController(wsgi.Controller): self._extend_image(image, image_cached) -class ImageSize(extensions.V3APIExtensionBase): +class ImageSize(extensions.V21APIExtensionBase): """Adds image size to image listings.""" name = "ImageSize" diff --git a/nova/api/openstack/compute/images.py b/nova/api/openstack/compute/images.py index d706370aba1a..ecb2046d896d 100644 --- a/nova/api/openstack/compute/images.py +++ b/nova/api/openstack/compute/images.py @@ -150,7 +150,7 @@ class ImagesController(wsgi.Controller): return self._view_builder.detail(req, images) -class Images(extensions.V3APIExtensionBase): +class Images(extensions.V21APIExtensionBase): """Proxying API for Images.""" name = "Images" diff --git a/nova/api/openstack/compute/instance_actions.py b/nova/api/openstack/compute/instance_actions.py index 20c5c5e2973a..b915ea8dd702 100644 --- a/nova/api/openstack/compute/instance_actions.py +++ b/nova/api/openstack/compute/instance_actions.py @@ -80,7 +80,7 @@ class InstanceActionsController(wsgi.Controller): return {'instanceAction': action} -class InstanceActions(extensions.V3APIExtensionBase): +class InstanceActions(extensions.V21APIExtensionBase): """View a log of actions and events taken on an instance.""" name = "InstanceActions" @@ -96,7 +96,7 @@ class InstanceActions(extensions.V3APIExtensionBase): return [ext] def get_controller_extensions(self): - """It's an abstract function V3APIExtensionBase and the extension + """It's an abstract function V21APIExtensionBase and the extension will not be loaded without it. """ return [] diff --git a/nova/api/openstack/compute/instance_usage_audit_log.py b/nova/api/openstack/compute/instance_usage_audit_log.py index b436bf3f72e2..130f0466233f 100644 --- a/nova/api/openstack/compute/instance_usage_audit_log.py +++ b/nova/api/openstack/compute/instance_usage_audit_log.py @@ -126,7 +126,7 @@ class InstanceUsageAuditLogController(wsgi.Controller): log=log) -class InstanceUsageAuditLog(extensions.V3APIExtensionBase): +class InstanceUsageAuditLog(extensions.V21APIExtensionBase): """Admin-only Task Log Monitoring.""" name = "OSInstanceUsageAuditLog" alias = ALIAS diff --git a/nova/api/openstack/compute/ips.py b/nova/api/openstack/compute/ips.py index 87998c13126a..276f74c39179 100644 --- a/nova/api/openstack/compute/ips.py +++ b/nova/api/openstack/compute/ips.py @@ -59,7 +59,7 @@ class IPsController(wsgi.Controller): return self._view_builder.show(networks[id], id) -class IPs(extensions.V3APIExtensionBase): +class IPs(extensions.V21APIExtensionBase): """Server addresses.""" name = "Ips" diff --git a/nova/api/openstack/compute/keypairs.py b/nova/api/openstack/compute/keypairs.py index f1162570922b..17d33f66a937 100644 --- a/nova/api/openstack/compute/keypairs.py +++ b/nova/api/openstack/compute/keypairs.py @@ -281,7 +281,7 @@ class Controller(wsgi.Controller): self._add_key_name(req, servers) -class Keypairs(extensions.V3APIExtensionBase): +class Keypairs(extensions.V21APIExtensionBase): """Keypair Support.""" name = "Keypairs" diff --git a/nova/api/openstack/compute/limits.py b/nova/api/openstack/compute/limits.py index 04a4d1437eff..8012237e533e 100644 --- a/nova/api/openstack/compute/limits.py +++ b/nova/api/openstack/compute/limits.py @@ -51,7 +51,7 @@ class LimitsController(wsgi.Controller): return limits_views.ViewBuilderV3() -class Limits(extensions.V3APIExtensionBase): +class Limits(extensions.V21APIExtensionBase): """Limits support.""" name = "Limits" diff --git a/nova/api/openstack/compute/lock_server.py b/nova/api/openstack/compute/lock_server.py index 03fd9f34d980..2c29add9e9ae 100644 --- a/nova/api/openstack/compute/lock_server.py +++ b/nova/api/openstack/compute/lock_server.py @@ -53,7 +53,7 @@ class LockServerController(wsgi.Controller): self.compute_api.unlock(context, instance) -class LockServer(extensions.V3APIExtensionBase): +class LockServer(extensions.V21APIExtensionBase): """Enable lock/unlock server actions.""" name = "LockServer" diff --git a/nova/api/openstack/compute/migrate_server.py b/nova/api/openstack/compute/migrate_server.py index af3cf2167851..4b8bd6a61232 100644 --- a/nova/api/openstack/compute/migrate_server.py +++ b/nova/api/openstack/compute/migrate_server.py @@ -99,7 +99,7 @@ class MigrateServerController(wsgi.Controller): 'os-migrateLive', id) -class MigrateServer(extensions.V3APIExtensionBase): +class MigrateServer(extensions.V21APIExtensionBase): """Enable migrate and live-migrate server actions.""" name = "MigrateServer" diff --git a/nova/api/openstack/compute/migrations.py b/nova/api/openstack/compute/migrations.py index 521bb211d944..919d0b86e24a 100644 --- a/nova/api/openstack/compute/migrations.py +++ b/nova/api/openstack/compute/migrations.py @@ -53,7 +53,7 @@ class MigrationsController(wsgi.Controller): return {'migrations': output(migrations)} -class Migrations(extensions.V3APIExtensionBase): +class Migrations(extensions.V21APIExtensionBase): """Provide data on migrations.""" name = "Migrations" alias = ALIAS diff --git a/nova/api/openstack/compute/multinic.py b/nova/api/openstack/compute/multinic.py index 37027251030d..21575364542a 100644 --- a/nova/api/openstack/compute/multinic.py +++ b/nova/api/openstack/compute/multinic.py @@ -71,7 +71,7 @@ class MultinicController(wsgi.Controller): # Note: The class name is as it has to be for this to be loaded as an # extension--only first character capitalized. -class Multinic(extensions.V3APIExtensionBase): +class Multinic(extensions.V21APIExtensionBase): """Multiple network support.""" name = "Multinic" diff --git a/nova/api/openstack/compute/multiple_create.py b/nova/api/openstack/compute/multiple_create.py index b2f20de9635c..60733497a390 100644 --- a/nova/api/openstack/compute/multiple_create.py +++ b/nova/api/openstack/compute/multiple_create.py @@ -26,7 +26,7 @@ MAX_ATTRIBUTE_NAME = "max_count" RRID_ATTRIBUTE_NAME = "return_reservation_id" -class MultipleCreate(extensions.V3APIExtensionBase): +class MultipleCreate(extensions.V21APIExtensionBase): """Allow multiple create in the Create Server v3 API.""" name = "MultipleCreate" diff --git a/nova/api/openstack/compute/networks.py b/nova/api/openstack/compute/networks.py index b9946d5936fb..83f643367f4d 100644 --- a/nova/api/openstack/compute/networks.py +++ b/nova/api/openstack/compute/networks.py @@ -175,7 +175,7 @@ class NetworkController(wsgi.Controller): raise exc.HTTPBadRequest(explanation=e.format_message()) -class Networks(extensions.V3APIExtensionBase): +class Networks(extensions.V21APIExtensionBase): """Admin-only Network Management Extension.""" name = "Networks" diff --git a/nova/api/openstack/compute/networks_associate.py b/nova/api/openstack/compute/networks_associate.py index c007a744d308..8f9ace0dc097 100644 --- a/nova/api/openstack/compute/networks_associate.py +++ b/nova/api/openstack/compute/networks_associate.py @@ -78,7 +78,7 @@ class NetworkAssociateActionController(wsgi.Controller): common.raise_feature_not_supported() -class NetworksAssociate(extensions.V3APIExtensionBase): +class NetworksAssociate(extensions.V21APIExtensionBase): """Network association support.""" name = "NetworkAssociationSupport" diff --git a/nova/api/openstack/compute/pause_server.py b/nova/api/openstack/compute/pause_server.py index c645739bdd9c..c4eeea33411b 100644 --- a/nova/api/openstack/compute/pause_server.py +++ b/nova/api/openstack/compute/pause_server.py @@ -72,7 +72,7 @@ class PauseServerController(wsgi.Controller): common.raise_feature_not_supported() -class PauseServer(extensions.V3APIExtensionBase): +class PauseServer(extensions.V21APIExtensionBase): """Enable pause/unpause server actions.""" name = "PauseServer" diff --git a/nova/api/openstack/compute/pci.py b/nova/api/openstack/compute/pci.py index 3867f5e4a998..698cb4bbc3f1 100644 --- a/nova/api/openstack/compute/pci.py +++ b/nova/api/openstack/compute/pci.py @@ -131,7 +131,7 @@ class PciController(wsgi.Controller): return dict(pci_devices=results) -class Pci(extensions.V3APIExtensionBase): +class Pci(extensions.V21APIExtensionBase): """Pci access support.""" name = "PciAccess" alias = ALIAS diff --git a/nova/api/openstack/compute/personality.py b/nova/api/openstack/compute/personality.py index 614b3dadb12e..d3c6be343a1b 100644 --- a/nova/api/openstack/compute/personality.py +++ b/nova/api/openstack/compute/personality.py @@ -18,7 +18,7 @@ from nova.api.openstack import extensions ALIAS = "os-personality" -class Personality(extensions.V3APIExtensionBase): +class Personality(extensions.V21APIExtensionBase): """Personality support.""" name = "Personality" diff --git a/nova/api/openstack/compute/preserve_ephemeral_rebuild.py b/nova/api/openstack/compute/preserve_ephemeral_rebuild.py index 300d791fb8d3..be1dc99361e6 100644 --- a/nova/api/openstack/compute/preserve_ephemeral_rebuild.py +++ b/nova/api/openstack/compute/preserve_ephemeral_rebuild.py @@ -21,7 +21,7 @@ from nova.api.openstack import extensions ALIAS = "os-preserve-ephemeral-rebuild" -class PreserveEphemeralRebuild(extensions.V3APIExtensionBase): +class PreserveEphemeralRebuild(extensions.V21APIExtensionBase): """Allow preservation of the ephemeral partition on rebuild.""" name = "PreserveEphemeralOnRebuild" diff --git a/nova/api/openstack/compute/quota_classes.py b/nova/api/openstack/compute/quota_classes.py index 46d3224e1dff..63e71fadb879 100644 --- a/nova/api/openstack/compute/quota_classes.py +++ b/nova/api/openstack/compute/quota_classes.py @@ -93,7 +93,7 @@ class QuotaClassSetsController(wsgi.Controller): return self._format_quota_set(None, values) -class QuotaClasses(extensions.V3APIExtensionBase): +class QuotaClasses(extensions.V21APIExtensionBase): """Quota classes management support.""" name = "QuotaClasses" diff --git a/nova/api/openstack/compute/quota_sets.py b/nova/api/openstack/compute/quota_sets.py index 5eb3cb3a4316..8b616c23bf07 100644 --- a/nova/api/openstack/compute/quota_sets.py +++ b/nova/api/openstack/compute/quota_sets.py @@ -171,7 +171,7 @@ class QuotaSetsController(wsgi.Controller): QUOTAS.destroy_all_by_project(context, id) -class QuotaSets(extensions.V3APIExtensionBase): +class QuotaSets(extensions.V21APIExtensionBase): """Quotas management support.""" name = "Quotas" diff --git a/nova/api/openstack/compute/remote_consoles.py b/nova/api/openstack/compute/remote_consoles.py index fafccbe1aaa8..8638cde91051 100644 --- a/nova/api/openstack/compute/remote_consoles.py +++ b/nova/api/openstack/compute/remote_consoles.py @@ -183,7 +183,7 @@ class RemoteConsolesController(wsgi.Controller): common.raise_feature_not_supported() -class RemoteConsoles(extensions.V3APIExtensionBase): +class RemoteConsoles(extensions.V21APIExtensionBase): """Interactive Console support.""" name = "Consoles" alias = ALIAS diff --git a/nova/api/openstack/compute/rescue.py b/nova/api/openstack/compute/rescue.py index c10a2efbd39c..aff601ce6b96 100644 --- a/nova/api/openstack/compute/rescue.py +++ b/nova/api/openstack/compute/rescue.py @@ -99,7 +99,7 @@ class RescueController(wsgi.Controller): id) -class Rescue(extensions.V3APIExtensionBase): +class Rescue(extensions.V21APIExtensionBase): """Instance rescue mode.""" name = "Rescue" diff --git a/nova/api/openstack/compute/scheduler_hints.py b/nova/api/openstack/compute/scheduler_hints.py index 22f9a0923a01..26754996b931 100644 --- a/nova/api/openstack/compute/scheduler_hints.py +++ b/nova/api/openstack/compute/scheduler_hints.py @@ -18,7 +18,7 @@ from nova.api.openstack import extensions ALIAS = "os-scheduler-hints" -class SchedulerHints(extensions.V3APIExtensionBase): +class SchedulerHints(extensions.V21APIExtensionBase): """Pass arbitrary key/value pairs to the scheduler.""" name = "SchedulerHints" diff --git a/nova/api/openstack/compute/security_group_default_rules.py b/nova/api/openstack/compute/security_group_default_rules.py index 4ee59fa8133a..24afbd5f4b5c 100644 --- a/nova/api/openstack/compute/security_group_default_rules.py +++ b/nova/api/openstack/compute/security_group_default_rules.py @@ -131,7 +131,7 @@ class SecurityGroupDefaultRulesController(sg.SecurityGroupControllerBase): return sg_rule -class SecurityGroupDefaultRules(extensions.V3APIExtensionBase): +class SecurityGroupDefaultRules(extensions.V21APIExtensionBase): """Default rules for security group support.""" name = "SecurityGroupDefaultRules" alias = ALIAS diff --git a/nova/api/openstack/compute/security_groups.py b/nova/api/openstack/compute/security_groups.py index be26fab64dc3..5ccd213270ae 100644 --- a/nova/api/openstack/compute/security_groups.py +++ b/nova/api/openstack/compute/security_groups.py @@ -492,7 +492,7 @@ class SecurityGroupsOutputController(wsgi.Controller): self._extend_servers(req, list(resp_obj.obj['servers'])) -class SecurityGroups(extensions.V3APIExtensionBase): +class SecurityGroups(extensions.V21APIExtensionBase): """Security group support.""" name = "SecurityGroups" alias = ALIAS diff --git a/nova/api/openstack/compute/server_diagnostics.py b/nova/api/openstack/compute/server_diagnostics.py index 529d61990ebd..6659161156c0 100644 --- a/nova/api/openstack/compute/server_diagnostics.py +++ b/nova/api/openstack/compute/server_diagnostics.py @@ -49,7 +49,7 @@ class ServerDiagnosticsController(wsgi.Controller): common.raise_feature_not_supported() -class ServerDiagnostics(extensions.V3APIExtensionBase): +class ServerDiagnostics(extensions.V21APIExtensionBase): """Allow Admins to view server diagnostics through server action.""" name = "ServerDiagnostics" diff --git a/nova/api/openstack/compute/server_external_events.py b/nova/api/openstack/compute/server_external_events.py index a821df7026ee..3ec77ad1546d 100644 --- a/nova/api/openstack/compute/server_external_events.py +++ b/nova/api/openstack/compute/server_external_events.py @@ -115,7 +115,7 @@ class ServerExternalEventsController(wsgi.Controller): return robj -class ServerExternalEvents(extensions.V3APIExtensionBase): +class ServerExternalEvents(extensions.V21APIExtensionBase): """Server External Event Triggers.""" name = "ServerExternalEvents" diff --git a/nova/api/openstack/compute/server_groups.py b/nova/api/openstack/compute/server_groups.py index 3740bc7fa426..549814ac42c7 100644 --- a/nova/api/openstack/compute/server_groups.py +++ b/nova/api/openstack/compute/server_groups.py @@ -156,7 +156,7 @@ class ServerGroupController(wsgi.Controller): return {'server_group': self._format_server_group(context, sg)} -class ServerGroups(extensions.V3APIExtensionBase): +class ServerGroups(extensions.V21APIExtensionBase): """Server group support.""" name = "ServerGroups" alias = ALIAS diff --git a/nova/api/openstack/compute/server_metadata.py b/nova/api/openstack/compute/server_metadata.py index 23572dde7709..2192c1edf0b0 100644 --- a/nova/api/openstack/compute/server_metadata.py +++ b/nova/api/openstack/compute/server_metadata.py @@ -159,7 +159,7 @@ class ServerMetadataController(wsgi.Controller): 'delete metadata', server_id) -class ServerMetadata(extensions.V3APIExtensionBase): +class ServerMetadata(extensions.V21APIExtensionBase): """Server Metadata API.""" name = "ServerMetadata" alias = ALIAS diff --git a/nova/api/openstack/compute/server_password.py b/nova/api/openstack/compute/server_password.py index 132081135392..e10c80b14be4 100644 --- a/nova/api/openstack/compute/server_password.py +++ b/nova/api/openstack/compute/server_password.py @@ -57,7 +57,7 @@ class ServerPasswordController(wsgi.Controller): instance.save() -class ServerPassword(extensions.V3APIExtensionBase): +class ServerPassword(extensions.V21APIExtensionBase): """Server password support.""" name = "ServerPassword" diff --git a/nova/api/openstack/compute/server_usage.py b/nova/api/openstack/compute/server_usage.py index 617fd84e5bdc..1ea982e1eed8 100644 --- a/nova/api/openstack/compute/server_usage.py +++ b/nova/api/openstack/compute/server_usage.py @@ -60,7 +60,7 @@ class ServerUsageController(wsgi.Controller): self._extend_server(server, db_instance) -class ServerUsage(extensions.V3APIExtensionBase): +class ServerUsage(extensions.V21APIExtensionBase): """Adds launched_at and terminated_at on Servers.""" name = "ServerUsage" diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 4673b655b56a..bebefb280484 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -117,7 +117,7 @@ class ServersController(wsgi.Controller): return False def check_load_extension(ext): - if isinstance(ext.obj, extensions.V3APIExtensionBase): + if isinstance(ext.obj, extensions.V21APIExtensionBase): # Filter out for the existence of the required # function here rather than on every request. We # don't have a new abstract base class to reduce @@ -1134,7 +1134,7 @@ def remove_invalid_options(context, search_options, allowed_search_options): search_options.pop(opt, None) -class Servers(extensions.V3APIExtensionBase): +class Servers(extensions.V21APIExtensionBase): """Servers.""" name = "Servers" diff --git a/nova/api/openstack/compute/services.py b/nova/api/openstack/compute/services.py index 1718ca06c7c6..94a6146e476f 100644 --- a/nova/api/openstack/compute/services.py +++ b/nova/api/openstack/compute/services.py @@ -199,7 +199,7 @@ class ServiceController(wsgi.Controller): return self._perform_action(req, id, body, actions) -class Services(extensions.V3APIExtensionBase): +class Services(extensions.V21APIExtensionBase): """Services support.""" name = "Services" diff --git a/nova/api/openstack/compute/shelve.py b/nova/api/openstack/compute/shelve.py index 24146ce3fad0..2ccbe9fa1835 100644 --- a/nova/api/openstack/compute/shelve.py +++ b/nova/api/openstack/compute/shelve.py @@ -85,7 +85,7 @@ class ShelveController(wsgi.Controller): id) -class Shelve(exts.V3APIExtensionBase): +class Shelve(exts.V21APIExtensionBase): """Instance shelve mode.""" name = "Shelve" diff --git a/nova/api/openstack/compute/simple_tenant_usage.py b/nova/api/openstack/compute/simple_tenant_usage.py index cc7adb07e58a..47c607970763 100644 --- a/nova/api/openstack/compute/simple_tenant_usage.py +++ b/nova/api/openstack/compute/simple_tenant_usage.py @@ -269,7 +269,7 @@ class SimpleTenantUsageController(wsgi.Controller): return {'tenant_usage': usage} -class SimpleTenantUsage(extensions.V3APIExtensionBase): +class SimpleTenantUsage(extensions.V21APIExtensionBase): """Simple tenant usage extension.""" name = "SimpleTenantUsage" diff --git a/nova/api/openstack/compute/suspend_server.py b/nova/api/openstack/compute/suspend_server.py index e967ac06260f..02a142bfc2b7 100644 --- a/nova/api/openstack/compute/suspend_server.py +++ b/nova/api/openstack/compute/suspend_server.py @@ -64,7 +64,7 @@ class SuspendServerController(wsgi.Controller): 'resume', id) -class SuspendServer(extensions.V3APIExtensionBase): +class SuspendServer(extensions.V21APIExtensionBase): """Enable suspend/resume server actions.""" name = "SuspendServer" diff --git a/nova/api/openstack/compute/tenant_networks.py b/nova/api/openstack/compute/tenant_networks.py index c3c18387fc53..c0790b92319f 100644 --- a/nova/api/openstack/compute/tenant_networks.py +++ b/nova/api/openstack/compute/tenant_networks.py @@ -188,7 +188,7 @@ class TenantNetworkController(wsgi.Controller): return {"network": network_dict(networks[0])} -class TenantNetworks(extensions.V3APIExtensionBase): +class TenantNetworks(extensions.V21APIExtensionBase): """Tenant-based Network Management Extension.""" name = "OSTenantNetworks" diff --git a/nova/api/openstack/compute/used_limits.py b/nova/api/openstack/compute/used_limits.py index 39e0d917b069..0be25bc527e4 100644 --- a/nova/api/openstack/compute/used_limits.py +++ b/nova/api/openstack/compute/used_limits.py @@ -70,7 +70,7 @@ class UsedLimitsController(wsgi.Controller): return context.project_id -class UsedLimits(extensions.V3APIExtensionBase): +class UsedLimits(extensions.V21APIExtensionBase): """Provide data on limited resources that are being used.""" name = "UsedLimits" diff --git a/nova/api/openstack/compute/user_data.py b/nova/api/openstack/compute/user_data.py index 9fff38c19b06..af86b89824c0 100644 --- a/nova/api/openstack/compute/user_data.py +++ b/nova/api/openstack/compute/user_data.py @@ -20,7 +20,7 @@ ALIAS = "os-user-data" ATTRIBUTE_NAME = 'user_data' -class UserData(extensions.V3APIExtensionBase): +class UserData(extensions.V21APIExtensionBase): """Add user_data to the Create Server API.""" name = "UserData" diff --git a/nova/api/openstack/compute/versionsV21.py b/nova/api/openstack/compute/versionsV21.py index dca5a9d931db..ffa5158e9dad 100644 --- a/nova/api/openstack/compute/versionsV21.py +++ b/nova/api/openstack/compute/versionsV21.py @@ -36,7 +36,7 @@ class VersionsController(wsgi.Controller): return builder.build_version(versions.VERSIONS[id]) -class Versions(extensions.V3APIExtensionBase): +class Versions(extensions.V21APIExtensionBase): """API Version information.""" name = "Versions" diff --git a/nova/api/openstack/compute/virtual_interfaces.py b/nova/api/openstack/compute/virtual_interfaces.py index 625da1640c78..ac8015d2f0b9 100644 --- a/nova/api/openstack/compute/virtual_interfaces.py +++ b/nova/api/openstack/compute/virtual_interfaces.py @@ -61,7 +61,7 @@ class ServerVirtualInterfaceController(wsgi.Controller): entity_maker=_translate_vif_summary_view) -class VirtualInterfaces(extensions.V3APIExtensionBase): +class VirtualInterfaces(extensions.V21APIExtensionBase): """Virtual interface support.""" name = "VirtualInterfaces" diff --git a/nova/api/openstack/compute/volumes.py b/nova/api/openstack/compute/volumes.py index 4051a944307e..83137acec6af 100644 --- a/nova/api/openstack/compute/volumes.py +++ b/nova/api/openstack/compute/volumes.py @@ -530,7 +530,7 @@ class SnapshotController(wsgi.Controller): return {'snapshot': retval} -class Volumes(extensions.V3APIExtensionBase): +class Volumes(extensions.V21APIExtensionBase): """Volumes support.""" name = "Volumes" diff --git a/nova/api/openstack/extensions.py b/nova/api/openstack/extensions.py index 12ac4e37137d..3db813e4419c 100644 --- a/nova/api/openstack/extensions.py +++ b/nova/api/openstack/extensions.py @@ -404,7 +404,7 @@ def os_compute_soft_authorizer(extension_name): @six.add_metaclass(abc.ABCMeta) -class V3APIExtensionBase(object): +class V21APIExtensionBase(object): """Abstract base class for all V3 API extensions. All V3 API extensions must derive from this class and implement diff --git a/nova/tests/unit/api/openstack/compute/test_extension_info.py b/nova/tests/unit/api/openstack/compute/test_extension_info.py index 5f2513527ca6..b1b099dc4a94 100644 --- a/nova/tests/unit/api/openstack/compute/test_extension_info.py +++ b/nova/tests/unit/api/openstack/compute/test_extension_info.py @@ -74,7 +74,7 @@ class ExtensionInfoTest(test.NoDBTestCase): def test_extension_info_list(self): self.stubs.Set(policy, 'enforce', fake_policy_enforce) - req = fakes.HTTPRequestV3.blank('/extensions') + req = fakes.HTTPRequestV21.blank('/extensions') res_dict = self.controller.index(req) self.assertEqual(3, len(res_dict['extensions'])) for e in res_dict['extensions']: @@ -89,7 +89,7 @@ class ExtensionInfoTest(test.NoDBTestCase): def test_extension_info_show(self): self.stubs.Set(policy, 'enforce', fake_policy_enforce) - req = fakes.HTTPRequestV3.blank('/extensions/ext1-alias') + req = fakes.HTTPRequestV21.blank('/extensions/ext1-alias') res_dict = self.controller.show(req, 'ext1-alias') self.assertEqual(1, len(res_dict)) self.assertEqual(res_dict['extension']['name'], @@ -104,7 +104,7 @@ class ExtensionInfoTest(test.NoDBTestCase): def test_extension_info_list_not_all_discoverable(self): self.stubs.Set(policy, 'enforce', fake_policy_enforce_selective) - req = fakes.HTTPRequestV3.blank('/extensions') + req = fakes.HTTPRequestV21.blank('/extensions') res_dict = self.controller.index(req) self.assertEqual(2, len(res_dict['extensions'])) for e in res_dict['extensions']: diff --git a/nova/tests/unit/api/openstack/compute/test_flavors.py b/nova/tests/unit/api/openstack/compute/test_flavors.py index f2d393191b4c..89dbd4a065ee 100644 --- a/nova/tests/unit/api/openstack/compute/test_flavors.py +++ b/nova/tests/unit/api/openstack/compute/test_flavors.py @@ -115,7 +115,7 @@ def return_flavor_not_found(flavor_id, ctxt=None): class FlavorsTestV21(test.TestCase): _prefix = "/v3" Controller = flavors_v21.FlavorsController - fake_request = fakes.HTTPRequestV3 + fake_request = fakes.HTTPRequestV21 _rspv = "v3" _fake = "" @@ -580,7 +580,7 @@ class DisabledFlavorsWithRealDBTestV21(test.TestCase): """Tests that disabled flavors should not be shown nor listed.""" Controller = flavors_v21.FlavorsController _prefix = "/v3" - fake_request = fakes.HTTPRequestV3 + fake_request = fakes.HTTPRequestV21 def setUp(self): super(DisabledFlavorsWithRealDBTestV21, self).setUp() diff --git a/nova/tests/unit/api/openstack/compute/test_images.py b/nova/tests/unit/api/openstack/compute/test_images.py index ff97c141b447..314a462c7545 100644 --- a/nova/tests/unit/api/openstack/compute/test_images.py +++ b/nova/tests/unit/api/openstack/compute/test_images.py @@ -46,7 +46,7 @@ class ImagesControllerTestV21(test.NoDBTestCase): image_controller_class = images_v21.ImagesController url_base = '/v3' bookmark_base = '' - http_request = fakes.HTTPRequestV3 + http_request = fakes.HTTPRequestV21 def setUp(self): """Run before each test.""" diff --git a/nova/tests/unit/api/openstack/compute/test_plugins/basic.py b/nova/tests/unit/api/openstack/compute/test_plugins/basic.py index abad891b0614..b4aa12d493b8 100644 --- a/nova/tests/unit/api/openstack/compute/test_plugins/basic.py +++ b/nova/tests/unit/api/openstack/compute/test_plugins/basic.py @@ -28,7 +28,7 @@ class BasicController(wsgi.Controller): return data -class Basic(extensions.V3APIExtensionBase): +class Basic(extensions.V21APIExtensionBase): """Basic Test Extension.""" name = "BasicTest" diff --git a/nova/tests/unit/api/openstack/compute/test_plugins/microversions.py b/nova/tests/unit/api/openstack/compute/test_plugins/microversions.py index fa8d031e871b..8925382966c9 100644 --- a/nova/tests/unit/api/openstack/compute/test_plugins/microversions.py +++ b/nova/tests/unit/api/openstack/compute/test_plugins/microversions.py @@ -124,7 +124,7 @@ class MicroversionsExtendsController3(wsgi.Controller): resp_obj.obj['extend_ctrlr3'] = 'val_3' -class Microversions(extensions.V3APIExtensionBase): +class Microversions(extensions.V21APIExtensionBase): """Basic Microversions Extension.""" name = "Microversions" diff --git a/nova/tests/unit/api/openstack/compute/test_server_metadata.py b/nova/tests/unit/api/openstack/compute/test_server_metadata.py index f1eb5712cbd9..2bfd8c6d9549 100644 --- a/nova/tests/unit/api/openstack/compute/test_server_metadata.py +++ b/nova/tests/unit/api/openstack/compute/test_server_metadata.py @@ -138,7 +138,7 @@ class ServerMetaDataTestV21(test.TestCase): self.url = '/fake/servers/%s/metadata' % self.uuid def _get_request(self, param_url=''): - return fakes.HTTPRequestV3.blank(self.url + param_url) + return fakes.HTTPRequestV21.blank(self.url + param_url) def test_index(self): req = self._get_request() @@ -704,7 +704,7 @@ class BadStateServerMetaDataTestV21(test.TestCase): self.url = '/fake/servers/%s/metadata' % self.uuid def _get_request(self, param_url=''): - return fakes.HTTPRequestV3.blank(self.url + param_url) + return fakes.HTTPRequestV21.blank(self.url + param_url) def test_invalid_state_on_delete(self): req = self._get_request('/key2') diff --git a/nova/tests/unit/api/openstack/compute/test_servers.py b/nova/tests/unit/api/openstack/compute/test_servers.py index febf00a275be..360d3dddf8fe 100644 --- a/nova/tests/unit/api/openstack/compute/test_servers.py +++ b/nova/tests/unit/api/openstack/compute/test_servers.py @@ -1418,7 +1418,7 @@ class ServersControllerDeleteTest(ControllerTest): def _create_delete_request(self, uuid): fakes.stub_out_instance_quota(self.stubs, 0, 10) - req = fakes.HTTPRequestV3.blank('/servers/%s' % uuid) + req = fakes.HTTPRequestV21.blank('/servers/%s' % uuid) req.method = 'DELETE' return req @@ -1466,7 +1466,7 @@ class ServersControllerDeleteTest(ControllerTest): def test_delete_server_instance_if_not_launched(self): self.flags(reclaim_instance_interval=3600) - req = fakes.HTTPRequestV3.blank('/servers/%s' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s' % FAKE_UUID) req.method = 'DELETE' self.server_delete_called = False @@ -1676,7 +1676,7 @@ class ServersControllerRebuildInstanceTest(ControllerTest): compute_api.API.start(mox.IgnoreArg(), mox.IgnoreArg()) self.mox.ReplayAll() - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(start="") self.controller._start_server(req, FAKE_UUID, body) @@ -1686,7 +1686,7 @@ class ServersControllerRebuildInstanceTest(ControllerTest): common_policy.parse_rule("project_id:non_fake") } policy.set_rules(rules) - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(start="") exc = self.assertRaises(exception.PolicyNotAuthorized, self.controller._start_server, @@ -1695,7 +1695,7 @@ class ServersControllerRebuildInstanceTest(ControllerTest): def test_start_not_ready(self): self.stubs.Set(compute_api.API, 'start', fake_start_stop_not_ready) - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(start="") self.assertRaises(webob.exc.HTTPConflict, self.controller._start_server, req, FAKE_UUID, body) @@ -1703,14 +1703,14 @@ class ServersControllerRebuildInstanceTest(ControllerTest): def test_start_locked_server(self): self.stubs.Set(compute_api.API, 'start', fakes.fake_actions_to_locked_server) - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(start="") self.assertRaises(webob.exc.HTTPConflict, self.controller._start_server, req, FAKE_UUID, body) def test_start_invalid(self): self.stubs.Set(compute_api.API, 'start', fake_start_stop_invalid_state) - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(start="") self.assertRaises(webob.exc.HTTPConflict, self.controller._start_server, req, FAKE_UUID, body) @@ -1720,7 +1720,7 @@ class ServersControllerRebuildInstanceTest(ControllerTest): compute_api.API.stop(mox.IgnoreArg(), mox.IgnoreArg()) self.mox.ReplayAll() - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(stop="") self.controller._stop_server(req, FAKE_UUID, body) @@ -1730,7 +1730,7 @@ class ServersControllerRebuildInstanceTest(ControllerTest): common_policy.parse_rule("project_id:non_fake") } policy.set_rules(rules) - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(stop='') exc = self.assertRaises(exception.PolicyNotAuthorized, self.controller._stop_server, @@ -1739,7 +1739,7 @@ class ServersControllerRebuildInstanceTest(ControllerTest): def test_stop_not_ready(self): self.stubs.Set(compute_api.API, 'stop', fake_start_stop_not_ready) - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(stop="") self.assertRaises(webob.exc.HTTPConflict, self.controller._stop_server, req, FAKE_UUID, body) @@ -1747,14 +1747,14 @@ class ServersControllerRebuildInstanceTest(ControllerTest): def test_stop_locked_server(self): self.stubs.Set(compute_api.API, 'stop', fakes.fake_actions_to_locked_server) - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(stop="") self.assertRaises(webob.exc.HTTPConflict, self.controller._stop_server, req, FAKE_UUID, body) def test_stop_invalid_state(self): self.stubs.Set(compute_api.API, 'stop', fake_start_stop_invalid_state) - req = fakes.HTTPRequestV3.blank('/servers/%s/action' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s/action' % FAKE_UUID) body = dict(start="") self.assertRaises(webob.exc.HTTPConflict, self.controller._stop_server, req, FAKE_UUID, body) @@ -1762,7 +1762,7 @@ class ServersControllerRebuildInstanceTest(ControllerTest): def test_start_with_bogus_id(self): self.stubs.Set(db, 'instance_get_by_uuid', fake_instance_get_by_uuid_not_found) - req = fakes.HTTPRequestV3.blank('/servers/test_inst/action') + req = fakes.HTTPRequestV21.blank('/servers/test_inst/action') body = dict(start="") self.assertRaises(webob.exc.HTTPNotFound, self.controller._start_server, req, 'test_inst', body) @@ -1770,7 +1770,7 @@ class ServersControllerRebuildInstanceTest(ControllerTest): def test_stop_with_bogus_id(self): self.stubs.Set(db, 'instance_get_by_uuid', fake_instance_get_by_uuid_not_found) - req = fakes.HTTPRequestV3.blank('/servers/test_inst/action') + req = fakes.HTTPRequestV21.blank('/servers/test_inst/action') body = dict(stop="") self.assertRaises(webob.exc.HTTPNotFound, self.controller._stop_server, req, 'test_inst', body) @@ -1783,7 +1783,7 @@ class ServersControllerUpdateTest(ControllerTest): fake_get = fakes.fake_compute_get(**options) self.stubs.Set(compute_api.API, 'get', lambda api, *a, **k: fake_get(*a, **k)) - req = fakes.HTTPRequestV3.blank('/servers/%s' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s' % FAKE_UUID) req.method = 'PUT' req.content_type = 'application/json' req.body = jsonutils.dumps(body) @@ -1889,7 +1889,7 @@ class ServerStatusTest(test.TestCase): fakes.fake_instance_get(vm_state=vm_state, task_state=task_state)) - request = fakes.HTTPRequestV3.blank('/servers/%s' % FAKE_UUID) + request = fakes.HTTPRequestV21.blank('/servers/%s' % FAKE_UUID) return self.controller.show(request, FAKE_UUID) def test_active(self): @@ -1915,7 +1915,7 @@ class ServerStatusTest(test.TestCase): rule = {'compute:reboot': common_policy.parse_rule('role:admin')} policy.set_rules(rule) - req = fakes.HTTPRequestV3.blank('/servers/1234/action') + req = fakes.HTTPRequestV21.blank('/servers/1234/action') self.assertRaises(exception.PolicyNotAuthorized, self.controller._action_reboot, req, '1234', body={'reboot': {'type': 'HARD'}}) @@ -1943,7 +1943,7 @@ class ServerStatusTest(test.TestCase): rule = {'compute:confirm_resize': common_policy.parse_rule('role:admin')} policy.set_rules(rule) - req = fakes.HTTPRequestV3.blank('/servers/1234/action') + req = fakes.HTTPRequestV21.blank('/servers/1234/action') self.assertRaises(exception.PolicyNotAuthorized, self.controller._action_confirm_resize, req, '1234', {}) @@ -1965,7 +1965,7 @@ class ServerStatusTest(test.TestCase): rule = {'compute:revert_resize': common_policy.parse_rule('role:admin')} policy.set_rules(rule) - req = fakes.HTTPRequestV3.blank('/servers/1234/action') + req = fakes.HTTPRequestV21.blank('/servers/1234/action') self.assertRaises(exception.PolicyNotAuthorized, self.controller._action_revert_resize, req, '1234', {}) @@ -2424,7 +2424,7 @@ class ServersControllerCreateTest(test.TestCase): }, } - req = fakes.HTTPRequestV3.blank('/servers') + req = fakes.HTTPRequestV21.blank('/servers') req.method = 'POST' req.body = jsonutils.dumps(body) req.headers["content-type"] = "application/json" @@ -2957,7 +2957,7 @@ class ServersViewBuilderTest(test.TestCase): self.uuid = db_inst['uuid'] self.view_builder = views.servers.ViewBuilderV3() - self.request = fakes.HTTPRequestV3.blank("") + self.request = fakes.HTTPRequestV21.blank("") self.request.context = context.RequestContext('fake', 'fake') self.instance = fake_instance.fake_instance_obj( self.request.context, @@ -3460,7 +3460,7 @@ class ServersAllExtensionsTestCase(test.TestCase): self.stubs.Set(compute_api.API, 'create', fake_create) - req = fakes.HTTPRequestV3.blank('/servers') + req = fakes.HTTPRequestV21.blank('/servers') req.method = 'POST' req.content_type = 'application/json' body = {'foo': {'a': 'b'}} @@ -3472,7 +3472,7 @@ class ServersAllExtensionsTestCase(test.TestCase): def test_update_missing_server(self): # Test update with malformed body. - req = fakes.HTTPRequestV3.blank('/servers/1') + req = fakes.HTTPRequestV21.blank('/servers/1') req.method = 'PUT' req.content_type = 'application/json' body = {'foo': {'a': 'b'}} @@ -3493,7 +3493,7 @@ class ServersInvalidRequestTestCase(test.TestCase): self.controller = servers.ServersController(extension_info=ext_info) def _invalid_server_create(self, body): - req = fakes.HTTPRequestV3.blank('/servers') + req = fakes.HTTPRequestV21.blank('/servers') req.method = 'POST' self.assertRaises(exception.ValidationError, @@ -3511,7 +3511,7 @@ class ServersInvalidRequestTestCase(test.TestCase): self._invalid_server_create(body=body) def _unprocessable_server_update(self, body): - req = fakes.HTTPRequestV3.blank('/servers/%s' % FAKE_UUID) + req = fakes.HTTPRequestV21.blank('/servers/%s' % FAKE_UUID) req.method = 'PUT' self.assertRaises(webob.exc.HTTPBadRequest, @@ -3529,7 +3529,7 @@ class ServersInvalidRequestTestCase(test.TestCase): self._invalid_server_create(body=body) -class FakeExt(extensions.V3APIExtensionBase): +class FakeExt(extensions.V21APIExtensionBase): name = "DiskConfig" alias = 'os-disk-config' version = 1 diff --git a/nova/tests/unit/api/openstack/compute/test_user_data.py b/nova/tests/unit/api/openstack/compute/test_user_data.py index 4e7eb2c712cf..485bdb15132f 100644 --- a/nova/tests/unit/api/openstack/compute/test_user_data.py +++ b/nova/tests/unit/api/openstack/compute/test_user_data.py @@ -145,7 +145,7 @@ class ServersControllerCreateTest(test.TestCase): server.pop('imageRef', None) server.update(params) body = dict(server=server) - req = fakes.HTTPRequestV3.blank('/servers') + req = fakes.HTTPRequestV21.blank('/servers') req.method = 'POST' req.body = jsonutils.dumps(body) req.headers["content-type"] = "application/json" diff --git a/nova/tests/unit/api/openstack/fakes.py b/nova/tests/unit/api/openstack/fakes.py index d21e7a7ecd23..79086dcff1ed 100644 --- a/nova/tests/unit/api/openstack/fakes.py +++ b/nova/tests/unit/api/openstack/fakes.py @@ -280,7 +280,7 @@ class HTTPRequest(os_wsgi.Request): return out -class HTTPRequestV3(os_wsgi.Request): +class HTTPRequestV21(os_wsgi.Request): @staticmethod def blank(*args, **kwargs): diff --git a/nova/tests/unit/scheduler/test_scheduler.py b/nova/tests/unit/scheduler/test_scheduler.py index 44c2ca8abfcb..8b8d32282f01 100644 --- a/nova/tests/unit/scheduler/test_scheduler.py +++ b/nova/tests/unit/scheduler/test_scheduler.py @@ -105,12 +105,12 @@ class SchedulerManagerTestCase(test.NoDBTestCase): mock.sentinel.instance_uuids) -class SchedulerV3PassthroughTestCase(test.NoDBTestCase): +class SchedulerV21PassthroughTestCase(test.NoDBTestCase): @mock.patch.object(host_manager.HostManager, '_init_instance_info') @mock.patch.object(host_manager.HostManager, '_init_aggregates') def setUp(self, mock_init_agg, mock_init_inst): - super(SchedulerV3PassthroughTestCase, self).setUp() + super(SchedulerV21PassthroughTestCase, self).setUp() self.manager = manager.SchedulerManager() self.proxy = manager._SchedulerManagerV3Proxy(self.manager)