mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-06 13:23:06 +00:00
Merge "ironic: deprecate sub-options of driver_info"
This commit is contained in:
@@ -104,25 +104,10 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Information for this server's driver. Will vary based on which
|
- Information for this server's driver. Will vary based on which
|
||||||
driver is in use. Any sub-field which is populated will be validated
|
driver is in use. Any sub-field which is populated will be validated
|
||||||
during creation.
|
during creation. For compatibility reasons sub-fields `power`,
|
||||||
|
`deploy`, `management` and `console` are flattened.
|
||||||
required: true
|
required: true
|
||||||
type: dict
|
type: dict
|
||||||
suboptions:
|
|
||||||
power:
|
|
||||||
description:
|
|
||||||
- Information necessary to turn this server on / off.
|
|
||||||
This often includes such things as IPMI username, password, and IP address.
|
|
||||||
required: true
|
|
||||||
deploy:
|
|
||||||
description:
|
|
||||||
- Information necessary to deploy this server directly, without using Nova. THIS IS NOT RECOMMENDED.
|
|
||||||
console:
|
|
||||||
description:
|
|
||||||
- Information necessary to connect to this server's serial console. Not all drivers support this.
|
|
||||||
management:
|
|
||||||
description:
|
|
||||||
- Information necessary to interact with this server's management interface. May be shared by power_info in some cases.
|
|
||||||
required: true
|
|
||||||
nics:
|
nics:
|
||||||
description:
|
description:
|
||||||
- 'A list of network interface cards, eg, " - mac: aa:bb:cc:aa:bb:cc"'
|
- 'A list of network interface cards, eg, " - mac: aa:bb:cc:aa:bb:cc"'
|
||||||
@@ -206,10 +191,9 @@ EXAMPLES = '''
|
|||||||
- mac: "aa:bb:cc:aa:bb:cc"
|
- mac: "aa:bb:cc:aa:bb:cc"
|
||||||
- mac: "dd:ee:ff:dd:ee:ff"
|
- mac: "dd:ee:ff:dd:ee:ff"
|
||||||
driver_info:
|
driver_info:
|
||||||
power:
|
ipmi_address: "1.2.3.4"
|
||||||
ipmi_address: "1.2.3.4"
|
ipmi_username: "admin"
|
||||||
ipmi_username: "admin"
|
ipmi_password: "adminpass"
|
||||||
ipmi_password: "adminpass"
|
|
||||||
chassis_uuid: "00000000-0000-0000-0000-000000000001"
|
chassis_uuid: "00000000-0000-0000-0000-000000000001"
|
||||||
|
|
||||||
'''
|
'''
|
||||||
@@ -245,17 +229,13 @@ def _parse_properties(module):
|
|||||||
|
|
||||||
|
|
||||||
def _parse_driver_info(sdk, module):
|
def _parse_driver_info(sdk, module):
|
||||||
p = module.params['driver_info']
|
info = module.params['driver_info'].copy()
|
||||||
info = p.get('power')
|
for deprecated in ('power', 'console', 'management', 'deploy'):
|
||||||
if not info:
|
if deprecated in info:
|
||||||
raise sdk.exceptions.OpenStackCloudException(
|
info.update(info.pop(deprecated))
|
||||||
"driver_info['power'] is required")
|
module.deprecate("Suboption %s of the driver_info parameter of "
|
||||||
if p.get('console'):
|
"'openstack.cloud.baremetal_node' is deprecated"
|
||||||
info.update(p.get('console'))
|
% deprecated, version='2.0.0')
|
||||||
if p.get('management'):
|
|
||||||
info.update(p.get('management'))
|
|
||||||
if p.get('deploy'):
|
|
||||||
info.update(p.get('deploy'))
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
plugins/modules/baremetal_node.py pylint:ansible-deprecated-no-collection-name
|
||||||
plugins/modules/compute_flavor_info.py pylint:ansible-deprecated-no-collection-name
|
plugins/modules/compute_flavor_info.py pylint:ansible-deprecated-no-collection-name
|
||||||
plugins/modules/identity_domain_info.py pylint:ansible-deprecated-no-collection-name
|
plugins/modules/identity_domain_info.py pylint:ansible-deprecated-no-collection-name
|
||||||
plugins/modules/identity_user_info.py pylint:ansible-deprecated-no-collection-name
|
plugins/modules/identity_user_info.py pylint:ansible-deprecated-no-collection-name
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
plugins/modules/baremetal_node.py pylint:ansible-deprecated-no-collection-name
|
||||||
plugins/modules/compute_flavor_info.py pylint:ansible-deprecated-no-collection-name
|
plugins/modules/compute_flavor_info.py pylint:ansible-deprecated-no-collection-name
|
||||||
plugins/modules/identity_domain_info.py pylint:ansible-deprecated-no-collection-name
|
plugins/modules/identity_domain_info.py pylint:ansible-deprecated-no-collection-name
|
||||||
plugins/modules/identity_user_info.py pylint:ansible-deprecated-no-collection-name
|
plugins/modules/identity_user_info.py pylint:ansible-deprecated-no-collection-name
|
||||||
|
|||||||
Reference in New Issue
Block a user