@ -30,7 +30,7 @@ options:
- Determines if the Bridge Domain should flood ARP traffic .
- The APIC defaults new Bridge Domains to C ( no ) .
type : bool
default : no
default : ' no '
bd :
description :
- The name of the Bridge Domain .
@ -49,20 +49,20 @@ options:
- Determines if PIM is enabled
- The APIC defaults new Bridge Domains to C ( no ) .
type : bool
default : no
default : ' no '
enable_routing :
description :
- Determines if IP forwarding should be allowed .
- The APIC defaults new Bridge Domains to C ( yes ) .
type : bool
default : yes
default : ' yes '
endpoint_clear :
description :
- Clears all End Points in all Leaves when C ( yes ) .
- The APIC defaults new Bridge Domains to C ( no ) .
- The value is not reset to disabled once End Points have been cleared ; that requires a second task .
type : bool
default : no
default : ' no '
endpoint_move_detect :
description :
- Determines if GARP should be enabled to detect when End Points move .
@ -109,7 +109,7 @@ options:
- Determines if the BD should limit IP learning to only subnets owned by the Bridge Domain .
- The APIC defaults new Bridge Domains to C ( yes ) .
type : bool
default : yes
default : ' yes '
mac_address :
description :
- The MAC Address to assign to the C ( bd ) instead of using the default .
@ -145,7 +145,7 @@ EXAMPLES = r'''
host : " {{ inventory_hostname }} "
username : " {{ username }} "
password : " {{ password }} "
validate_certs : false
validate_certs : no
state : present
tenant : prod
bd : web_servers
@ -157,7 +157,7 @@ EXAMPLES = r'''
host : " {{ inventory_hostname }} "
username : " {{ username }} "
password : " {{ password }} "
validate_certs : false
validate_certs : no
state : present
tenant : prod
bd : storage
@ -170,7 +170,7 @@ EXAMPLES = r'''
host : " {{ inventory_hostname }} "
username : " {{ username }} "
password : " {{ password }} "
validate_certs : true
validate_certs : yes
state : present
tenant : prod
bd : web_servers
@ -182,7 +182,7 @@ EXAMPLES = r'''
host : " {{ inventory_hostname }} "
username : " {{ username }} "
password : " {{ password }} "
validate_certs : true
validate_certs : yes
state : query
- name : Query a Bridge Domain
@ -190,7 +190,7 @@ EXAMPLES = r'''
host : " {{ inventory_hostname }} "
username : " {{ username }} "
password : " {{ password }} "
validate_certs : true
validate_certs : yes
state : query
tenant : prod
bd : web_servers
@ -200,7 +200,7 @@ EXAMPLES = r'''
host : " {{ inventory_hostname }} "
username : " {{ username }} "
password : " {{ password }} "
validate_certs : true
validate_certs : yes
state : absent
tenant : prod
bd : web_servers
@ -215,22 +215,22 @@ from ansible.module_utils.basic import AnsibleModule
def main ( ) :
argument_spec = aci_argument_spec ( )
argument_spec . update (
arp_flooding = dict ( choices = [ ' no ' , ' yes ' ] ) ,
arp_flooding = dict ( type = ' bool ' ) ,
bd = dict ( type = ' str ' , aliases = [ ' bd_name ' , ' name ' ] ) ,
bd_type = dict ( type = ' str ' , choices = [ ' ethernet ' , ' fc ' ] ) ,
description = dict ( type = ' str ' ) ,
enable_multicast = dict ( type = ' str' , choices = [ ' no ' , ' yes ' ] ) ,
enable_routing = dict ( type = ' str' , choices = [ ' no ' , ' yes ' ] ) ,
endpoint_clear = dict ( type = ' str' , choices = [ ' no ' , ' yes ' ] ) ,
enable_multicast = dict ( type = ' bool' ) ,
enable_routing = dict ( type = ' bool' ) ,
endpoint_clear = dict ( type = ' bool' ) ,
endpoint_move_detect = dict ( type = ' str ' , choices = [ ' default ' , ' garp ' ] ) ,
endpoint_retention_action = dict ( type = ' str ' , choices = [ ' inherit ' , ' resolve ' ] ) ,
endpoint_retention_policy = dict ( type = ' str ' ) ,
igmp_snoop_policy = dict ( type = ' str ' ) ,
ip_learning = dict ( type = ' str' , choices = [ ' no ' , ' yes ' ] ) ,
ip_learning = dict ( type = ' bool' ) ,
ipv6_nd_policy = dict ( type = ' str ' ) ,
l2_unknown_unicast = dict ( choices = [ ' proxy ' , ' flood ' ] ) ,
l3_unknown_multicast = dict ( choices = [ ' flood ' , ' opt-flood ' ] ) ,
limit_ip_learn = dict ( type = ' str' , choices = [ ' no ' , ' yes ' ] ) ,
limit_ip_learn = dict ( type = ' bool' ) ,
mac_address = dict ( type = ' str ' , aliases = [ ' mac ' ] ) ,
multi_dest = dict ( choices = [ ' bd-flood ' , ' drop ' , ' encap-flood ' ] ) ,
state = dict ( choices = [ ' absent ' , ' present ' , ' query ' ] , type = ' str ' , default = ' present ' ) ,
@ -252,16 +252,18 @@ def main():
] ,
)
arp_flooding = module . params [ ' arp_flooding ' ]
aci = ACIModule ( module )
arp_flooding = aci . boolean ( module . params [ ' arp_flooding ' ] )
bd = module . params [ ' bd ' ]
bd_type = module . params [ ' bd_type ' ]
if bd_type == ' ethernet ' :
# ethernet type is represented as regular, but that is not clear to the users
bd_type = ' regular '
description = module . params [ ' description ' ]
enable_multicast = module. params [ ' enable_multicast ' ]
enable_routing = module. params [ ' enable_routing ' ]
endpoint_clear = module. params [ ' endpoint_clear ' ]
enable_multicast = aci. boolean ( module. params [ ' enable_multicast ' ] )
enable_routing = aci. boolean ( module. params [ ' enable_routing ' ] )
endpoint_clear = aci. boolean ( module. params [ ' endpoint_clear ' ] )
endpoint_move_detect = module . params [ ' endpoint_move_detect ' ]
if endpoint_move_detect == ' default ' :
# the ACI default setting is an empty string, but that is not a good input value
@ -269,11 +271,11 @@ def main():
endpoint_retention_action = module . params [ ' endpoint_retention_action ' ]
endpoint_retention_policy = module . params [ ' endpoint_retention_policy ' ]
igmp_snoop_policy = module . params [ ' igmp_snoop_policy ' ]
ip_learning = module. params [ ' ip_learning ' ]
ip_learning = aci. boolean ( module. params [ ' ip_learning ' ] )
ipv6_nd_policy = module . params [ ' ipv6_nd_policy ' ]
l2_unknown_unicast = module . params [ ' l2_unknown_unicast ' ]
l3_unknown_multicast = module . params [ ' l3_unknown_multicast ' ]
limit_ip_learn = module. params [ ' limit_ip_learn ' ]
limit_ip_learn = aci. boolean ( module. params [ ' limit_ip_learn ' ] )
mac_address = module . params [ ' mac_address ' ]
multi_dest = module . params [ ' multi_dest ' ]
state = module . params [ ' state ' ]
@ -285,7 +287,6 @@ def main():
module . _warnings = [ " The support for managing Subnets has been moved to its own module, aci_subnet. \
The new modules still supports ' gateway_ip ' and ' subnet_mask ' along with more features " ]
aci = ACIModule ( module )
aci . construct_url (
root_class = dict (
aci_class = ' fvTenant ' ,