]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove duplicate keys from dictionary
authorRavi Shekhar Jethani <ravishekar.jethani@nttdata.com>
Tue, 17 Nov 2015 12:03:38 +0000 (04:03 -0800)
committerRavi Shekhar Jethani <ravishekar.jethani@nttdata.com>
Tue, 17 Nov 2015 12:03:38 +0000 (04:03 -0800)
There are few places where duplicate keys are added in the dictionary.
Removed all such occurrences throughout the code.

Trivial Fix

Change-Id: I2e674aed2cd04d2c78cfb44d8ed525c68be79ab1

cinder/tests/unit/api/contrib/test_volume_host_attribute.py
cinder/tests/unit/api/contrib/test_volume_image_metadata.py
cinder/tests/unit/test_huawei_drivers.py

index f6fe4919cf5ab1f087e1873c19b0a02161ef0405..897c4791ba512aabb5f0e3a1cc23978770bcaaeb 100644 (file)
@@ -36,7 +36,6 @@ def fake_db_volume_get(*args, **kwargs):
         'size': 5,
         'availability_zone': 'somewhere',
         'created_at': timeutils.utcnow(),
-        'attach_status': None,
         'display_name': 'anothervolume',
         'display_description': 'Just another volume!',
         'volume_type_id': None,
index eaa5f5fd178021b97b144860fe490f5b07d77b34..505150b04e309c517410e8e415d12da67139db96 100644 (file)
@@ -41,7 +41,6 @@ def fake_db_volume_get(*args, **kwargs):
         'size': 5,
         'availability_zone': 'somewhere',
         'created_at': timeutils.utcnow(),
-        'attach_status': None,
         'display_name': 'anothervolume',
         'display_description': 'Just another volume!',
         'volume_type_id': None,
index 886fff92d8180410436e809fb6d0c9a5326b7bf6..70e7de2ca3773072dd010bcdd73e313ae461f9c9 100644 (file)
@@ -109,7 +109,6 @@ test_snap = {'name': 'volume-21ec7341-9256-497b-97d9-ef48edcf0635',
              'display_description': 'test volume',
              'volume_type_id': None,
              'provider_location': '11',
-             'volume': {"volume_id": '21ec7341-9256-497b-97d9-ef48edcf0635'},
              'volume': {'provider_location': '12'},
              }