Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Network Change & Configuration Management

Reply
Highlighted

Finding a list size from Perl?

Techie
Posts: 14
2329     0

Is it possible to determine the size (as in the number of rows) from a list in perl with NetMRI?

 

From the documentation, it appears that easy->get_list_value is the only method available. From the description, it sounds like wildcarding my search will not work or be helpful, as it returns the first matched value.

Highlighted

Re: Finding a list size from Perl?

Adviser
Posts: 353
2330     0
You have to use the lists API directly, not the convenience method on the "NetMRI_Easy" object.

Looks like you can use the "rows" API call with limit=1 and you'll see the total (and one row).

https://netmri/api/3/config_lists/rows?id=6&limit=1

See:

https://netmri/api/3/config_lists/docs#rows

The RESTful API calls map directly to the Perl modules.

John
Highlighted

Re: Finding a list size from Perl?

Adviser
Posts: 353
2330     0
You have to use the lists API directly, not the convenience method on the "NetMRI_Easy" object.

Looks like you can use the "rows" API call with limit=1 and you'll see the total (and one row).

https://netmri/api/3/config_lists/rows?id=6&limit=1

See:

https://netmri/api/3/config_lists/docs#rows

The RESTful API calls map directly to the Perl modules.

John
Showing results for 
Search instead for 
Do you mean 

Recommended for You