Browse Source

Merge "Add support for 'boot_mode' and 'secure_boot' node resource fields"

changes/32/803332/1
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
2d813b3c70
  1. 2
      ironicclient/common/http.py
  2. 2
      ironicclient/tests/unit/osc/v1/test_baremetal_node.py
  3. 7
      ironicclient/tests/unit/v1/test_node.py
  4. 4
      ironicclient/v1/resource_fields.py
  5. 5
      releasenotes/notes/add-node-boot-mode-08ac768649a2fc93.yaml

2
ironicclient/common/http.py

@ -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__)

2
ironicclient/tests/unit/osc/v1/test_baremetal_node.py

@ -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',

7
ironicclient/tests/unit/v1/test_node.py

@ -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()))

4
ironicclient/v1/resource_fields.py

@ -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',

5
releasenotes/notes/add-node-boot-mode-08ac768649a2fc93.yaml

@ -0,0 +1,5 @@
---
features:
- |
Adds support to display node fields ``boot_mode`` and ``secure_boot``
which are introduced in API 1.75.
Loading…
Cancel
Save