Remove duplicate keys from dictionaries

Found using a static analysis tool. Removed the duplicate key/value
pair as it was unnecessary.

Change-Id: Iab6374031c2af65d66c9d54fcb68c3a94603d43b
This commit is contained in:
Davanum Srinivas 2014-07-07 21:18:15 -04:00
parent 4e6579b972
commit 6922319dc6
8 changed files with 5 additions and 13 deletions

View File

@ -221,7 +221,7 @@ class InstanceActionEventList(base.ObjectListBase, base.NovaObject):
}
child_versions = {
'1.0': '1.0',
'1.0': '1.1',
'1.1': '1.1',
}
@base.remotable_classmethod

View File

@ -1968,7 +1968,6 @@ class CloudTestCase(test.TestCase):
return {'id': 'cedef40a-ed67-4d10-800e-17455edce175',
'name': 'fake_name',
'container_format': 'ami',
'status': 'active',
'properties': {
'kernel_id': 'cedef40a-ed67-4d10-800e-17455edce175',
'ramdisk_id': 'cedef40a-ed67-4d10-800e-17455edce175',
@ -1989,7 +1988,6 @@ class CloudTestCase(test.TestCase):
return {'id': 'cedef40a-ed67-4d10-800e-17455edce175',
'name': 'fake_name',
'container_format': 'ami',
'status': 'active',
'properties': {
'kernel_id': 'cedef40a-ed67-4d10-800e-17455edce175',
'ramdisk_id': 'cedef40a-ed67-4d10-800e-17455edce175',
@ -2011,7 +2009,6 @@ class CloudTestCase(test.TestCase):
return {'id': 'cedef40a-ed67-4d10-800e-17455edce175',
'name': 'fake_name',
'container_format': 'ami',
'status': 'active',
'properties': {
'kernel_id': 'cedef40a-ed67-4d10-800e-17455edce175',
'ramdisk_id': 'cedef40a-ed67-4d10-800e-17455edce175',
@ -2185,7 +2182,6 @@ class CloudTestCase(test.TestCase):
return {'id': 'cedef40a-ed67-4d10-800e-17455edce175',
'name': 'fake_name',
'container_format': 'ami',
'status': 'active',
'properties': {
'kernel_id': 'cedef40a-ed67-4d10-800e-17455edce175',
'ramdisk_id': 'cedef40a-ed67-4d10-800e-17455edce175',

View File

@ -119,7 +119,7 @@ class QuotaSetsTest(test.TestCase):
self.mox.ReplayAll()
body = {'quota_set': {'instances': 50, 'cores': 50,
'ram': 51200, 'floating_ips': 10,
'fixed_ips': -1, 'metadata_items': 128,
'metadata_items': 128,
'injected_files': 5,
'injected_file_content_bytes': 10240,
'injected_file_path_bytes': 255,
@ -139,7 +139,7 @@ class QuotaSetsTest(test.TestCase):
self.mox.ReplayAll()
body = {'quota_set': {'instances': 0, 'cores': 0,
'ram': 0, 'floating_ips': 0,
'fixed_ips': 0, 'metadata_items': 0,
'metadata_items': 0,
'injected_files': 0,
'injected_file_content_bytes': 0,
'injected_file_path_bytes': 0,

View File

@ -771,7 +771,6 @@ class TestVolumeCreateRequestXMLDeserializer(test.TestCase):
request = self.deserializer.deserialize(self_request)
expected = {
"volume": {
"display_name": "Volume-xml",
"size": "1",
"display_name": "Volume-xml",
"display_description": "description",

View File

@ -125,7 +125,7 @@ class QuotaSetsTest(test.TestCase):
id = 'update_me'
body = {'quota_set': {'instances': 0, 'cores': 0,
'ram': 0, 'floating_ips': 0,
'fixed_ips': 0, 'metadata_items': 0,
'metadata_items': 0,
'security_groups': 0,
'security_group_rules': 0,
'key_pairs': 100, 'fixed_ips': -1}}

View File

@ -681,7 +681,6 @@ class ExtensionsXMLSerializerTest(test.TestCase):
"description": "Adds the capability to share an image.",
"links": [{"rel": "describedby",
"type": "application/pdf",
"type": "application/vnd.sun.wadl+xml",
"href": "http://foo.com/api/ext/cs-pie.pdf"},
{"rel": "describedby",
"type": "application/vnd.sun.wadl+xml",

View File

@ -84,7 +84,6 @@ def get_test_instance(context=None, flavor=None, obj=False):
'bridge_name': 'br100',
'vcpus': 4,
'root_gb': 40,
'project_id': 'fake',
'bridge': 'br101',
'image_ref': 'cedef40a-ed67-4d10-800e-17455edce175',
'instance_type_id': '5',

View File

@ -56,8 +56,7 @@ class ConfigDriveTestCase(test.NoDBTestCase):
self.node_name = '%s(%s)' % (self.conn.dict_mors.keys()[0],
cluster_name)
image_ref = nova.tests.image.fake.get_valid_image_id()
self.test_instance = {'node': 'test_url',
'vm_state': 'building',
self.test_instance = {'vm_state': 'building',
'project_id': 'fake',
'user_id': 'fake',
'name': '1',