mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Remove deprecated options from modules (#50246)
* Remove deprecated options from modules * Update tests * Add porting guide notes
This commit is contained in:
parent
7f2b9a8a31
commit
9702893729
11 changed files with 25 additions and 121 deletions
|
@ -103,17 +103,6 @@ options:
|
|||
line is not correct. replace I(config) is supported only on Nexus 9K device.
|
||||
default: line
|
||||
choices: ['line', 'block', 'config']
|
||||
force:
|
||||
description:
|
||||
- The force argument instructs the module to not consider the
|
||||
current devices running-config. When set to true, this will
|
||||
cause the module to push the contents of I(src) into the device
|
||||
without first checking if already configured.
|
||||
- Note this argument should be considered deprecated. To achieve
|
||||
the equivalent, set the C(match=none) which is idempotent. This argument
|
||||
will be removed in a future release.
|
||||
type: bool
|
||||
default: 'no'
|
||||
backup:
|
||||
description:
|
||||
- This argument will cause the module to create a full backup of
|
||||
|
@ -146,18 +135,6 @@ options:
|
|||
type: bool
|
||||
default: 'no'
|
||||
version_added: "2.2"
|
||||
save:
|
||||
description:
|
||||
- The C(save) argument instructs the module to save the
|
||||
running-config to startup-config. This operation is performed
|
||||
after any changes are made to the current running config. If
|
||||
no changes are made, the configuration is still saved to the
|
||||
startup config. This option will always cause the module to
|
||||
return changed.
|
||||
- This option is deprecated as of Ansible 2.4, use C(save_when)
|
||||
type: bool
|
||||
default: 'no'
|
||||
version_added: "2.2"
|
||||
save_when:
|
||||
description:
|
||||
- When changes are made to the device running-configuration, the
|
||||
|
@ -359,19 +336,12 @@ def main():
|
|||
|
||||
diff_against=dict(choices=['running', 'startup', 'intended']),
|
||||
diff_ignore_lines=dict(type='list'),
|
||||
|
||||
# save is deprecated as of ans2.4, use save_when instead
|
||||
save=dict(default=False, type='bool', removed_in_version='2.8'),
|
||||
|
||||
# force argument deprecated in ans2.2
|
||||
force=dict(default=False, type='bool', removed_in_version='2.6')
|
||||
)
|
||||
|
||||
argument_spec.update(nxos_argument_spec)
|
||||
|
||||
mutually_exclusive = [('lines', 'src', 'replace_src'),
|
||||
('parents', 'src'),
|
||||
('save', 'save_when')]
|
||||
('parents', 'src')]
|
||||
|
||||
required_if = [('match', 'strict', ['lines']),
|
||||
('match', 'exact', ['lines']),
|
||||
|
@ -448,7 +418,7 @@ def main():
|
|||
running_config = module.params['running_config']
|
||||
startup_config = None
|
||||
|
||||
if module.params['save_when'] == 'always' or module.params['save']:
|
||||
if module.params['save_when'] == 'always':
|
||||
save_config(module, result)
|
||||
elif module.params['save_when'] == 'modified':
|
||||
output = execute_show_commands(module, ['show running-config', 'show startup-config'])
|
||||
|
|
|
@ -42,12 +42,6 @@ options:
|
|||
- Address-Family Identifier (AFI).
|
||||
required: true
|
||||
choices: ['ipv4', 'ipv6']
|
||||
safi:
|
||||
description:
|
||||
- Sub Address-Family Identifier (SAFI).
|
||||
- Deprecated in 2.4
|
||||
required: true
|
||||
choices: ['unicast', 'multicast']
|
||||
route_target_both_auto_evpn:
|
||||
description:
|
||||
- Enable/Disable the EVPN route-target 'auto' setting for both
|
||||
|
@ -88,7 +82,6 @@ def main():
|
|||
afi=dict(required=True, choices=['ipv4', 'ipv6']),
|
||||
route_target_both_auto_evpn=dict(required=False, type='bool'),
|
||||
state=dict(choices=['present', 'absent'], default='present'),
|
||||
safi=dict(choices=['unicast', 'multicast'], removed_in_version="2.4"),
|
||||
)
|
||||
|
||||
argument_spec.update(nxos_argument_spec)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue