Add support for Ironic node shard attribute

Nodes can now have shards set and retrieved. This should enable use
of shard functionality for openstacksdk clients.

Change-Id: I30ae18a6338ec687c3377501acad0568c2520e1c
This commit is contained in:
Jay Faulkner
2023-04-21 15:00:29 -07:00
parent 2679719701
commit 0bc0d4b832
3 changed files with 8 additions and 0 deletions

View File

@@ -190,6 +190,9 @@ class Node(_common.ListMixin, resource.Resource):
#: A string to be used by external schedulers to identify this node as a #: A string to be used by external schedulers to identify this node as a
#: unit of a specific type of resource. Added in API microversion 1.21. #: unit of a specific type of resource. Added in API microversion 1.21.
resource_class = resource.Body("resource_class") resource_class = resource.Body("resource_class")
#: A string indicating the shard this node belongs to. Added in API
#: microversion 1,82.
shard = resource.Body("shard")
#: Links to the collection of states. #: Links to the collection of states.
states = resource.Body("states", type=list) states = resource.Body("states", type=list)
#: The requested state if a provisioning action has been requested. For #: The requested state if a provisioning action has been requested. For

View File

@@ -83,6 +83,7 @@ FAKE = {
"reservation": None, "reservation": None,
"resource_class": None, "resource_class": None,
"secure_boot": True, "secure_boot": True,
"shard": "TestShard",
"states": [ "states": [
{ {
"href": "http://127.0.0.1:6385/v1/nodes/<NODE_ID>/states", "href": "http://127.0.0.1:6385/v1/nodes/<NODE_ID>/states",

View File

@@ -0,0 +1,4 @@
---
features:
- |
Adds support for Node shards to baremetal service.