mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-04 23:39:09 -07:00
Remove deprecated features scheduled for removal in 3.0.0 (#1926)
* Remove deprecated features. * Remove ignore.txt entries. * Update changelogs/fragments/remove-deprecated-features.yml Co-authored-by: Joe Adams <adams10301@gmail.com> Co-authored-by: Joe Adams <adams10301@gmail.com>
This commit is contained in:
parent
1ca9229c66
commit
36daa7c48e
16 changed files with 58 additions and 208 deletions
|
@ -45,16 +45,6 @@ options:
|
|||
description:
|
||||
- Password for authentication with iDRAC
|
||||
type: str
|
||||
manager_attribute_name:
|
||||
required: false
|
||||
description:
|
||||
- (deprecated) name of iDRAC attribute to update
|
||||
type: str
|
||||
manager_attribute_value:
|
||||
required: false
|
||||
description:
|
||||
- (deprecated) value of iDRAC attribute to update
|
||||
type: str
|
||||
manager_attributes:
|
||||
required: false
|
||||
description:
|
||||
|
@ -183,12 +173,6 @@ class IdracRedfishUtils(RedfishUtils):
|
|||
manager_uri = command_manager_attributes_uri_map.get(command, self.manager_uri)
|
||||
|
||||
attributes = self.module.params['manager_attributes']
|
||||
manager_attr_name = self.module.params.get('manager_attribute_name')
|
||||
manager_attr_value = self.module.params.get('manager_attribute_value')
|
||||
|
||||
# manager attributes to update
|
||||
if manager_attr_name:
|
||||
attributes.update({manager_attr_name: manager_attr_value})
|
||||
|
||||
attrs_to_patch = {}
|
||||
attrs_skipped = {}
|
||||
|
@ -250,8 +234,6 @@ def main():
|
|||
baseuri=dict(required=True),
|
||||
username=dict(required=True),
|
||||
password=dict(required=True, no_log=True),
|
||||
manager_attribute_name=dict(default=None),
|
||||
manager_attribute_value=dict(default=None),
|
||||
manager_attributes=dict(type='dict', default={}),
|
||||
timeout=dict(type='int', default=10),
|
||||
resource_id=dict()
|
||||
|
@ -310,13 +292,6 @@ def main():
|
|||
if command in ["SetManagerAttributes", "SetLifecycleControllerAttributes", "SetSystemAttributes"]:
|
||||
result = rf_utils.set_manager_attributes(command)
|
||||
|
||||
if any((module.params['manager_attribute_name'], module.params['manager_attribute_value'])):
|
||||
module.deprecate(msg='Arguments `manager_attribute_name` and '
|
||||
'`manager_attribute_value` are deprecated. '
|
||||
'Use `manager_attributes` instead for passing in '
|
||||
'the manager attribute name and value pairs',
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
# Return data back or fail with proper message
|
||||
if result['ret'] is True:
|
||||
module.exit_json(changed=result['changed'], msg=to_native(result['msg']))
|
||||
|
|
|
@ -43,18 +43,6 @@ options:
|
|||
description:
|
||||
- Password for authentication with OOB controller
|
||||
type: str
|
||||
bios_attribute_name:
|
||||
required: false
|
||||
description:
|
||||
- name of BIOS attr to update (deprecated - use bios_attributes instead)
|
||||
default: 'null'
|
||||
type: str
|
||||
bios_attribute_value:
|
||||
required: false
|
||||
description:
|
||||
- value of BIOS attr to update (deprecated - use bios_attributes instead)
|
||||
default: 'null'
|
||||
type: raw
|
||||
bios_attributes:
|
||||
required: false
|
||||
description:
|
||||
|
@ -129,13 +117,13 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Enable PXE Boot for NIC1 using deprecated options
|
||||
- name: Enable PXE Boot for NIC1
|
||||
community.general.redfish_config:
|
||||
category: Systems
|
||||
command: SetBiosAttributes
|
||||
resource_id: 437XR1138R2
|
||||
bios_attribute_name: PxeDev1EnDis
|
||||
bios_attribute_value: Enabled
|
||||
bios_attributes:
|
||||
PxeDev1EnDis: Enabled
|
||||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
|
@ -233,8 +221,6 @@ def main():
|
|||
baseuri=dict(required=True),
|
||||
username=dict(required=True),
|
||||
password=dict(required=True, no_log=True),
|
||||
bios_attribute_name=dict(default='null'),
|
||||
bios_attribute_value=dict(default='null', type='raw'),
|
||||
bios_attributes=dict(type='dict', default={}),
|
||||
timeout=dict(type='int', default=10),
|
||||
boot_order=dict(type='list', elements='str', default=[]),
|
||||
|
@ -264,12 +250,6 @@ def main():
|
|||
|
||||
# BIOS attributes to update
|
||||
bios_attributes = module.params['bios_attributes']
|
||||
if module.params['bios_attribute_name'] != 'null':
|
||||
bios_attributes[module.params['bios_attribute_name']] = module.params[
|
||||
'bios_attribute_value']
|
||||
module.deprecate(msg='The bios_attribute_name/bios_attribute_value '
|
||||
'options are deprecated. Use bios_attributes instead',
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.14
|
||||
|
||||
# boot order
|
||||
boot_order = module.params['boot_order']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue