Removed Extra code
Some extra code is present like unused variables, unreachable code after return statement etc. Same is removed. Change-Id: Ifca88a19625c56ed520321ecbdd91739a304be8e
This commit is contained in:
parent
9261687395
commit
b83835d618
@ -10,8 +10,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import json
|
||||
|
||||
from cinderclient.tests.unit.fixture_data import base
|
||||
|
||||
|
||||
@ -48,16 +46,6 @@ class Fixture(base.Fixture):
|
||||
|
||||
def action_1234(request, context):
|
||||
return ''
|
||||
body = json.loads(request.body.decode('utf-8'))
|
||||
assert len(list(body)) == 1
|
||||
action = list(body)[0]
|
||||
if action == 'os-reset_status':
|
||||
assert 'status' in body['os-reset_status']
|
||||
elif action == 'os-update_snapshot_status':
|
||||
assert 'status' in body['os-update_snapshot_status']
|
||||
else:
|
||||
raise AssertionError("Unexpected action: %s" % action)
|
||||
return ''
|
||||
|
||||
self.requests.register_uri(
|
||||
'POST', self.url('1234', 'action'),
|
||||
|
@ -236,11 +236,6 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
})
|
||||
return r, body
|
||||
|
||||
if hasattr(status, 'items'):
|
||||
return utils.TestResponse(status), body
|
||||
else:
|
||||
return utils.TestResponse({"status": status}), body
|
||||
|
||||
def get_volume_api_version_from_endpoint(self):
|
||||
magic_tuple = urlparse.urlsplit(self.management_url)
|
||||
scheme, netloc, path, query, frag = magic_tuple
|
||||
|
@ -27,7 +27,6 @@ from cinderclient import base
|
||||
|
||||
class VolumeTransfer(base.Resource):
|
||||
"""Transfer a volume from one tenant to another"""
|
||||
NAME_ATTR = "display_name"
|
||||
|
||||
def __repr__(self):
|
||||
return "<VolumeTransfer: %s>" % self.id
|
||||
|
@ -2448,7 +2448,6 @@ def do_consisgroup_update(cs, args):
|
||||
@utils.service_type('volumev2')
|
||||
def do_cgsnapshot_list(cs, args):
|
||||
"""Lists all cgsnapshots."""
|
||||
cgsnapshots = cs.cgsnapshots.list()
|
||||
|
||||
all_tenants = int(os.environ.get("ALL_TENANTS", args.all_tenants))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user