Follow up patch for da9c3b0adc67efa916fc534d975823c0a45948a1

This patch is a follow up patch fixing some nits left by the review
da9c3b0adc67efa916fc534d975823c0a45948a1, this patch adds the
wwn_with_extension and wwn_vendor_extension root device hints to the
"serializable_fields" list attribute of the BlockDevice class and fixes
some tests.

Change-Id: I6039be535988319276f9ac355c80997d34328ce8
This commit is contained in:
Lucas Alvares Gomes 2015-11-18 09:53:54 +00:00
parent 4bd9fa042e
commit c21409e98b
3 changed files with 14 additions and 1 deletions

@ -138,7 +138,8 @@ class HardwareType(object):
class BlockDevice(encoding.SerializableComparable):
serializable_fields = ('name', 'model', 'size', 'rotational',
'wwn', 'serial', 'vendor')
'wwn', 'serial', 'vendor', 'wwn_with_extension',
'wwn_vendor_extension')
def __init__(self, name, model, size, rotational, wwn=None, serial=None,
vendor=None, wwn_with_extension=None,

@ -319,6 +319,8 @@ class TestGenericHardwareManager(test_base.BaseTestCase):
rotational=False,
vendor='Super Vendor',
wwn='wwn0',
wwn_with_extension='wwn0ven0',
wwn_vendor_extension='ven0',
serial='serial0'),
hardware.BlockDevice(name='/dev/sdb',
model=model,
@ -326,6 +328,8 @@ class TestGenericHardwareManager(test_base.BaseTestCase):
rotational=False,
vendor='fake-vendor',
wwn='fake-wwn',
wwn_with_extension='fake-wwnven0',
wwn_vendor_extension='ven0',
serial='fake-serial'),
]

@ -175,6 +175,8 @@ class TestBaseIronicPythonAgent(test_base.BaseTestCase):
u'size': u'9001',
u'serial': None,
u'wwn': None,
u'wwn_with_extension': None,
u'wwn_vendor_extension': None,
u'vendor': None,
},
{
@ -184,6 +186,8 @@ class TestBaseIronicPythonAgent(test_base.BaseTestCase):
u'size': u'9002',
u'serial': None,
u'wwn': None,
u'wwn_with_extension': None,
u'wwn_vendor_extension': None,
u'vendor': None,
}
],
@ -306,6 +310,8 @@ class TestBaseIronicPythonAgent(test_base.BaseTestCase):
u'size': u'9001',
u'serial': None,
u'wwn': None,
u'wwn_with_extension': None,
u'wwn_vendor_extension': None,
u'vendor': None,
},
{
@ -315,6 +321,8 @@ class TestBaseIronicPythonAgent(test_base.BaseTestCase):
u'size': u'9002',
u'serial': None,
u'wwn': None,
u'wwn_with_extension': None,
u'wwn_vendor_extension': None,
u'vendor': None,
}
],