cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
969
Views
0
Helpful
1
Replies

pyATS Schema Question : NXOS Parser

SteveNelson29701
Beginner
Beginner

Hi Guys

 

I am hoping someone may be able to help with a basic pyATS query surrounding an NXOS parser.

 

I am using the parser for the command 'show ip interface vrf <vrf_name>' and capturing this within my python script to a variable.

 

I can see in the schema the following at the head :

 

{ Any (str) *: { 'vrf': <class 'str'>, 'interface_status': <class 'str'>, 'iod': <class 'int'>,

 

When I run the parser the the variable is populated with the relevant output, however what I would like to do is look up the status for all vLANS. I am using the following code snippet :

pre_status = pre_output ['VlanXXX']['interface_status']

 

However the above requires that I define the Vlan ID within the command.


Is there a way to use a wildcard initially and capture all of the statuses for the output ?

 

Thanks

 

Steve

1 Reply 1

SteveNelson29701
Beginner
Beginner

Hi 

 

I resolved this issue, no resposnses required

 

Thanks


Steve

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: