mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
added parameter leaf_port_blk_description in module and integration tests
This commit is contained in:
parent
be2c73ac18
commit
285af0b6fb
2 changed files with 9 additions and 6 deletions
|
@ -39,6 +39,9 @@ options:
|
||||||
- The name of the Fabric access policy leaf interface profile access port block.
|
- The name of the Fabric access policy leaf interface profile access port block.
|
||||||
required: yes
|
required: yes
|
||||||
aliases: [ leaf_port_blk_name ]
|
aliases: [ leaf_port_blk_name ]
|
||||||
|
leaf_port_blk_description:
|
||||||
|
description:
|
||||||
|
- The description to assign to the C(leaf_port_blk)
|
||||||
from_port:
|
from_port:
|
||||||
description:
|
description:
|
||||||
- The beginning (from-range) of the port range block for the leaf access port block.
|
- The beginning (from-range) of the port range block for the leaf access port block.
|
||||||
|
@ -253,6 +256,7 @@ def main():
|
||||||
leaf_interface_profile=dict(type='str', aliases=['leaf_interface_profile_name']), # Not required for querying all objects
|
leaf_interface_profile=dict(type='str', aliases=['leaf_interface_profile_name']), # Not required for querying all objects
|
||||||
access_port_selector=dict(type='str', aliases=['name', 'access_port_selector_name']), # Not required for querying all objects
|
access_port_selector=dict(type='str', aliases=['name', 'access_port_selector_name']), # Not required for querying all objects
|
||||||
leaf_port_blk=dict(type='str', aliases=['leaf_port_blk_name']), # Not required for querying all objects
|
leaf_port_blk=dict(type='str', aliases=['leaf_port_blk_name']), # Not required for querying all objects
|
||||||
|
leaf_port_blk_description=dict(type='str'),
|
||||||
from_port=dict(type='str', aliases=['from', 'fromPort', 'from_port_range']), # Not required for querying all objects and deleting port blocks
|
from_port=dict(type='str', aliases=['from', 'fromPort', 'from_port_range']), # Not required for querying all objects and deleting port blocks
|
||||||
to_port=dict(type='str', aliases=['to', 'toPort', 'to_port_range']), # Not required for querying all objects and deleting port blocks
|
to_port=dict(type='str', aliases=['to', 'toPort', 'to_port_range']), # Not required for querying all objects and deleting port blocks
|
||||||
from_card=dict(type='str', aliases=['from_card_range']),
|
from_card=dict(type='str', aliases=['from_card_range']),
|
||||||
|
@ -272,6 +276,7 @@ def main():
|
||||||
leaf_interface_profile = module.params['leaf_interface_profile']
|
leaf_interface_profile = module.params['leaf_interface_profile']
|
||||||
access_port_selector = module.params['access_port_selector']
|
access_port_selector = module.params['access_port_selector']
|
||||||
leaf_port_blk = module.params['leaf_port_blk']
|
leaf_port_blk = module.params['leaf_port_blk']
|
||||||
|
leaf_port_blk_description = module.params['leaf_port_blk_description']
|
||||||
from_port = module.params['from_port']
|
from_port = module.params['from_port']
|
||||||
to_port = module.params['to_port']
|
to_port = module.params['to_port']
|
||||||
from_card = module.params['from_card']
|
from_card = module.params['from_card']
|
||||||
|
@ -307,6 +312,7 @@ def main():
|
||||||
aci.payload(
|
aci.payload(
|
||||||
aci_class='infraPortBlk',
|
aci_class='infraPortBlk',
|
||||||
class_config=dict(
|
class_config=dict(
|
||||||
|
descr=leaf_port_blk_description,
|
||||||
name=leaf_port_blk,
|
name=leaf_port_blk,
|
||||||
fromPort=from_port,
|
fromPort=from_port,
|
||||||
toPort=to_port,
|
toPort=to_port,
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
aci_access_port_block_to_access_port: &aci_access_port_block_to_access_port_present
|
aci_access_port_block_to_access_port: &aci_access_port_block_to_access_port_present
|
||||||
<<: *aci_access_port_to_interface_policy_leaf_profile_present
|
<<: *aci_access_port_to_interface_policy_leaf_profile_present
|
||||||
leaf_port_blk: anstest_leafportblkname
|
leaf_port_blk: anstest_leafportblkname
|
||||||
|
leaf_port_blk_description: anstest_leafportblkdesc
|
||||||
fromPort: 13
|
fromPort: 13
|
||||||
toPort: 16
|
toPort: 16
|
||||||
check_mode: yes
|
check_mode: yes
|
||||||
|
@ -62,15 +63,13 @@
|
||||||
- accessportblock_to_accessport_check_mode_present is changed
|
- accessportblock_to_accessport_check_mode_present is changed
|
||||||
- accessportblock_to_accessport_present is changed
|
- accessportblock_to_accessport_present is changed
|
||||||
- accessportblock_to_accessport_present.previous == []
|
- accessportblock_to_accessport_present.previous == []
|
||||||
- 'accessportblock_to_accessport_present.sent == {"infraPortBlk": {"attributes": {"name": "anstest_leafportblkname", "fromPort": "16", "toPort": "16"}}}'
|
- 'accessportblock_to_accessport_present.sent == {"infraPortBlk": {"attributes": {"descr": "anstest_leafportblkdesc", "name": "anstest_leafportblkname", "fromPort": "16", "toPort": "16"}}}'
|
||||||
- accessportblock_to_accessport_idempotent is not changed
|
- accessportblock_to_accessport_idempotent is not changed
|
||||||
- accessportblock_to_accessport_idempotent.sent == {}
|
- accessportblock_to_accessport_idempotent.sent == {}
|
||||||
- accessportblock_to_accessport_update is changed
|
- accessportblock_to_accessport_update is changed
|
||||||
- 'accessportblock_to_accessport_update.sent == {"infraPortBlk": {"attributes": {"name": "anstest_leafportblkname", "fromPort": "15", "toPort": "15"}}}'
|
- 'accessportblock_to_accessport_update.sent == {"infraPortBlk": {"attributes": {"name": "anstest_leafportblkname", "fromPort": "15", "toPort": "15"}}}'
|
||||||
|
|
||||||
|
|
||||||
# TODO FROM HERE
|
|
||||||
|
|
||||||
- name: Query Specific port block and access_port_selector binding
|
- name: Query Specific port block and access_port_selector binding
|
||||||
aci_access_port_block_to_access_port:
|
aci_access_port_block_to_access_port:
|
||||||
<<: *aci_access_port_block_to_access_port_present
|
<<: *aci_access_port_block_to_access_port_present
|
||||||
|
@ -105,8 +104,6 @@
|
||||||
aci_access_port_block_to_access_port:
|
aci_access_port_block_to_access_port:
|
||||||
<<: *aci_access_port_to_interface_policy_leaf_profile_present
|
<<: *aci_access_port_to_interface_policy_leaf_profile_present
|
||||||
#leaf_port_blk: anstest_leafportblkname
|
#leaf_port_blk: anstest_leafportblkname
|
||||||
#fromPort: 13
|
|
||||||
#toPort: 16
|
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
register: accessportblock_to_accessport_absent_missing_param
|
register: accessportblock_to_accessport_absent_missing_param
|
||||||
|
@ -121,7 +118,7 @@
|
||||||
- accessportblock_to_accessport_absent_idempotent is not changed
|
- accessportblock_to_accessport_absent_idempotent is not changed
|
||||||
- accessportblock_to_accessport_absent_idempotent.previous == []
|
- accessportblock_to_accessport_absent_idempotent.previous == []
|
||||||
- accessportblock_to_accessport_absent_missing_param is failed
|
- accessportblock_to_accessport_absent_missing_param is failed
|
||||||
- 'accessportblock_to_accessport_absent_missing_param.msg == "state is absent but all of the following are missing: leaf_port_blk, fromPort, toPort"'
|
- 'accessportblock_to_accessport_absent_missing_param.msg == "state is absent but all of the following are missing: leaf_port_blk"'
|
||||||
|
|
||||||
|
|
||||||
- name: Remove binding of Access Port Block and Interface Access Port Selector - Clean up
|
- name: Remove binding of Access Port Block and Interface Access Port Selector - Clean up
|
||||||
|
|
Loading…
Reference in a new issue