Reply

Finding a list size from Perl?

DaveHartburn
Techie
Posts: 14
2070     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.

Re: Finding a list size from Perl?

Adviser
Posts: 357
2071     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

Re: Finding a list size from Perl?

Adviser
Posts: 357
2071     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