Forum Discussion
BIG-IP : iControl API retrieve device-groups and members
F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi
Does iControl API provide methods to retrieve the following info :
-- list of device-groups a device belongs to ?
Main > Device Management > Device Groups > Device Group List
-- device-group members
Properties > Members
Please note that Management.DeviceGroup class constructor doesn’t take any args – so how to specify the hostname/ip ?
In other iControl classes ( such as System.ConfigSync ) the constructor accepts args ( hostname, username, password, timeout ) that are used to connect to the BIG-IP device for all of the class member methods.
- kunjanNimbostratus
curl -sk -u 'admin:admin' https://mgmt-ip/mgmt/tm/cm/device-group/~Common~myDeviceGroup/devices | python -m json.tool
Tested in 11.5.1. I think won't work with 11.4.0.
- Thanks kunjan but I am need a programmatic solution via iControl API
- kunjan_118660Cumulonimbus
curl -sk -u 'admin:admin' https://mgmt-ip/mgmt/tm/cm/device-group/~Common~myDeviceGroup/devices | python -m json.tool
Tested in 11.5.1. I think won't work with 11.4.0.
- Thanks kunjan but I am need a programmatic solution via iControl API
- Tim_K_92675Cirrostratus
Have you looked here in the icontrol wiki?
https://devcentral.f5.com/wiki/iControl.Management__DeviceGroup.ashx https://devcentral.f5.com/wiki/iControl.Management__DeviceGroup__get_device.ashx
- Thanks Tim K. But those methods assume Device Group names are known. First, I need to retrieve the names of the Device Groups that a device belongs to.
- Tim_K_92675Cirrostratusget_list does that
- get_list() does not take any args -- how to specify the BIG-IP device for which I am retrieving device-groups ?
- Greg_Chew_31149Historic F5 Account
The iControl call is directed to a specific F5 device (by host name or the IP address). This is how you specify the BIG-IP device for the get_list() call.
- Thanks Greg. Ok but how to direct the call to Management.DeviceGroup.get_list() to a specific device ?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com