summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nova/api/openstack/compute/admin_actions.py4
-rw-r--r--nova/api/openstack/compute/admin_password.py4
-rw-r--r--nova/api/openstack/compute/aggregates.py5
-rw-r--r--nova/api/openstack/compute/assisted_volume_snapshots.py2
-rw-r--r--nova/api/openstack/compute/attach_interfaces.py2
-rw-r--r--nova/api/openstack/compute/console_auth_tokens.py4
-rw-r--r--nova/api/openstack/compute/console_output.py4
-rw-r--r--nova/api/openstack/compute/consoles.py1
-rw-r--r--nova/api/openstack/compute/create_backup.py4
-rw-r--r--nova/api/openstack/compute/deferred_delete.py4
-rw-r--r--nova/api/openstack/compute/evacuate.py4
-rw-r--r--nova/api/openstack/compute/flavor_manage.py3
-rw-r--r--nova/api/openstack/compute/floating_ip_pools.py2
-rw-r--r--nova/api/openstack/compute/floating_ips.py6
-rw-r--r--nova/api/openstack/compute/hosts.py2
-rw-r--r--nova/api/openstack/compute/hypervisors.py2
-rw-r--r--nova/api/openstack/compute/image_metadata.py1
-rw-r--r--nova/api/openstack/compute/images.py4
-rw-r--r--nova/api/openstack/compute/instance_usage_audit_log.py2
-rw-r--r--nova/api/openstack/compute/ips.py4
-rw-r--r--nova/api/openstack/compute/keypairs.py2
-rw-r--r--nova/api/openstack/compute/lock_server.py4
-rw-r--r--nova/api/openstack/compute/migrate_server.py4
-rw-r--r--nova/api/openstack/compute/multinic.py4
-rw-r--r--nova/api/openstack/compute/networks.py2
-rw-r--r--nova/api/openstack/compute/networks_associate.py2
-rw-r--r--nova/api/openstack/compute/pause_server.py4
-rw-r--r--nova/api/openstack/compute/quota_classes.py3
-rw-r--r--nova/api/openstack/compute/remote_consoles.py4
-rw-r--r--nova/api/openstack/compute/rescue.py4
-rw-r--r--nova/api/openstack/compute/security_group_default_rules.py1
-rw-r--r--nova/api/openstack/compute/security_groups.py5
-rw-r--r--nova/api/openstack/compute/server_diagnostics.py4
-rw-r--r--nova/api/openstack/compute/server_external_events.py2
-rw-r--r--nova/api/openstack/compute/server_metadata.py2
-rw-r--r--nova/api/openstack/compute/server_migrations.py2
-rw-r--r--nova/api/openstack/compute/server_password.py1
-rw-r--r--nova/api/openstack/compute/server_tags.py2
-rw-r--r--nova/api/openstack/compute/servers.py5
-rw-r--r--nova/api/openstack/compute/services.py1
-rw-r--r--nova/api/openstack/compute/shelve.py4
-rw-r--r--nova/api/openstack/compute/suspend_server.py4
-rw-r--r--nova/api/openstack/compute/tenant_networks.py2
-rw-r--r--nova/api/openstack/compute/volumes.py2
-rw-r--r--nova/api/openstack/wsgi.py6
45 files changed, 75 insertions, 65 deletions
diff --git a/nova/api/openstack/compute/admin_actions.py b/nova/api/openstack/compute/admin_actions.py
index 9db60fc6d5..1873dabe39 100644
--- a/nova/api/openstack/compute/admin_actions.py
+++ b/nova/api/openstack/compute/admin_actions.py
@@ -30,8 +30,8 @@ state_map = dict(active=vm_states.ACTIVE, error=vm_states.ERROR)
class AdminActionsController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(AdminActionsController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(AdminActionsController, self).__init__()
self.compute_api = compute.API()
@wsgi.response(202)
diff --git a/nova/api/openstack/compute/admin_password.py b/nova/api/openstack/compute/admin_password.py
index 7f9410e783..36c6cbcf1e 100644
--- a/nova/api/openstack/compute/admin_password.py
+++ b/nova/api/openstack/compute/admin_password.py
@@ -26,8 +26,8 @@ from nova.policies import admin_password as ap_policies
class AdminPasswordController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(AdminPasswordController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(AdminPasswordController, self).__init__()
self.compute_api = compute.API()
# TODO(eliqiao): Here should be 204(No content) instead of 202 by v2.1+
diff --git a/nova/api/openstack/compute/aggregates.py b/nova/api/openstack/compute/aggregates.py
index e44b449e76..7f2e29d45a 100644
--- a/nova/api/openstack/compute/aggregates.py
+++ b/nova/api/openstack/compute/aggregates.py
@@ -24,7 +24,7 @@ from nova.api.openstack import common
from nova.api.openstack.compute.schemas import aggregates
from nova.api.openstack import wsgi
from nova.api import validation
-from nova.compute import api as compute_api
+from nova.compute import api as compute
from nova import exception
from nova.i18n import _
from nova.policies import aggregates as aggr_policies
@@ -37,7 +37,8 @@ def _get_context(req):
class AggregateController(wsgi.Controller):
"""The Host Aggregates API controller for the OpenStack API."""
def __init__(self):
- self.api = compute_api.AggregateAPI()
+ super(AggregateController, self).__init__()
+ self.api = compute.AggregateAPI()
@wsgi.expected_errors(())
def index(self, req):
diff --git a/nova/api/openstack/compute/assisted_volume_snapshots.py b/nova/api/openstack/compute/assisted_volume_snapshots.py
index b946ce7957..29039a09cc 100644
--- a/nova/api/openstack/compute/assisted_volume_snapshots.py
+++ b/nova/api/openstack/compute/assisted_volume_snapshots.py
@@ -32,8 +32,8 @@ class AssistedVolumeSnapshotsController(wsgi.Controller):
"""The Assisted volume snapshots API controller for the OpenStack API."""
def __init__(self):
- self.compute_api = compute.API()
super(AssistedVolumeSnapshotsController, self).__init__()
+ self.compute_api = compute.API()
@wsgi.expected_errors(400)
@validation.schema(assisted_volume_snapshots.snapshots_create)
diff --git a/nova/api/openstack/compute/attach_interfaces.py b/nova/api/openstack/compute/attach_interfaces.py
index 465cee4106..1230e65591 100644
--- a/nova/api/openstack/compute/attach_interfaces.py
+++ b/nova/api/openstack/compute/attach_interfaces.py
@@ -59,9 +59,9 @@ class InterfaceAttachmentController(wsgi.Controller):
"""The interface attachment API controller for the OpenStack API."""
def __init__(self):
+ super(InterfaceAttachmentController, self).__init__()
self.compute_api = compute.API()
self.network_api = network.API()
- super(InterfaceAttachmentController, self).__init__()
@wsgi.expected_errors((404, 501))
def index(self, req, server_id):
diff --git a/nova/api/openstack/compute/console_auth_tokens.py b/nova/api/openstack/compute/console_auth_tokens.py
index a85b6a3542..e8066b1f8d 100644
--- a/nova/api/openstack/compute/console_auth_tokens.py
+++ b/nova/api/openstack/compute/console_auth_tokens.py
@@ -27,9 +27,9 @@ CONF = nova.conf.CONF
class ConsoleAuthTokensController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
+ def __init__(self):
+ super(ConsoleAuthTokensController, self).__init__()
self._consoleauth_rpcapi = consoleauth_rpcapi.ConsoleAuthAPI()
- super(ConsoleAuthTokensController, self).__init__(*args, **kwargs)
def _show(self, req, id, rdp_only):
"""Checks a console auth token and returns the related connect info."""
diff --git a/nova/api/openstack/compute/console_output.py b/nova/api/openstack/compute/console_output.py
index fb59855348..93285cc55c 100644
--- a/nova/api/openstack/compute/console_output.py
+++ b/nova/api/openstack/compute/console_output.py
@@ -28,8 +28,8 @@ from nova.policies import console_output as co_policies
class ConsoleOutputController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(ConsoleOutputController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(ConsoleOutputController, self).__init__()
self.compute_api = compute.API()
@wsgi.expected_errors((404, 409, 501))
diff --git a/nova/api/openstack/compute/consoles.py b/nova/api/openstack/compute/consoles.py
index 3e332d78f9..f83f3bea71 100644
--- a/nova/api/openstack/compute/consoles.py
+++ b/nova/api/openstack/compute/consoles.py
@@ -45,6 +45,7 @@ class ConsolesController(wsgi.Controller):
"""The Consoles controller for the OpenStack API."""
def __init__(self):
+ super(ConsolesController, self).__init__()
self.console_api = console_api.API()
@wsgi.expected_errors(())
diff --git a/nova/api/openstack/compute/create_backup.py b/nova/api/openstack/compute/create_backup.py
index 482522ca8d..3ae8037c80 100644
--- a/nova/api/openstack/compute/create_backup.py
+++ b/nova/api/openstack/compute/create_backup.py
@@ -26,8 +26,8 @@ from nova.policies import create_backup as cb_policies
class CreateBackupController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(CreateBackupController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(CreateBackupController, self).__init__()
self.compute_api = compute.API()
@wsgi.response(202)
diff --git a/nova/api/openstack/compute/deferred_delete.py b/nova/api/openstack/compute/deferred_delete.py
index cdd42c966e..0001c9942d 100644
--- a/nova/api/openstack/compute/deferred_delete.py
+++ b/nova/api/openstack/compute/deferred_delete.py
@@ -25,8 +25,8 @@ from nova.policies import deferred_delete as dd_policies
class DeferredDeleteController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(DeferredDeleteController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(DeferredDeleteController, self).__init__()
self.compute_api = compute.API()
@wsgi.response(202)
diff --git a/nova/api/openstack/compute/evacuate.py b/nova/api/openstack/compute/evacuate.py
index 7f003f27fe..180da2a0d1 100644
--- a/nova/api/openstack/compute/evacuate.py
+++ b/nova/api/openstack/compute/evacuate.py
@@ -33,8 +33,8 @@ CONF = nova.conf.CONF
class EvacuateController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(EvacuateController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(EvacuateController, self).__init__()
self.compute_api = compute.API()
self.host_api = compute.HostAPI()
self.network_api = network.API()
diff --git a/nova/api/openstack/compute/flavor_manage.py b/nova/api/openstack/compute/flavor_manage.py
index 44c72bb8b4..abd7a7f726 100644
--- a/nova/api/openstack/compute/flavor_manage.py
+++ b/nova/api/openstack/compute/flavor_manage.py
@@ -28,9 +28,6 @@ class FlavorManageController(wsgi.Controller):
"""The Flavor Lifecycle API controller for the OpenStack API."""
_view_builder_class = flavors_view.ViewBuilder
- def __init__(self):
- super(FlavorManageController, self).__init__()
-
# NOTE(oomichi): Return 202 for backwards compatibility but should be
# 204 as this operation complete the deletion of aggregate resource and
# return no response body.
diff --git a/nova/api/openstack/compute/floating_ip_pools.py b/nova/api/openstack/compute/floating_ip_pools.py
index d0b4690f0d..0c0ea0cb75 100644
--- a/nova/api/openstack/compute/floating_ip_pools.py
+++ b/nova/api/openstack/compute/floating_ip_pools.py
@@ -36,8 +36,8 @@ class FloatingIPPoolsController(wsgi.Controller):
"""The Floating IP Pool API controller for the OpenStack API."""
def __init__(self):
- self.network_api = network.API()
super(FloatingIPPoolsController, self).__init__()
+ self.network_api = network.API()
@wsgi.Controller.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
@wsgi.expected_errors(())
diff --git a/nova/api/openstack/compute/floating_ips.py b/nova/api/openstack/compute/floating_ips.py
index 70dea4d915..d27185f7ee 100644
--- a/nova/api/openstack/compute/floating_ips.py
+++ b/nova/api/openstack/compute/floating_ips.py
@@ -106,9 +106,9 @@ class FloatingIPController(wsgi.Controller):
"""The Floating IPs API controller for the OpenStack API."""
def __init__(self):
+ super(FloatingIPController, self).__init__()
self.compute_api = compute.API()
self.network_api = network.API()
- super(FloatingIPController, self).__init__()
@wsgi.Controller.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
@wsgi.expected_errors((400, 404))
@@ -204,8 +204,8 @@ class FloatingIPController(wsgi.Controller):
class FloatingIPActionController(wsgi.Controller):
"""This API is deprecated from the Microversion '2.44'."""
- def __init__(self, *args, **kwargs):
- super(FloatingIPActionController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(FloatingIPActionController, self).__init__()
self.compute_api = compute.API()
self.network_api = network.API()
diff --git a/nova/api/openstack/compute/hosts.py b/nova/api/openstack/compute/hosts.py
index 26c2f8a7da..31424b24b0 100644
--- a/nova/api/openstack/compute/hosts.py
+++ b/nova/api/openstack/compute/hosts.py
@@ -35,8 +35,8 @@ LOG = logging.getLogger(__name__)
class HostController(wsgi.Controller):
"""The Hosts API controller for the OpenStack API."""
def __init__(self):
- self.api = compute.HostAPI()
super(HostController, self).__init__()
+ self.api = compute.HostAPI()
@wsgi.Controller.api_version("2.1", "2.42")
@validation.query_schema(hosts.index_query)
diff --git a/nova/api/openstack/compute/hypervisors.py b/nova/api/openstack/compute/hypervisors.py
index 7d5435d099..a9184edb18 100644
--- a/nova/api/openstack/compute/hypervisors.py
+++ b/nova/api/openstack/compute/hypervisors.py
@@ -45,9 +45,9 @@ class HypervisorsController(wsgi.Controller):
_view_builder_class = hyper_view.ViewBuilder
def __init__(self):
+ super(HypervisorsController, self).__init__()
self.host_api = compute.HostAPI()
self.servicegroup_api = servicegroup.API()
- super(HypervisorsController, self).__init__()
def _view_hypervisor(self, hypervisor, service, detail, req, servers=None,
**kwargs):
diff --git a/nova/api/openstack/compute/image_metadata.py b/nova/api/openstack/compute/image_metadata.py
index f707106184..873e5efd86 100644
--- a/nova/api/openstack/compute/image_metadata.py
+++ b/nova/api/openstack/compute/image_metadata.py
@@ -31,6 +31,7 @@ class ImageMetadataController(wsgi.Controller):
"""The image metadata API controller for the OpenStack API."""
def __init__(self):
+ super(ImageMetadataController, self).__init__()
self.image_api = nova.image.API()
def _get_image(self, context, image_id):
diff --git a/nova/api/openstack/compute/images.py b/nova/api/openstack/compute/images.py
index f2fb243145..0adcc6dec5 100644
--- a/nova/api/openstack/compute/images.py
+++ b/nova/api/openstack/compute/images.py
@@ -42,8 +42,8 @@ class ImagesController(wsgi.Controller):
_view_builder_class = views_images.ViewBuilder
- def __init__(self, **kwargs):
- super(ImagesController, self).__init__(**kwargs)
+ def __init__(self):
+ super(ImagesController, self).__init__()
self._image_api = nova.image.API()
def _get_filters(self, req):
diff --git a/nova/api/openstack/compute/instance_usage_audit_log.py b/nova/api/openstack/compute/instance_usage_audit_log.py
index f623a5ad10..93d39136b2 100644
--- a/nova/api/openstack/compute/instance_usage_audit_log.py
+++ b/nova/api/openstack/compute/instance_usage_audit_log.py
@@ -27,7 +27,9 @@ from nova import utils
class InstanceUsageAuditLogController(wsgi.Controller):
+
def __init__(self):
+ super(InstanceUsageAuditLogController, self).__init__()
self.host_api = compute.HostAPI()
@wsgi.expected_errors(())
diff --git a/nova/api/openstack/compute/ips.py b/nova/api/openstack/compute/ips.py
index 9a2bccd9f7..8583404352 100644
--- a/nova/api/openstack/compute/ips.py
+++ b/nova/api/openstack/compute/ips.py
@@ -31,8 +31,8 @@ class IPsController(wsgi.Controller):
# microversion by using V2.1 view builder.
_view_builder_class = views_addresses.ViewBuilder
- def __init__(self, **kwargs):
- super(IPsController, self).__init__(**kwargs)
+ def __init__(self):
+ super(IPsController, self).__init__()
self._compute_api = compute.API()
@wsgi.expected_errors(404)
diff --git a/nova/api/openstack/compute/keypairs.py b/nova/api/openstack/compute/keypairs.py
index 34ca12d698..b3dec117f7 100644
--- a/nova/api/openstack/compute/keypairs.py
+++ b/nova/api/openstack/compute/keypairs.py
@@ -38,8 +38,8 @@ class KeypairController(wsgi.Controller):
_view_builder_class = keypairs_view.ViewBuilder
def __init__(self):
- self.api = compute_api.KeypairAPI()
super(KeypairController, self).__init__()
+ self.api = compute_api.KeypairAPI()
def _filter_keypair(self, keypair, **attrs):
# TODO(claudiub): After v2 and v2.1 is no longer supported,
diff --git a/nova/api/openstack/compute/lock_server.py b/nova/api/openstack/compute/lock_server.py
index ba770c9f70..71ea8408ef 100644
--- a/nova/api/openstack/compute/lock_server.py
+++ b/nova/api/openstack/compute/lock_server.py
@@ -23,8 +23,8 @@ from nova.policies import lock_server as ls_policies
class LockServerController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(LockServerController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(LockServerController, self).__init__()
self.compute_api = compute.API()
@wsgi.response(202)
diff --git a/nova/api/openstack/compute/migrate_server.py b/nova/api/openstack/compute/migrate_server.py
index 05d3210c7f..3a3f84158f 100644
--- a/nova/api/openstack/compute/migrate_server.py
+++ b/nova/api/openstack/compute/migrate_server.py
@@ -33,8 +33,8 @@ LOG = logging.getLogger(__name__)
class MigrateServerController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(MigrateServerController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(MigrateServerController, self).__init__()
self.compute_api = compute.API()
self.network_api = network.API()
diff --git a/nova/api/openstack/compute/multinic.py b/nova/api/openstack/compute/multinic.py
index 2b7c222d57..89e9b01e02 100644
--- a/nova/api/openstack/compute/multinic.py
+++ b/nova/api/openstack/compute/multinic.py
@@ -29,8 +29,8 @@ from nova.policies import multinic as multinic_policies
class MultinicController(wsgi.Controller):
"""This API is deprecated from Microversion '2.44'."""
- def __init__(self, *args, **kwargs):
- super(MultinicController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(MultinicController, self).__init__()
self.compute_api = compute.API()
@wsgi.Controller.api_version("2.1", "2.43")
diff --git a/nova/api/openstack/compute/networks.py b/nova/api/openstack/compute/networks.py
index cff450941b..efd14253e3 100644
--- a/nova/api/openstack/compute/networks.py
+++ b/nova/api/openstack/compute/networks.py
@@ -79,6 +79,8 @@ def network_dict(context, network):
class NetworkController(wsgi.Controller):
def __init__(self, network_api=None):
+ super(NetworkController, self).__init__()
+ # TODO(stephenfin): 'network_api' is only being passed for use by tests
self.network_api = network_api or network.API()
@wsgi.Controller.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
diff --git a/nova/api/openstack/compute/networks_associate.py b/nova/api/openstack/compute/networks_associate.py
index 27a128d92c..b4f0e9a83b 100644
--- a/nova/api/openstack/compute/networks_associate.py
+++ b/nova/api/openstack/compute/networks_associate.py
@@ -28,6 +28,8 @@ class NetworkAssociateActionController(wsgi.Controller):
"""Network Association API Controller."""
def __init__(self, network_api=None):
+ super(NetworkAssociateActionController, self).__init__()
+ # TODO(stephenfin): 'network_api' is only being passed for use by tests
self.network_api = network_api or network.API()
@wsgi.Controller.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
diff --git a/nova/api/openstack/compute/pause_server.py b/nova/api/openstack/compute/pause_server.py
index 44e1f10bb6..cc0a186b36 100644
--- a/nova/api/openstack/compute/pause_server.py
+++ b/nova/api/openstack/compute/pause_server.py
@@ -23,8 +23,8 @@ from nova.policies import pause_server as ps_policies
class PauseServerController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(PauseServerController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(PauseServerController, self).__init__()
self.compute_api = compute.API()
@wsgi.response(202)
diff --git a/nova/api/openstack/compute/quota_classes.py b/nova/api/openstack/compute/quota_classes.py
index 3a0f57bc96..bc4169b8e4 100644
--- a/nova/api/openstack/compute/quota_classes.py
+++ b/nova/api/openstack/compute/quota_classes.py
@@ -47,7 +47,8 @@ class QuotaClassSetsController(wsgi.Controller):
supported_quotas = []
- def __init__(self, **kwargs):
+ def __init__(self):
+ super(QuotaClassSetsController, self).__init__()
self.supported_quotas = QUOTAS.resources
def _format_quota_set(self, quota_class, quota_set, filtered_quotas=None,
diff --git a/nova/api/openstack/compute/remote_consoles.py b/nova/api/openstack/compute/remote_consoles.py
index 686ff802ec..8bf043087b 100644
--- a/nova/api/openstack/compute/remote_consoles.py
+++ b/nova/api/openstack/compute/remote_consoles.py
@@ -24,14 +24,14 @@ from nova.policies import remote_consoles as rc_policies
class RemoteConsolesController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
+ def __init__(self):
+ super(RemoteConsolesController, self).__init__()
self.compute_api = compute.API()
self.handlers = {'vnc': self.compute_api.get_vnc_console,
'spice': self.compute_api.get_spice_console,
'rdp': self.compute_api.get_rdp_console,
'serial': self.compute_api.get_serial_console,
'mks': self.compute_api.get_mks_console}
- super(RemoteConsolesController, self).__init__(*args, **kwargs)
@wsgi.Controller.api_version("2.1", "2.5")
@wsgi.expected_errors((400, 404, 409, 501))
diff --git a/nova/api/openstack/compute/rescue.py b/nova/api/openstack/compute/rescue.py
index 683643c9d7..4f83d53656 100644
--- a/nova/api/openstack/compute/rescue.py
+++ b/nova/api/openstack/compute/rescue.py
@@ -30,8 +30,8 @@ CONF = nova.conf.CONF
class RescueController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(RescueController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(RescueController, self).__init__()
self.compute_api = compute.API()
# TODO(cyeoh): Should be responding here with 202 Accept
diff --git a/nova/api/openstack/compute/security_group_default_rules.py b/nova/api/openstack/compute/security_group_default_rules.py
index d208cd93fd..358d6e9ae6 100644
--- a/nova/api/openstack/compute/security_group_default_rules.py
+++ b/nova/api/openstack/compute/security_group_default_rules.py
@@ -28,6 +28,7 @@ class SecurityGroupDefaultRulesController(sg.SecurityGroupControllerBase,
wsgi.Controller):
def __init__(self):
+ super(SecurityGroupDefaultRulesController, self).__init__()
self.security_group_api = (
openstack_driver.get_openstack_security_group_driver())
diff --git a/nova/api/openstack/compute/security_groups.py b/nova/api/openstack/compute/security_groups.py
index 8267cfcba9..5ac636947a 100644
--- a/nova/api/openstack/compute/security_groups.py
+++ b/nova/api/openstack/compute/security_groups.py
@@ -47,6 +47,7 @@ class SecurityGroupControllerBase(object):
"""Base class for Security Group controllers."""
def __init__(self):
+ super(SecurityGroupControllerBase, self).__init__()
self.security_group_api = (
openstack_driver.get_openstack_security_group_driver())
self.compute_api = compute.API(
@@ -405,8 +406,8 @@ class ServerSecurityGroupController(SecurityGroupControllerBase):
class SecurityGroupActionController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(SecurityGroupActionController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(SecurityGroupActionController, self).__init__()
self.security_group_api = (
openstack_driver.get_openstack_security_group_driver())
self.compute_api = compute.API(
diff --git a/nova/api/openstack/compute/server_diagnostics.py b/nova/api/openstack/compute/server_diagnostics.py
index aab601e055..f559dd0365 100644
--- a/nova/api/openstack/compute/server_diagnostics.py
+++ b/nova/api/openstack/compute/server_diagnostics.py
@@ -27,8 +27,8 @@ from nova.policies import server_diagnostics as sd_policies
class ServerDiagnosticsController(wsgi.Controller):
_view_builder_class = server_diagnostics.ViewBuilder
- def __init__(self, *args, **kwargs):
- super(ServerDiagnosticsController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(ServerDiagnosticsController, self).__init__()
self.compute_api = compute.API()
@wsgi.expected_errors((400, 404, 409, 501))
diff --git a/nova/api/openstack/compute/server_external_events.py b/nova/api/openstack/compute/server_external_events.py
index 7236aed6ca..1b05556754 100644
--- a/nova/api/openstack/compute/server_external_events.py
+++ b/nova/api/openstack/compute/server_external_events.py
@@ -31,8 +31,8 @@ LOG = logging.getLogger(__name__)
class ServerExternalEventsController(wsgi.Controller):
def __init__(self):
- self.compute_api = compute.API()
super(ServerExternalEventsController, self).__init__()
+ self.compute_api = compute.API()
@staticmethod
def _is_event_tag_present_when_required(event):
diff --git a/nova/api/openstack/compute/server_metadata.py b/nova/api/openstack/compute/server_metadata.py
index b414b86f9b..ca429029ab 100644
--- a/nova/api/openstack/compute/server_metadata.py
+++ b/nova/api/openstack/compute/server_metadata.py
@@ -30,8 +30,8 @@ class ServerMetadataController(wsgi.Controller):
"""The server metadata API controller for the OpenStack API."""
def __init__(self):
- self.compute_api = compute.API()
super(ServerMetadataController, self).__init__()
+ self.compute_api = compute.API()
def _get_metadata(self, context, server_id):
server = common.get_instance(self.compute_api, context, server_id)
diff --git a/nova/api/openstack/compute/server_migrations.py b/nova/api/openstack/compute/server_migrations.py
index e3d46c070a..6f92ac99bc 100644
--- a/nova/api/openstack/compute/server_migrations.py
+++ b/nova/api/openstack/compute/server_migrations.py
@@ -59,8 +59,8 @@ class ServerMigrationsController(wsgi.Controller):
"""The server migrations API controller for the OpenStack API."""
def __init__(self):
- self.compute_api = compute.API()
super(ServerMigrationsController, self).__init__()
+ self.compute_api = compute.API()
@wsgi.Controller.api_version("2.22")
@wsgi.response(202)
diff --git a/nova/api/openstack/compute/server_password.py b/nova/api/openstack/compute/server_password.py
index a837fae017..1d1bc251db 100644
--- a/nova/api/openstack/compute/server_password.py
+++ b/nova/api/openstack/compute/server_password.py
@@ -25,6 +25,7 @@ from nova.policies import server_password as sp_policies
class ServerPasswordController(wsgi.Controller):
"""The Server Password API controller for the OpenStack API."""
def __init__(self):
+ super(ServerPasswordController, self).__init__()
self.compute_api = compute.API()
@wsgi.expected_errors(404)
diff --git a/nova/api/openstack/compute/server_tags.py b/nova/api/openstack/compute/server_tags.py
index 220ef612fe..d2a00fc2b9 100644
--- a/nova/api/openstack/compute/server_tags.py
+++ b/nova/api/openstack/compute/server_tags.py
@@ -45,8 +45,8 @@ class ServerTagsController(wsgi.Controller):
_view_builder_class = server_tags.ViewBuilder
def __init__(self):
- self.compute_api = compute.API()
super(ServerTagsController, self).__init__()
+ self.compute_api = compute.API()
def _check_instance_in_valid_state(self, context, server_id, action):
instance = common.get_instance(self.compute_api, context, server_id)
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index b037956bb7..5507bce6c6 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -104,9 +104,8 @@ class ServersController(wsgi.Controller):
# Convenience return
return robj
- def __init__(self, **kwargs):
-
- super(ServersController, self).__init__(**kwargs)
+ def __init__(self):
+ super(ServersController, self).__init__()
self.compute_api = compute.API()
self.network_api = network_api.API()
diff --git a/nova/api/openstack/compute/services.py b/nova/api/openstack/compute/services.py
index 9180c63f4f..89531900d2 100644
--- a/nova/api/openstack/compute/services.py
+++ b/nova/api/openstack/compute/services.py
@@ -37,6 +37,7 @@ PARTIAL_CONSTRUCT_FOR_CELL_DOWN_MIN_VERSION = '2.69'
class ServiceController(wsgi.Controller):
def __init__(self):
+ super(ServiceController, self).__init__()
self.host_api = compute.HostAPI()
self.aggregate_api = compute.AggregateAPI()
self.servicegroup_api = servicegroup.API()
diff --git a/nova/api/openstack/compute/shelve.py b/nova/api/openstack/compute/shelve.py
index 3ae4d6c8bd..92efe3ebf7 100644
--- a/nova/api/openstack/compute/shelve.py
+++ b/nova/api/openstack/compute/shelve.py
@@ -27,8 +27,8 @@ from nova.policies import shelve as shelve_policies
class ShelveController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(ShelveController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(ShelveController, self).__init__()
self.compute_api = compute.API()
self.network_api = network.API()
diff --git a/nova/api/openstack/compute/suspend_server.py b/nova/api/openstack/compute/suspend_server.py
index 0993b5f909..dd576684b7 100644
--- a/nova/api/openstack/compute/suspend_server.py
+++ b/nova/api/openstack/compute/suspend_server.py
@@ -22,8 +22,8 @@ from nova.policies import suspend_server as ss_policies
class SuspendServerController(wsgi.Controller):
- def __init__(self, *args, **kwargs):
- super(SuspendServerController, self).__init__(*args, **kwargs)
+ def __init__(self):
+ super(SuspendServerController, self).__init__()
self.compute_api = compute.API()
@wsgi.response(202)
diff --git a/nova/api/openstack/compute/tenant_networks.py b/nova/api/openstack/compute/tenant_networks.py
index 2187dc6496..b550c89ec1 100644
--- a/nova/api/openstack/compute/tenant_networks.py
+++ b/nova/api/openstack/compute/tenant_networks.py
@@ -52,6 +52,8 @@ def network_dict(network):
class TenantNetworkController(wsgi.Controller):
def __init__(self, network_api=None):
+ super(TenantNetworkController, self).__init__()
+ # TODO(stephenfin): 'network_api' is only being passed for use by tests
self.network_api = nova.network.API()
self._default_networks = []
diff --git a/nova/api/openstack/compute/volumes.py b/nova/api/openstack/compute/volumes.py
index f7c5357e6d..c22e3e1db1 100644
--- a/nova/api/openstack/compute/volumes.py
+++ b/nova/api/openstack/compute/volumes.py
@@ -96,8 +96,8 @@ class VolumeController(wsgi.Controller):
"""The Volumes API controller for the OpenStack API."""
def __init__(self):
- self.volume_api = cinder.API()
super(VolumeController, self).__init__()
+ self.volume_api = cinder.API()
@wsgi.Controller.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
@wsgi.expected_errors(404)
diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py
index b9a9b9c741..3e8ff376d2 100644
--- a/nova/api/openstack/wsgi.py
+++ b/nova/api/openstack/wsgi.py
@@ -756,11 +756,9 @@ class Controller(object):
_view_builder_class = None
- def __init__(self, view_builder=None):
+ def __init__(self):
"""Initialize controller with a view builder instance."""
- if view_builder:
- self._view_builder = view_builder
- elif self._view_builder_class:
+ if self._view_builder_class:
self._view_builder = self._view_builder_class()
else:
self._view_builder = None