From d1c7cdb8c01acb62400de49913c0a7afe5145db6 Mon Sep 17 00:00:00 2001 From: zhufl Date: Mon, 4 Jul 2016 10:35:18 +0800 Subject: [PATCH] Remove unused __init__ This is to remove unnecessary __init__ to keep code clean. Change-Id: I8952de0ceae58268fd54d6a96228b091bf18ea90 --- cinder/api/contrib/volume_type_access.py | 3 --- cinder/volume/api.py | 3 --- cinder/volume/flows/manager/manage_existing_snapshot.py | 4 ---- cinder/volume/targets/fake.py | 3 --- cinder/volume/targets/iscsi.py | 3 --- cinder/volume/targets/tgt.py | 3 --- 6 files changed, 19 deletions(-) diff --git a/cinder/api/contrib/volume_type_access.py b/cinder/api/contrib/volume_type_access.py index 569379009..0876c1db1 100644 --- a/cinder/api/contrib/volume_type_access.py +++ b/cinder/api/contrib/volume_type_access.py @@ -41,9 +41,6 @@ def _marshall_volume_type_access(vol_type): class VolumeTypeAccessController(object): """The volume type access API controller for the OpenStack API.""" - def __init__(self): - super(VolumeTypeAccessController, self).__init__() - def index(self, req, type_id): context = req.environ['cinder.context'] authorize(context) diff --git a/cinder/volume/api.py b/cinder/volume/api.py index 46c379c28..5e06f91ef 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -1696,9 +1696,6 @@ class API(base.Base): class HostAPI(base.Base): - def __init__(self): - super(HostAPI, self).__init__() - """Sub-set of the Volume Manager API for managing host operations.""" def set_host_enabled(self, context, host, enabled): """Sets the specified host's ability to accept new volumes.""" diff --git a/cinder/volume/flows/manager/manage_existing_snapshot.py b/cinder/volume/flows/manager/manage_existing_snapshot.py index ff1ab991e..68ac431c7 100644 --- a/cinder/volume/flows/manager/manage_existing_snapshot.py +++ b/cinder/volume/flows/manager/manage_existing_snapshot.py @@ -270,10 +270,6 @@ class CreateSnapshotOnFinishTask(NotifySnapshotActionTask): Reversion strategy: N/A """ - def __init__(self, db, event_suffix, host): - super(CreateSnapshotOnFinishTask, self).__init__(db, event_suffix, - host) - def execute(self, context, snapshot, new_status): LOG.debug("Begin to call CreateSnapshotOnFinishTask execute.") snapshot_id = snapshot['id'] diff --git a/cinder/volume/targets/fake.py b/cinder/volume/targets/fake.py index 17883dd79..97841bbac 100644 --- a/cinder/volume/targets/fake.py +++ b/cinder/volume/targets/fake.py @@ -16,9 +16,6 @@ from cinder.volume.targets import iscsi class FakeTarget(iscsi.ISCSITarget): VERSION = '0.1' - def __init__(self, *args, **kwargs): - super(FakeTarget, self).__init__(*args, **kwargs) - def _get_target_and_lun(self, context, volume): return(0, 0) diff --git a/cinder/volume/targets/iscsi.py b/cinder/volume/targets/iscsi.py index e4917a9de..967882581 100644 --- a/cinder/volume/targets/iscsi.py +++ b/cinder/volume/targets/iscsi.py @@ -364,9 +364,6 @@ class SanISCSITarget(ISCSITarget): and local block devices when we create and manage our own targets. """ - def __init__(self, *args, **kwargs): - super(SanISCSITarget, self).__init__(*args, **kwargs) - @abc.abstractmethod def create_export(self, context, volume, volume_path): pass diff --git a/cinder/volume/targets/tgt.py b/cinder/volume/targets/tgt.py index ee3ab9cc2..e7f7377a1 100644 --- a/cinder/volume/targets/tgt.py +++ b/cinder/volume/targets/tgt.py @@ -45,9 +45,6 @@ class TgtAdm(iscsi.ISCSITarget): """) - def __init__(self, *args, **kwargs): - super(TgtAdm, self).__init__(*args, **kwargs) - def _get_target(self, iqn): (out, err) = utils.execute('tgt-admin', '--show', run_as_root=True) lines = out.split('\n')