Merge "Add and document two new root device hints: wwn_{with, vendor}_extension"
This commit is contained in:
commit
8a47be981d
@ -1830,8 +1830,10 @@ The list of support hints is:
|
|||||||
* model (STRING): device identifier
|
* model (STRING): device identifier
|
||||||
* vendor (STRING): device vendor
|
* vendor (STRING): device vendor
|
||||||
* serial (STRING): disk serial number
|
* serial (STRING): disk serial number
|
||||||
* wwn (STRING): unique storage identifier
|
|
||||||
* size (INT): size of the device in GiB
|
* size (INT): size of the device in GiB
|
||||||
|
* wwn (STRING): unique storage identifier
|
||||||
|
* wwn_with_extension (STRING): unique storage identifier with the vendor extension appended
|
||||||
|
* wwn_vendor_extension (STRING): unique vendor storage identifier
|
||||||
|
|
||||||
To associate one or more hints with a node, update the node's properties
|
To associate one or more hints with a node, update the node's properties
|
||||||
with a ``root_device`` key, for example::
|
with a ``root_device`` key, for example::
|
||||||
|
@ -97,7 +97,8 @@ CONF.register_opts(deploy_opts, group='deploy')
|
|||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
VALID_ROOT_DEVICE_HINTS = set(('size', 'model', 'wwn', 'serial', 'vendor'))
|
VALID_ROOT_DEVICE_HINTS = set(('size', 'model', 'wwn', 'serial', 'vendor',
|
||||||
|
'wwn_with_extension', 'wwn_vendor_extension'))
|
||||||
|
|
||||||
SUPPORTED_CAPABILITIES = {
|
SUPPORTED_CAPABILITIES = {
|
||||||
'boot_option': ('local', 'netboot'),
|
'boot_option': ('local', 'netboot'),
|
||||||
|
@ -1156,10 +1156,12 @@ class OtherFunctionTestCase(db_base.DbTestCase):
|
|||||||
def test_parse_root_device_hints(self):
|
def test_parse_root_device_hints(self):
|
||||||
self.node.properties['root_device'] = {
|
self.node.properties['root_device'] = {
|
||||||
'wwn': 123456, 'model': 'foo-model', 'size': 123,
|
'wwn': 123456, 'model': 'foo-model', 'size': 123,
|
||||||
'serial': 'foo-serial', 'vendor': 'foo-vendor'
|
'serial': 'foo-serial', 'vendor': 'foo-vendor',
|
||||||
|
'wwn_with_extension': 123456111, 'wwn_vendor_extension': 111,
|
||||||
}
|
}
|
||||||
expected = ('model=foo-model,serial=foo-serial,size=123,'
|
expected = ('model=foo-model,serial=foo-serial,size=123,'
|
||||||
'vendor=foo-vendor,wwn=123456')
|
'vendor=foo-vendor,wwn=123456,wwn_vendor_extension=111,'
|
||||||
|
'wwn_with_extension=123456111')
|
||||||
result = utils.parse_root_device_hints(self.node)
|
result = utils.parse_root_device_hints(self.node)
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user