Skip to content

Commit

Permalink
Fixes issue with single digit port channels.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Nanney committed Aug 3, 2015
1 parent 4386c3a commit ff86f6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/nxos_vpc_interface
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ def main():
if vpc:
mapping = \
nxapi_lib.get_existing_portchannel_to_vpc_mappings(device)
if vpc in mapping.keys() and portchannel != mapping[vpc][-2:]:
if vpc in mapping.keys() and portchannel != mapping[vpc].strip('Po'):
module.fail_json(msg="This vpc is already configured on "
+ "another portchannel. Remove it first "
+ "before trying to assign it here. ",
existing_portchannel=mapping[vpc])

for vpcid, existing_pc in mapping.iteritems():
if portchannel == existing_pc[-2:] and vpcid != vpc:
if portchannel == existing_pc.strip('Po') and vpcid != vpc:
module.exit_json(msg="This portchannel already has another"
+ " VPC configured. Remove it first "
+ "before assigning this one",
Expand Down

0 comments on commit ff86f6f

Please sign in to comment.