1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
This commit is contained in:
rahushen 2017-10-06 07:40:03 -04:00 committed by Trishna Guha
parent 146f90e16b
commit 0218fdcd80
2 changed files with 6 additions and 5 deletions

View file

@ -181,7 +181,7 @@ def get_vpc(module):
pkl_vrf = None
peer_gw = False
run = get_config(module, flags=['section vpc'])
run = get_config(module, flags=['vpc'])
if run:
vpc_list = run.split('\n')
for each in vpc_list:

View file

@ -131,7 +131,7 @@ def get_existing_portchannel_to_vpc_mappings(module):
def peer_link_exists(module):
found = False
run = get_config(module, flags=['section vpc'])
run = get_config(module, flags=['vpc'])
vpc_list = run.split('\n')
for each in vpc_list:
@ -262,9 +262,10 @@ def main():
active_peer_link = None
if portchannel not in get_portchannel_list(module):
module.fail_json(msg="The portchannel you are trying to make a"
" VPC or PL is not created yet. "
"Create it first!")
if not portchannel.isdigit() or int(portchannel) not in get_portchannel_list(module):
module.fail_json(msg="The portchannel you are trying to make a"
" VPC or PL is not created yet. "
"Create it first!")
if vpc:
mapping = get_existing_portchannel_to_vpc_mappings(module)