Fixing nxos_vrf_interface when interface name is not full (#22769)

(cherry picked from commit d7d76f3aaf)
pull/22995/head
Gabriele 8 years ago committed by Peter Sprygada
parent 8b9ccc15f7
commit 30734d178c

@ -173,6 +173,10 @@ def get_vrf_list(module):
def get_interface_info(interface, module): def get_interface_info(interface, module):
if not interface.startswith('loopback'): if not interface.startswith('loopback'):
interface = interface.capitalize() interface = interface.capitalize()
interface_type = get_interface_type(interface)
intf_module = re.split('\d+', interface)[0]
intf_name = interface_type + interface.split(intf_module)[1]
command = 'show run | section interface.{0}'.format(interface) command = 'show run | section interface.{0}'.format(interface)
vrf_regex = ".*vrf\s+member\s+(?P<vrf>\S+).*" vrf_regex = ".*vrf\s+member\s+(?P<vrf>\S+).*"

Loading…
Cancel
Save