From 4b0c3c2fb6ea0e089c65cef9f2226f4326f9fe53 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Wed, 14 Aug 2019 21:53:08 +0000 Subject: [PATCH] Add 'node' attribute to baremetal Allocation This attribute is only used for create_allocation. When it is specified, an allocation is created for an existing active node without going through the normal allocation steps. Change-Id: Ia0e54d7a38bdc50b163113c6435d49b33ced947d --- openstack/baremetal/v1/allocation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openstack/baremetal/v1/allocation.py b/openstack/baremetal/v1/allocation.py index 19be5133f..40f57ee74 100644 --- a/openstack/baremetal/v1/allocation.py +++ b/openstack/baremetal/v1/allocation.py @@ -37,7 +37,8 @@ class Allocation(_common.ListMixin, resource.Resource): ) # Allocation update is available since 1.57 - _max_microversion = '1.57' + # Backfilling allocations is available since 1.58 + _max_microversion = '1.58' #: The candidate nodes for this allocation. candidate_nodes = resource.Body('candidate_nodes', type=list) @@ -53,6 +54,9 @@ class Allocation(_common.ListMixin, resource.Resource): links = resource.Body('links', type=list) #: The name of the allocation. name = resource.Body('name') + #: The node UUID or name to create the allocation against, + #: bypassing the normal allocation process. + node = resource.Body('node') #: UUID of the node this allocation belongs to. node_id = resource.Body('node_uuid') #: The requested resource class.