Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Get trunk port
#1
Hi, I am creating a code to creat vlan and find the trunk port on a Avaya switch.
So i am wondering how do i get only the trunk ports and adds to get members vlan.

show autotopology nmm-table
LSlot RSlot
LPort IP Addr Seg ID MAC Addr Chassis Type BT LS CS RPort
----- --------------- -------- ------------ ---------------- -- --- ---- -----
0/ 0 XXXXXXXXXX XXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XX XXX HTBT XX
1/49 XXXXXXXXXX XXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XX XXX HTBT XX
1/50 XXXXXXXXXX XXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XX XXX HTBT XX

I want to save 1/49 and 1/50 to Trunk-port value

import getpass
import sys
import telnetlib

tn.write("conf t\n")
Trunk-port = tn.write("autotopology nmm-table\n")
tn.write("vlan create 1234 name TEST-VLAN type port\n")
tn.write("vlan members add 1234" + Trunk-port + "\n")
tn.write("save config\n")
tn.write("end\n")
scidam wrote Jul-11-2019, 07:49 AM:
Please post all code, output and errors (in it's entirety) between their respective tags. I did it for you this time, Here are instructions on how to do it yourself next time.
Quote
#2
is this helpful?
https://forums.networkinfrastructure.inf...ve-the-ip/
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)