diff --git a/openstack/baremetal/v1/node.py b/openstack/baremetal/v1/node.py index df94a122e..2f4ff1fe1 100644 --- a/openstack/baremetal/v1/node.py +++ b/openstack/baremetal/v1/node.py @@ -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. diff --git a/openstack/tests/unit/baremetal/v1/test_node.py b/openstack/tests/unit/baremetal/v1/test_node.py index 54b857d10..2669eaf30 100644 --- a/openstack/tests/unit/baremetal/v1/test_node.py +++ b/openstack/tests/unit/baremetal/v1/test_node.py @@ -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//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) diff --git a/releasenotes/notes/node-owner-7f4b083ff9da8cce.yaml b/releasenotes/notes/node-owner-7f4b083ff9da8cce.yaml new file mode 100644 index 000000000..88fb5f3d0 --- /dev/null +++ b/releasenotes/notes/node-owner-7f4b083ff9da8cce.yaml @@ -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