Remove unnecessary __init__
This is to remove unnecessary __init__ to keep code clean. Change-Id: Ib9f2d39122ea4bb24c864ba13afaf07f4b3a7a33
This commit is contained in:
parent
a074c661e4
commit
79402586ca
|
@ -22,9 +22,6 @@ authorize = extensions.os_compute_soft_authorizer(ALIAS)
|
||||||
|
|
||||||
|
|
||||||
class ExtendedStatusController(wsgi.Controller):
|
class ExtendedStatusController(wsgi.Controller):
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super(ExtendedStatusController, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def _extend_server(self, server, instance):
|
def _extend_server(self, server, instance):
|
||||||
# Note(gmann): Removed 'locked_by' from extended status
|
# Note(gmann): Removed 'locked_by' from extended status
|
||||||
# to make it same as V2. If needed it can be added with
|
# to make it same as V2. If needed it can be added with
|
||||||
|
|
|
@ -23,9 +23,6 @@ soft_authorize = extensions.os_compute_soft_authorizer(ALIAS)
|
||||||
|
|
||||||
|
|
||||||
class ExtendedVolumesController(wsgi.Controller):
|
class ExtendedVolumesController(wsgi.Controller):
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super(ExtendedVolumesController, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def _extend_server(self, context, server, req, bdms):
|
def _extend_server(self, context, server, req, bdms):
|
||||||
volumes_attached = []
|
volumes_attached = []
|
||||||
for bdm in bdms:
|
for bdm in bdms:
|
||||||
|
|
|
@ -43,10 +43,6 @@ def _marshall_flavor_access(flavor):
|
||||||
|
|
||||||
class FlavorAccessController(wsgi.Controller):
|
class FlavorAccessController(wsgi.Controller):
|
||||||
"""The flavor access API controller for the OpenStack API."""
|
"""The flavor access API controller for the OpenStack API."""
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
super(FlavorAccessController, self).__init__()
|
|
||||||
|
|
||||||
@extensions.expected_errors(404)
|
@extensions.expected_errors(404)
|
||||||
def index(self, req, flavor_id):
|
def index(self, req, flavor_id):
|
||||||
context = req.environ['nova.context']
|
context = req.environ['nova.context']
|
||||||
|
|
|
@ -31,10 +31,6 @@ authorize = extensions.os_compute_authorizer(ALIAS)
|
||||||
|
|
||||||
class FlavorExtraSpecsController(wsgi.Controller):
|
class FlavorExtraSpecsController(wsgi.Controller):
|
||||||
"""The flavor extra specs API controller for the OpenStack API."""
|
"""The flavor extra specs API controller for the OpenStack API."""
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super(FlavorExtraSpecsController, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def _get_extra_specs(self, context, flavor_id):
|
def _get_extra_specs(self, context, flavor_id):
|
||||||
flavor = common.get_flavor(context, flavor_id)
|
flavor = common.get_flavor(context, flavor_id)
|
||||||
return dict(extra_specs=flavor.extra_specs)
|
return dict(extra_specs=flavor.extra_specs)
|
||||||
|
|
|
@ -27,10 +27,6 @@ CONF = nova.conf.CONF
|
||||||
|
|
||||||
class API(base.Base):
|
class API(base.Base):
|
||||||
"""API for spinning up or down console proxy connections."""
|
"""API for spinning up or down console proxy connections."""
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
|
||||||
super(API, self).__init__(**kwargs)
|
|
||||||
|
|
||||||
def get_consoles(self, context, instance_uuid):
|
def get_consoles(self, context, instance_uuid):
|
||||||
return self.db.console_get_all_by_instance(context, instance_uuid,
|
return self.db.console_get_all_by_instance(context, instance_uuid,
|
||||||
columns_to_join=['pool'])
|
columns_to_join=['pool'])
|
||||||
|
|
|
@ -89,9 +89,6 @@ class NetworkAPI(base.Base):
|
||||||
"""Base Network API for doing networking operations.
|
"""Base Network API for doing networking operations.
|
||||||
New operations available on specific clients must be added here as well.
|
New operations available on specific clients must be added here as well.
|
||||||
"""
|
"""
|
||||||
def __init__(self, **kwargs):
|
|
||||||
super(NetworkAPI, self).__init__(**kwargs)
|
|
||||||
|
|
||||||
def get_all(self, context):
|
def get_all(self, context):
|
||||||
"""Get all the networks for client."""
|
"""Get all the networks for client."""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
|
@ -50,9 +50,6 @@ class LuksEncryptor(cryptsetup.CryptsetupEncryptor):
|
||||||
|
|
||||||
This VolumeEncryptor uses dm-crypt to encrypt the specified volume.
|
This VolumeEncryptor uses dm-crypt to encrypt the specified volume.
|
||||||
"""
|
"""
|
||||||
def __init__(self, connection_info, **kwargs):
|
|
||||||
super(LuksEncryptor, self).__init__(connection_info, **kwargs)
|
|
||||||
|
|
||||||
def _format_volume(self, passphrase, **kwargs):
|
def _format_volume(self, passphrase, **kwargs):
|
||||||
"""Creates a LUKS header on the volume.
|
"""Creates a LUKS header on the volume.
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,6 @@ class NoOpEncryptor(base.VolumeEncryptor):
|
||||||
volume. This implementation performs no action when a volume is attached
|
volume. This implementation performs no action when a volume is attached
|
||||||
or detached.
|
or detached.
|
||||||
"""
|
"""
|
||||||
def __init__(self, connection_info, **kwargs):
|
|
||||||
super(NoOpEncryptor, self).__init__(connection_info, **kwargs)
|
|
||||||
|
|
||||||
def attach_volume(self, context):
|
def attach_volume(self, context):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue