Adding Port Security Timeout option in Interface Policy Port Security (#57108)
* Adding support for port security timeout attribute for ACI Interface Policy Port Security - Feature Pull Request Network Module ACI lib: _aci_intf_policy_port_security.py * Fixing missing quotes * Fixing errors raised by ansible-test sanity test pylint error E321 missing whitespace after comma Added version 2.9 as version_added * Fixing the missing version_added under new port_security_timeout option
This commit is contained in:
parent
175f80c788
commit
85f7a7e848
1 changed files with 12 additions and 0 deletions
|
@ -35,6 +35,13 @@ options:
|
|||
- Accepted values range between C(0) and C(12000).
|
||||
- The APIC defaults to C(0) when unset during creation.
|
||||
type: int
|
||||
port_security_timeout:
|
||||
version_added: '2.9'
|
||||
description:
|
||||
- The delay time in seconds before MAC learning is re-enabled
|
||||
- Accepted values range between C(60) and C(3600)
|
||||
- The APIC defaults to C(60) when unset during creation
|
||||
type: int
|
||||
state:
|
||||
description:
|
||||
- Use C(present) or C(absent) for adding or removing.
|
||||
|
@ -60,6 +67,7 @@ EXAMPLES = r'''
|
|||
port_security: '{{ port_security }}'
|
||||
description: '{{ descr }}'
|
||||
max_end_points: '{{ max_end_points }}'
|
||||
port_security_timeout: '{{ port_security_timeout }}'
|
||||
delegate_to: localhost
|
||||
'''
|
||||
|
||||
|
@ -178,6 +186,7 @@ def main():
|
|||
port_security=dict(type='str', aliases=['name']), # Not required for querying all objects
|
||||
description=dict(type='str', aliases=['descr']),
|
||||
max_end_points=dict(type='int'),
|
||||
port_security_timeout=dict(type='int'),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
||||
)
|
||||
|
||||
|
@ -193,8 +202,11 @@ def main():
|
|||
port_security = module.params['port_security']
|
||||
description = module.params['description']
|
||||
max_end_points = module.params['max_end_points']
|
||||
port_security_timeout = module.params['port_security_timeout']
|
||||
if max_end_points is not None and max_end_points not in range(12001):
|
||||
module.fail_json(msg='The "max_end_points" must be between 0 and 12000')
|
||||
if port_security_timeout is not None and port_security_timeout not in range(60, 3601):
|
||||
module.fail_json(msg='The "port_security_timeout" must be between 60 and 3600')
|
||||
state = module.params['state']
|
||||
|
||||
aci = ACIModule(module)
|
||||
|
|
Loading…
Reference in a new issue