Forum Discussion

BaltoStar_12467's avatar
Oct 03, 2014

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.

 

10 Replies

  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    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.

  • 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.

  • 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.
    • get_list() does not take any args -- how to specify the BIG-IP device for which I am retrieving device-groups ?
  • Greg_Chew_31149's avatar
    Greg_Chew_31149
    Historic 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.

     

    • BaltoStar_12467's avatar
      BaltoStar_12467
      Thanks Greg. Ok but how to direct the call to Management.DeviceGroup.get_list() to a specific device ?