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
|
# http://specs.openstack.org/openstack/ironic-specs/specs/kilo/api-microversions.html # noqa
|
||||||
# for full details.
|
# for full details.
|
||||||
DEFAULT_VER = '1.9'
|
DEFAULT_VER = '1.9'
|
||||||
LAST_KNOWN_API_VERSION = 69
|
LAST_KNOWN_API_VERSION = 75
|
||||||
LATEST_VERSION = '1.{}'.format(LAST_KNOWN_API_VERSION)
|
LATEST_VERSION = '1.{}'.format(LAST_KNOWN_API_VERSION)
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@ -820,6 +820,7 @@ class TestBaremetalList(TestBaremetal):
|
|||||||
'Automated Clean',
|
'Automated Clean',
|
||||||
'BIOS Interface',
|
'BIOS Interface',
|
||||||
'Boot Interface',
|
'Boot Interface',
|
||||||
|
'Boot Mode',
|
||||||
'Chassis UUID',
|
'Chassis UUID',
|
||||||
'Clean Step',
|
'Clean Step',
|
||||||
'Conductor',
|
'Conductor',
|
||||||
@ -863,6 +864,7 @@ class TestBaremetalList(TestBaremetal):
|
|||||||
'Resource Class',
|
'Resource Class',
|
||||||
'Retired',
|
'Retired',
|
||||||
'Retired Reason',
|
'Retired Reason',
|
||||||
|
'Secure Boot',
|
||||||
'Storage Interface',
|
'Storage Interface',
|
||||||
'Target Power State',
|
'Target Power State',
|
||||||
'Target Provision State',
|
'Target Provision State',
|
||||||
|
@ -86,6 +86,8 @@ DRIVER_IFACES = {'deploy': {'result': True},
|
|||||||
|
|
||||||
NODE_STATES = {"last_error": None,
|
NODE_STATES = {"last_error": None,
|
||||||
"power_state": "power on",
|
"power_state": "power on",
|
||||||
|
"boot_mode": "fake-efi",
|
||||||
|
"secure_boot": False,
|
||||||
"provision_state": "active",
|
"provision_state": "active",
|
||||||
"target_power_state": None,
|
"target_power_state": None,
|
||||||
"target_provision_state": None}
|
"target_provision_state": None}
|
||||||
@ -1606,8 +1608,9 @@ class NodeManagerTest(testtools.TestCase):
|
|||||||
('GET', '/v1/nodes/%s/states' % NODE1['uuid'], {}, None),
|
('GET', '/v1/nodes/%s/states' % NODE1['uuid'], {}, None),
|
||||||
]
|
]
|
||||||
self.assertEqual(expect, self.api.calls)
|
self.assertEqual(expect, self.api.calls)
|
||||||
expected_fields = ['last_error', 'power_state', 'provision_state',
|
expected_fields = ['boot_mode', 'last_error', 'power_state',
|
||||||
'target_power_state', 'target_provision_state']
|
'provision_state', 'target_power_state',
|
||||||
|
'target_provision_state', 'secure_boot']
|
||||||
self.assertEqual(sorted(expected_fields),
|
self.assertEqual(sorted(expected_fields),
|
||||||
sorted(states.to_dict().keys()))
|
sorted(states.to_dict().keys()))
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ class Resource(object):
|
|||||||
'bios_name': 'BIOS setting name',
|
'bios_name': 'BIOS setting name',
|
||||||
'bios_value': 'BIOS setting value',
|
'bios_value': 'BIOS setting value',
|
||||||
'boot_index': 'Boot Index',
|
'boot_index': 'Boot Index',
|
||||||
|
'boot_mode': 'Boot Mode',
|
||||||
'candidate_nodes': 'Candidate Nodes',
|
'candidate_nodes': 'Candidate Nodes',
|
||||||
'chassis_uuid': 'Chassis UUID',
|
'chassis_uuid': 'Chassis UUID',
|
||||||
'clean_step': 'Clean Step',
|
'clean_step': 'Clean Step',
|
||||||
@ -107,6 +108,7 @@ class Resource(object):
|
|||||||
'resource_class': 'Resource Class',
|
'resource_class': 'Resource Class',
|
||||||
'retired': 'Retired',
|
'retired': 'Retired',
|
||||||
'retired_reason': 'Retired Reason',
|
'retired_reason': 'Retired Reason',
|
||||||
|
'secure_boot': 'Secure Boot',
|
||||||
'state': 'State',
|
'state': 'State',
|
||||||
'steps': 'Steps',
|
'steps': 'Steps',
|
||||||
'target_power_state': 'Target Power State',
|
'target_power_state': 'Target Power State',
|
||||||
@ -223,6 +225,7 @@ NODE_DETAILED_RESOURCE = Resource(
|
|||||||
'automated_clean',
|
'automated_clean',
|
||||||
'bios_interface',
|
'bios_interface',
|
||||||
'boot_interface',
|
'boot_interface',
|
||||||
|
'boot_mode',
|
||||||
'chassis_uuid',
|
'chassis_uuid',
|
||||||
'clean_step',
|
'clean_step',
|
||||||
'conductor',
|
'conductor',
|
||||||
@ -266,6 +269,7 @@ NODE_DETAILED_RESOURCE = Resource(
|
|||||||
'resource_class',
|
'resource_class',
|
||||||
'retired',
|
'retired',
|
||||||
'retired_reason',
|
'retired_reason',
|
||||||
|
'secure_boot',
|
||||||
'storage_interface',
|
'storage_interface',
|
||||||
'target_power_state',
|
'target_power_state',
|
||||||
'target_provision_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