mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-25 09:14:31 +00:00
Remove MAC address requirement for node registration
Allow the creation of baremetal nodes without specifying any NICs. In this case switch the target provision state from available to enroll. We're proposing this patch to support enrolling nodes as a first step before running an out-of-band Redfish inspection to get the NICs. No change is made to existing workflows. Change-Id: I9b1636d778e7477191bfbe6094bd6bc70a4d384e Signed-off-by: Hollie Hutchinson <hollie@stackhpc.com> Signed-off-by: Doug Szumski <doug@stackhpc.com>
This commit is contained in:
committed by
Doug Szumski
parent
209cf2d605
commit
ee88cc15b8
@@ -75,7 +75,10 @@ options:
|
|||||||
description:
|
description:
|
||||||
- 'A list of network interface cards, eg, C( - mac: aa:bb:cc:aa:bb:cc)'
|
- 'A list of network interface cards, eg, C( - mac: aa:bb:cc:aa:bb:cc)'
|
||||||
- This node attribute cannot be updated.
|
- This node attribute cannot be updated.
|
||||||
required: true
|
- If this option is not set, the target provision state of the node
|
||||||
|
changes from available to enroll.
|
||||||
|
required: false
|
||||||
|
default: []
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
suboptions:
|
suboptions:
|
||||||
@@ -508,7 +511,7 @@ class BaremetalNodeModule(OpenStackModule):
|
|||||||
management_interface=dict(),
|
management_interface=dict(),
|
||||||
name=dict(),
|
name=dict(),
|
||||||
network_interface=dict(),
|
network_interface=dict(),
|
||||||
nics=dict(type='list', required=True, elements='dict'),
|
nics=dict(type='list', default=[], elements='dict'),
|
||||||
power_interface=dict(),
|
power_interface=dict(),
|
||||||
properties=dict(
|
properties=dict(
|
||||||
type='dict',
|
type='dict',
|
||||||
@@ -655,6 +658,8 @@ class BaremetalNodeModule(OpenStackModule):
|
|||||||
nics=self.params['nics'],
|
nics=self.params['nics'],
|
||||||
wait=self.params['wait'],
|
wait=self.params['wait'],
|
||||||
timeout=self.params['timeout'],
|
timeout=self.params['timeout'],
|
||||||
|
provision_state=(
|
||||||
|
'available' if len(self.params['nics']) > 0 else 'enroll'),
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
|
||||||
self.exit_json(changed=True, node=node.to_dict(computed=False))
|
self.exit_json(changed=True, node=node.to_dict(computed=False))
|
||||||
|
|||||||
Reference in New Issue
Block a user