- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 03:12 AM
I only want to filter out the names of the interfaces of a switch using the command "Show interface status". How can I apply filtering to this command?
Solved! Go to Solution.
- Labels:
-
Other Switches
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022 03:40 AM
now i feel look bright your explantion :
https://pynet.twb-tech.com/blog/netmiko-python-library.html
i used document - get dynamic VLAN all over my network 1000 switches, good to get in to CSV and use later..
good learning.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 03:19 AM
if the port have description, you can do below : (if not please let us know)
#show interfaces description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 03:26 AM
#sh ip int brief
Jitendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 08:26 AM
Actually I am writing a python script ...so I want to filter out only the names of the interfaces to append them to a separate python list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 09:01 AM
give some example for to suggest better ?
command level give us the output with show commands ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 11:32 AM
this is command reference
show interfaces [interface interface-number] status [err-disabled | module number | vlan vlan]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 12:32 PM
You might also pipe the output and possibly "include" or "exclude" what you want to capture from your show interface status command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 09:55 PM - edited 07-07-2022 09:56 PM
My problem got solved using use_textfsm = True in the netmiko library.
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 11:46 PM
textfsm, TTS, genie - good modules (i used lot)
since we do not know your requirement - we are not suggested or given advise as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022 12:52 AM
I was supposed to filter out the output of the command show interface status to get only the interface names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022 03:40 AM
now i feel look bright your explantion :
https://pynet.twb-tech.com/blog/netmiko-python-library.html
i used document - get dynamic VLAN all over my network 1000 switches, good to get in to CSV and use later..
good learning.
