f5.bigip.tm

Classes and functions for configuring BIG-IP

Subpackage List

asm BIG-IP® Application Security Manager™ (ASM®) module.
auth BIG-IP® auth module
cm BIG-IP® cluster module
gtm BIG-IP® Global Traffic Manager™ (GTM®) module.
ltm BIG-IP® Local Traffic Manager™ (LTM®) module.
net BIG-IP® net module
security BIG-IP® Security module.
shared BIG-IP® Shared (shared) module
sys BIG-IP® System (sys) module
transaction BIG-IP® system dns module
util BIG-IP® Utility (util) module
vcmp BIG-IP® VCMP (vcmp) module
class f5.bigip.tm.Tm(bigip)[source]

Bases: f5.bigip.resource.OrganizingCollection

An organizing collection for TM resources.

create(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
delete(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
get_collection(**kwargs)

Call to obtain a list of the reference dicts in the instance items

Returns:
list: List of self.items
modify(**patch)

Modify the configuration of the resource on device based on patch

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values
refresh(**kwargs)

Use this to make the device resource be represented by self.

This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)

update(**kwargs)

Update the configuration of the resource on the BIG-IP®.

This method uses HTTP PUT alter the resource state on the BIG-IP®.

The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.

Various edge cases are handled: * read-only attributes that are unchangeable are removed

Args:
kwargs (dict): Arbitrary number of keyword arguments.

Keys and associated values to alter on the device.

If kwargs has a requests_params key the corresponding dict will be passed to the underlying requests.session.put method where it will be handled according to that API.

Subpackages

asm

BIG-IP® Application Security Manager™ (ASM®) module.

REST URI
http://localhost/mgmt/tm/asm/
GUI Path
Security
REST Kind
tm:asm:*
class f5.bigip.tm.asm.Asm(tm)[source]

Bases: f5.bigip.resource.OrganizingCollection

BIG-IP® Application Security Manager (ASM) organizing

collection.

create(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
delete(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
get_collection(**kwargs)

Call to obtain a list of the reference dicts in the instance items

Returns:
list: List of self.items
modify(**patch)

Modify the configuration of the resource on device based on patch

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values
refresh(**kwargs)

Use this to make the device resource be represented by self.

This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)

update(**kwargs)

Update the configuration of the resource on the BIG-IP®.

This method uses HTTP PUT alter the resource state on the BIG-IP®.

The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.

Various edge cases are handled: * read-only attributes that are unchangeable are removed

Args:
kwargs (dict): Arbitrary number of keyword arguments.

Keys and associated values to alter on the device.

If kwargs has a requests_params key the corresponding dict will be passed to the underlying requests.session.put method where it will be handled according to that API.

auth

BIG-IP® auth module

REST URI
http://localhost/mgmt/tm/auth/
GUI Path
System --> Users
REST Kind
tm:auth:*

cm

BIG-IP® cluster module

REST URI
http://localhost/mgmt/tm/cm/
GUI Path
Device Management
REST Kind
tm:cm:*
class f5.bigip.tm.cm.Cm(cm)[source]

Bases: f5.bigip.resource.OrganizingCollection, f5.bigip.mixins.CommandExecutionMixin

BIG-IP® Cluster Organizing Collection.

create(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
delete(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
exec_cmd(command, **kwargs)

Wrapper method that can be changed in the inheriting classes.

get_collection(**kwargs)

Call to obtain a list of the reference dicts in the instance items

Returns:
list: List of self.items
modify(**patch)

Modify the configuration of the resource on device based on patch

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values
refresh(**kwargs)

Use this to make the device resource be represented by self.

This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)

update(**kwargs)

Update the configuration of the resource on the BIG-IP®.

This method uses HTTP PUT alter the resource state on the BIG-IP®.

The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.

Various edge cases are handled: * read-only attributes that are unchangeable are removed

Args:
kwargs (dict): Arbitrary number of keyword arguments.

Keys and associated values to alter on the device.

If kwargs has a requests_params key the corresponding dict will be passed to the underlying requests.session.put method where it will be handled according to that API.

gtm

BIG-IP® Global Traffic Manager™ (GTM®) module.

REST URI
http://localhost/mgmt/tm/gtm/
GUI Path
DNS
REST Kind
tm:gtm:*
class f5.bigip.tm.gtm.Gtm(tm)[source]

Bases: f5.bigip.resource.OrganizingCollection

BIG-IP® Global Traffic Manager (GTM) organizing collection.

create(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
delete(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
get_collection(**kwargs)

Call to obtain a list of the reference dicts in the instance items

Returns:
list: List of self.items
modify(**patch)

Modify the configuration of the resource on device based on patch

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values
refresh(**kwargs)

Use this to make the device resource be represented by self.

This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)

update(**kwargs)

Update the configuration of the resource on the BIG-IP®.

This method uses HTTP PUT alter the resource state on the BIG-IP®.

The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.

Various edge cases are handled: * read-only attributes that are unchangeable are removed

Args:
kwargs (dict): Arbitrary number of keyword arguments.

Keys and associated values to alter on the device.

If kwargs has a requests_params key the corresponding dict will be passed to the underlying requests.session.put method where it will be handled according to that API.

ltm

BIG-IP® Local Traffic Manager™ (LTM®) module.

REST URI
http://localhost/mgmt/tm/ltm/
GUI Path
Local Traffic
REST Kind
tm:ltm:*
class f5.bigip.tm.ltm.Ltm(tm)[source]

Bases: f5.bigip.resource.OrganizingCollection

BIG-IP® Local Traffic Manager (LTM) organizing collection.

create(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
delete(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
get_collection(**kwargs)

Call to obtain a list of the reference dicts in the instance items

Returns:
list: List of self.items
modify(**patch)

Modify the configuration of the resource on device based on patch

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values
refresh(**kwargs)

Use this to make the device resource be represented by self.

This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)

update(**kwargs)

Update the configuration of the resource on the BIG-IP®.

This method uses HTTP PUT alter the resource state on the BIG-IP®.

The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.

Various edge cases are handled: * read-only attributes that are unchangeable are removed

Args:
kwargs (dict): Arbitrary number of keyword arguments.

Keys and associated values to alter on the device.

If kwargs has a requests_params key the corresponding dict will be passed to the underlying requests.session.put method where it will be handled according to that API.

net

BIG-IP® net module

REST URI
http://localhost/mgmt/tm/net/
GUI Path
Network
REST Kind
tm:net:*

security

BIG-IP® Security module.

REST URI
http://localhost/mgmt/tm/security
GUI Path
Security
REST Kind
tm:security:*
class f5.bigip.tm.security.Security(tm)[source]

Bases: f5.bigip.resource.OrganizingCollection

BIG-IP® Security organizing collection.

create(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
delete(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
get_collection(**kwargs)

Call to obtain a list of the reference dicts in the instance items

Returns:
list: List of self.items
modify(**patch)

Modify the configuration of the resource on device based on patch

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values
refresh(**kwargs)

Use this to make the device resource be represented by self.

This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)

update(**kwargs)

Update the configuration of the resource on the BIG-IP®.

This method uses HTTP PUT alter the resource state on the BIG-IP®.

The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.

Various edge cases are handled: * read-only attributes that are unchangeable are removed

Args:
kwargs (dict): Arbitrary number of keyword arguments.

Keys and associated values to alter on the device.

If kwargs has a requests_params key the corresponding dict will be passed to the underlying requests.session.put method where it will be handled according to that API.

shared

BIG-IP® Shared (shared) module

REST URI
http://localhost/mgmt/tm/shared/
GUI Path
System
REST Kind
N/A – HTTP GET returns an error
class f5.bigip.tm.shared.Shared(bigip)[source]

Bases: f5.bigip.resource.PathElement

BIG-IP® System Shared Utility (shared) collection.

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values

sys

BIG-IP® System (sys) module

REST URI
http://localhost/mgmt/tm/sys/
GUI Path
System
REST Kind
tm:sys:*
class f5.bigip.tm.sys.Sys(tm)[source]

Bases: f5.bigip.resource.OrganizingCollection

BIG-IP® System (sys) organizing collection.

create(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
delete(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
get_collection(**kwargs)

Call to obtain a list of the reference dicts in the instance items

Returns:
list: List of self.items
modify(**patch)

Modify the configuration of the resource on device based on patch

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values
refresh(**kwargs)

Use this to make the device resource be represented by self.

This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)

update(**kwargs)

Update the configuration of the resource on the BIG-IP®.

This method uses HTTP PUT alter the resource state on the BIG-IP®.

The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.

Various edge cases are handled: * read-only attributes that are unchangeable are removed

Args:
kwargs (dict): Arbitrary number of keyword arguments.

Keys and associated values to alter on the device.

If kwargs has a requests_params key the corresponding dict will be passed to the underlying requests.session.put method where it will be handled according to that API.

transaction

BIG-IP® system dns module

REST URI
http://localhost/mgmt/tm/transaction
REST Kind
tm:transaction*
class f5.bigip.tm.transaction.Transactions(api)[source]

Bases: f5.bigip.resource.Collection

This class is a context manager for iControl transactions.

Upon successful exit of the with statement, the transaction will be submitted, otherwise it will be rolled back.

NOTE: This feature was added to BIGIP in version 11.0.0.

Example: > bigip = BigIP(<args>) > tx = bigip.transactions.transaction > with TransactionContextManager(tx) as api: > api.net.pools.pool.create(name=”foo”) > api.sys.dbs.db.update(name=”setup.run”, value=”false”) > <perform actions inside a transaction> > > # transaction is committed when you exit the “with” statement.

create(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
delete(**kwargs)

Implement this by overriding it in a subclass of Resource

Raises:
InvalidResource: If method is used.
get_collection(**kwargs)

Get an iterator of Python Resource objects that represent URIs.

The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.

Note

This method implies a single REST transaction with the Collection subclass URI.

Raises:UnregisteredKind
Returns:list of reference dicts and Python Resource objects
modify(**patch)

Modify the configuration of the resource on device based on patch

raw

Display the attributes that the current object has and their values.

Returns:A dictionary of attributes and their values
refresh(**kwargs)

Use this to make the device resource be represented by self.

This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)

update(**kwargs)

Update the configuration of the resource on the BIG-IP®.

This method uses HTTP PUT alter the resource state on the BIG-IP®.

The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.

Various edge cases are handled: * read-only attributes that are unchangeable are removed

Args:
kwargs (dict): Arbitrary number of keyword arguments.

Keys and associated values to alter on the device.

If kwargs has a requests_params key the corresponding dict will be passed to the underlying requests.session.put method where it will be handled according to that API.

util

BIG-IP® Utility (util) module

REST URI
http://localhost/mgmt/tm/util/
GUI Path
System
REST Kind
N/A – HTTP GET returns an error

vcmp

BIG-IP® VCMP (vcmp) module

REST URI
http://localhost/mgmt/tm/vcmp/
GUI Path
vCMP
REST Kind
tm:vcmp:*