Expose baremetal Node.owner
The baremetal API node resource gained the 'owner' field in the 1.50 microversion. This adds it to the Node resource in the SDK. Change-Id: I129fa7f27ffdc82d591c4cf1f23eca46df50e1ba
This commit is contained in:
parent
800cbf7cfd
commit
c585ed197f
@ -60,6 +60,9 @@ class Node(_common.ListMixin, resource.Resource):
|
||||
#: The UUID of the allocation associated with this node. Added in API
|
||||
#: microversion 1.52.
|
||||
allocation_id = resource.Body("allocation_uuid")
|
||||
#: A string or UUID of the tenant who owns the baremetal node. Added in API
|
||||
#: microversion 1.50.
|
||||
owner = resource.Body("owner")
|
||||
#: The UUID of the chassis associated wit this node. Can be empty or None.
|
||||
chassis_id = resource.Body("chassis_uuid")
|
||||
#: The current clean step.
|
||||
|
@ -50,6 +50,7 @@ FAKE = {
|
||||
"maintenance_reason": None,
|
||||
"name": "test_node",
|
||||
"network_interface": "flat",
|
||||
"owner": "4b7ed919-e4a6-4017-a081-43205c5b0b73",
|
||||
"portgroups": [
|
||||
{
|
||||
"href": "http://127.0.0.1:6385/v1/nodes/<NODE_ID>/portgroups",
|
||||
@ -132,6 +133,7 @@ class TestNode(base.TestCase):
|
||||
self.assertEqual(FAKE['maintenance_reason'], sot.maintenance_reason)
|
||||
self.assertEqual(FAKE['name'], sot.name)
|
||||
self.assertEqual(FAKE['network_interface'], sot.network_interface)
|
||||
self.assertEqual(FAKE['owner'], sot.owner)
|
||||
self.assertEqual(FAKE['ports'], sot.ports)
|
||||
self.assertEqual(FAKE['portgroups'], sot.port_groups)
|
||||
self.assertEqual(FAKE['power_state'], sot.power_state)
|
||||
|
7
releasenotes/notes/node-owner-7f4b083ff9da8cce.yaml
Normal file
7
releasenotes/notes/node-owner-7f4b083ff9da8cce.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``openstack.baremetal.v1.Node`` resource now has an ``owner`` property
|
||||
which was added in the baremetal API `microversion 1.50`_.
|
||||
|
||||
.. _microversion 1.50: https://docs.openstack.org/ironic/latest/contributor/webapi-version-history.html#id7
|
Loading…
Reference in New Issue
Block a user