Module contents

The classes within define the management of a cluster of BIG_IP devices.


Cluster: The manager of the TrustDomain and DeviceGroup objects. TrustDomain: a group of BIG-IP® devices that have exchanged certificates

and trust one another
DeviceGroup: a group of BIG-IP® device that sync configuration data and
failover connections.

Clustering is broken down into three component parts: a cluster manager, a trust domain, and a device group. The cluster manager presents the external interface to a user for operations like create, teardown etc....

To create a device service group (aka cluster) of devices, those devices must trust one another. This is coordinated by the TrustDomain class. Once those devices trust one another, a device group is created and each is added to the group. After this step, a cluster exists.

Currently the only supported type of cluster is a ‘sync-failover’ cluster. The number of devices supported officially is currently two, for an active-standby cluster, but the code below can accommodate a four-member cluster.


  • create – creates a cluster based on kwargs given by user
  • teardown – tears down an existing cluster


There are two major use-cases here:

  • Manage an existing cluster:

    list_of_bigips = [ManagementRoot(...), ManagementRoot(...)] cluster_mgr = ClusterManager(

    devices=list_of_bigips, device_group_name=’my_cluster’, device_group_type=’sync-failover’, device_group_partition=’Common’


    assert cluster_mgr.cluster.devices == list_of_bigips

  • Create a new cluster and manage it:

    list_of_bigips = [ManagementRoot(...), ManagementRoot(...)] cluster_mgr = ClusterManager() cluster_mgr.create(

    devices=list_of_bigips, device_group_name=’my_cluster’, device_group_type=’sync-failover’, device_group_partition=’Common


    assert cluster_mgr.cluster.devices == list_of_bigips

class f5.multi_device.cluster.Cluster(device_group_name, device_group_type, device_group_partition, devices)

Bases: tuple

count(value) → integer -- return number of occurrences of value

Alias for field number 0


Alias for field number 2


Alias for field number 1


Alias for field number 3

index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

class f5.multi_device.cluster.ClusterManager(**kwargs)[source]

Bases: object

Manage a cluster of BIG-IP® devices.

This is accomplished with REST URI calls only, but some operations are only permitted via tmsh commands (such as adding cm/trust-domain peers). We get around this issue by deploying iApps (sys/application).


Manage an existing cluster

Parameters:kwargs – dict – keyword args in dict

Create a cluster of BIG-IP® devices.

Parameters:kwargs – dict – keyword arguments for cluster manager

Teardown the cluster of BIG-IP® devices.

f5.multi_device.cluster The classes within define the management of a cluster of BIG_IP devices.