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