summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsuacide24 <rsua95@gmail.com>2018-05-17 07:11:31 -0400
committerDag Wieers <dag@wieers.com>2018-05-17 13:11:31 +0200
commit4c0ceaea3dde9949db34abf72ed1a665cc49e813 (patch)
treedf56874a37636db7d3617856a3a7f902521701e0 /lib
parent1328cc1fa06d5526664387dfe5ea66849c389e49 (diff)
downloadansible-4c0ceaea3dde9949db34abf72ed1a665cc49e813.tar.gz
changed accportgrp to accbundle (#40104)
* changed accportgrp to accbundle * fixed shippable complaints * changed policy_group_type to interface_type
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/modules/network/aci/aci_access_port_to_interface_policy_leaf_profile.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/ansible/modules/network/aci/aci_access_port_to_interface_policy_leaf_profile.py b/lib/ansible/modules/network/aci/aci_access_port_to_interface_policy_leaf_profile.py
index 6260611a28..5c47466b75 100644
--- a/lib/ansible/modules/network/aci/aci_access_port_to_interface_policy_leaf_profile.py
+++ b/lib/ansible/modules/network/aci/aci_access_port_to_interface_policy_leaf_profile.py
@@ -60,6 +60,12 @@ options:
description:
- The name of the fabric access policy group to be associated with the leaf interface profile interface selector.
aliases: [ policy_group_name ]
+ interface_type:
+ version_added: '2.6'
+ description:
+ - The type of interface for the static EPG deployement.
+ choices: [ fex, port_channel, switch_port, vpc ]
+ default: switch_port
state:
description:
- Use C(present) or C(absent) for adding or removing.
@@ -235,6 +241,7 @@ def main():
'from': dict(type='str', aliases=['fromPort', 'from_port_range']),
'to': dict(type='str', aliases=['toPort', 'to_port_range']),
'policy_group': dict(type='str', aliases=['policy_group_name']),
+ 'interface_type': dict(type='str', default='switch_port', choices=['fex', 'port_channel', 'switch_port', 'vpc']),
'state': dict(type='str', default='present', choices=['absent', 'present', 'query']),
})
@@ -255,6 +262,7 @@ def main():
from_ = module.params['from']
to_ = module.params['to']
policy_group = module.params['policy_group']
+ interface_type = module.params['interface_type']
state = module.params['state']
aci = ACIModule(module)
@@ -274,6 +282,14 @@ def main():
),
child_classes=['infraPortBlk', 'infraRsAccBaseGrp']
)
+
+ INTERFACE_TYPE_MAPPING = dict(
+ fex='uni/infra/funcprof/accportgrp-{0}'.format(policy_group),
+ port_channel='uni/infra/funcprof/accbundle-{0}'.format(policy_group),
+ switch_port='uni/infra/funcprof/accportgrp-{0}'.format(policy_group),
+ vpc='uni/infra/funcprof/accbundle-{0}'.format(policy_group),
+ )
+
aci.get_existing()
if state == 'present':
@@ -297,7 +313,7 @@ def main():
dict(
infraRsAccBaseGrp=dict(
attributes=dict(
- tDn='uni/infra/funcprof/accportgrp-{0}'.format(policy_group),
+ tDn=INTERFACE_TYPE_MAPPING[interface_type],
),
),
),