Merge "Add support for 'boot_mode' and 'secure_boot' node resource fields"
This commit is contained in:
commit
2d813b3c70
@ -37,7 +37,7 @@ from ironicclient import exc
|
||||
# http://specs.openstack.org/openstack/ironic-specs/specs/kilo/api-microversions.html # noqa
|
||||
# for full details.
|
||||
DEFAULT_VER = '1.9'
|
||||
LAST_KNOWN_API_VERSION = 69
|
||||
LAST_KNOWN_API_VERSION = 75
|
||||
LATEST_VERSION = '1.{}'.format(LAST_KNOWN_API_VERSION)
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -820,6 +820,7 @@ class TestBaremetalList(TestBaremetal):
|
||||
'Automated Clean',
|
||||
'BIOS Interface',
|
||||
'Boot Interface',
|
||||
'Boot Mode',
|
||||
'Chassis UUID',
|
||||
'Clean Step',
|
||||
'Conductor',
|
||||
@ -863,6 +864,7 @@ class TestBaremetalList(TestBaremetal):
|
||||
'Resource Class',
|
||||
'Retired',
|
||||
'Retired Reason',
|
||||
'Secure Boot',
|
||||
'Storage Interface',
|
||||
'Target Power State',
|
||||
'Target Provision State',
|
||||
|
@ -86,6 +86,8 @@ DRIVER_IFACES = {'deploy': {'result': True},
|
||||
|
||||
NODE_STATES = {"last_error": None,
|
||||
"power_state": "power on",
|
||||
"boot_mode": "fake-efi",
|
||||
"secure_boot": False,
|
||||
"provision_state": "active",
|
||||
"target_power_state": None,
|
||||
"target_provision_state": None}
|
||||
@ -1606,8 +1608,9 @@ class NodeManagerTest(testtools.TestCase):
|
||||
('GET', '/v1/nodes/%s/states' % NODE1['uuid'], {}, None),
|
||||
]
|
||||
self.assertEqual(expect, self.api.calls)
|
||||
expected_fields = ['last_error', 'power_state', 'provision_state',
|
||||
'target_power_state', 'target_provision_state']
|
||||
expected_fields = ['boot_mode', 'last_error', 'power_state',
|
||||
'provision_state', 'target_power_state',
|
||||
'target_provision_state', 'secure_boot']
|
||||
self.assertEqual(sorted(expected_fields),
|
||||
sorted(states.to_dict().keys()))
|
||||
|
||||
|
@ -40,6 +40,7 @@ class Resource(object):
|
||||
'bios_name': 'BIOS setting name',
|
||||
'bios_value': 'BIOS setting value',
|
||||
'boot_index': 'Boot Index',
|
||||
'boot_mode': 'Boot Mode',
|
||||
'candidate_nodes': 'Candidate Nodes',
|
||||
'chassis_uuid': 'Chassis UUID',
|
||||
'clean_step': 'Clean Step',
|
||||
@ -107,6 +108,7 @@ class Resource(object):
|
||||
'resource_class': 'Resource Class',
|
||||
'retired': 'Retired',
|
||||
'retired_reason': 'Retired Reason',
|
||||
'secure_boot': 'Secure Boot',
|
||||
'state': 'State',
|
||||
'steps': 'Steps',
|
||||
'target_power_state': 'Target Power State',
|
||||
@ -223,6 +225,7 @@ NODE_DETAILED_RESOURCE = Resource(
|
||||
'automated_clean',
|
||||
'bios_interface',
|
||||
'boot_interface',
|
||||
'boot_mode',
|
||||
'chassis_uuid',
|
||||
'clean_step',
|
||||
'conductor',
|
||||
@ -266,6 +269,7 @@ NODE_DETAILED_RESOURCE = Resource(
|
||||
'resource_class',
|
||||
'retired',
|
||||
'retired_reason',
|
||||
'secure_boot',
|
||||
'storage_interface',
|
||||
'target_power_state',
|
||||
'target_provision_state',
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds support to display node fields ``boot_mode`` and ``secure_boot``
|
||||
which are introduced in API 1.75.
|
Loading…
Reference in New Issue
Block a user