f5.bigip.tm.gtm
Module contents
BIG-IP® Global Traffic Manager™ (GTM®) module.
- REST URI
http://localhost/mgmt/tm/gtm/
- GUI Path
DNS
- REST Kind
tm:gtm:*
Submodule List
BIG-IP® Global Traffic Manager (GTM) datacenter module. |
|
BIG-IP® Global Traffic Manager™ (GTM®) global-settings submodule. |
|
BIG-IP® Global Traffic Manager™ (GTM®) Topology Records module. |
|
BIG-IP® GTM monitor submodule. |
|
BIG-IP® Global Traffic Manager™ (GTM®) pool module. |
|
BIG-IP® Global Traffic Manager™ (GTM®) Region module. |
|
BIG-IP® Global Traffic Manager (GTM) rule module. |
|
BIG-IP® Global Traffic Manager™ (GTM®) pool module. |
|
BIG-IP® Global Traffic Manager™ (GTM®) Topology Records module. |
|
BIG-IP® Global Traffic Manager™ (GTM®) pool module. |
Submodules
datacenter
BIG-IP® Global Traffic Manager (GTM) datacenter module.
- REST URI
http://localhost/mgmt/tm/gtm/datacenter
- GUI Path
DNS --> GSLB : Data Centers
- REST Kind
tm:gtm:datacenter:*
- class f5.bigip.tm.gtm.datacenter.Datacenter(dc_s)[source]
BIG-IP® GTM datacenter resource
- create(**kwargs)[source]
Create the resource on the BIG-IP®.
Uses HTTP POST to the collection URI to create a resource associated with a new unique URI on the device.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
All the key-values needed to create the resource.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.post
method where it will be handled according to that API.
- Returns:
- Resource: A python object that represents the object’s configuration
and state on the BIG-IP®.
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- refresh(**kwargs)[source]
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)[source]
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 underlyingrequests.session.put
method where it will be handled according to that API.
global_settings
BIG-IP® Global Traffic Manager™ (GTM®) global-settings submodule.
- REST URI
http://localhost/mgmt/tm/gtm/global-settings
- GUI Path
DNS --> Settings --> GSLB
- REST Kind
tm:gtm:global-settings*
- class f5.bigip.tm.gtm.global_settings.Global_Settings(gtm)[source]
BIG-IP® GTM global-settings organizing collection.
- class f5.bigip.tm.gtm.global_settings.General(global_settings)[source]
BIG-IP® GTM global-settings general resource.
listener
BIG-IP® Global Traffic Manager™ (GTM®) Topology Records module.
- REST URI
http://localhost/mgmt/tm/gtm/listener
- GUI Path
DNS --> Delivery : Topology : Records
- REST Kind
tm:gtm:listener:*
- class f5.bigip.tm.gtm.listener.Listener(listeners)[source]
BIG-IP® GTM Listener resource
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- class f5.bigip.tm.gtm.listener.Profiles_s(server)[source]
BIG-IP® GTM Listener Profile sub-collection
- class f5.bigip.tm.gtm.listener.Profile(profiles)[source]
BIG-IP® GTM Listener Profile sub-collection
Since GTM listener is a wrapper for LTM virtual, profile removal and profile attachment should be done via the created LTM virtual. Only loading or refresh of profiles is supported. Remainder of operations(Create, Update, Modify, Delete) should be done via LTM Virtual Server Profiles endpoint.
- create(**kwargs)[source]
Create is not supported for profile sub-collection
- Raises:
UnsupportedOperation
- modify(**kwargs)[source]
Modify is not supported for profile sub-collection
- Raises:
UnsupportedOperation
monitor
BIG-IP® GTM monitor submodule.
- REST URI
http://localhost/mgmt/tm/gtm/monitor/
- GUI Path
DNS --> GSLB --> Monitors
- REST Kind
tm:gtm:monitor*
- class f5.bigip.tm.gtm.monitor.Postgresqls(monitor)[source]
BIG-IP® PostGRES SQL monitor collection.
- class f5.bigip.tm.gtm.monitor.Postgresql(postgresqls)[source]
BIG-IP® PostGRES SQL monitor resource.
- class f5.bigip.tm.gtm.monitor.Radius_Accountings(monitor)[source]
BIG-IP® radius accounting monitor collection.
- class f5.bigip.tm.gtm.monitor.Radius_Accounting(radius_accountings)[source]
BIG-IP® radius accounting monitor resource.
- class f5.bigip.tm.gtm.monitor.Real_Servers(monitor)[source]
BIG-IP® real-server monitor collection.
- class f5.bigip.tm.gtm.monitor.Real_Server(real_servers)[source]
BIG-IP® real-server monitor resource.
- update(**kwargs)[source]
Change the configuration of the resource on the device.
This method uses Http PUT alter the service state on the device.
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
tmCommand
attribute removed prior to PUTagent
attribute removed prior to PUTpost
attribute removed prior to PUT
- Parameters:
kwargs – keys and associated values to alter on the device
- class f5.bigip.tm.gtm.monitor.Wmi(wmis)[source]
- update(**kwargs)[source]
Change the configuration of the resource on the device.
This method uses Http PUT alter the service state on the device.
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
agent
attribute removed prior to PUTpost
attribute removed prior to PUTmethod
attribute removed prior to PUT
- Parameters:
kwargs – keys and associated values to alter on the device
pool
BIG-IP® Global Traffic Manager™ (GTM®) pool module.
- REST URI
http://localhost/mgmt/tm/gtm/pool
- GUI Path
DNS --> GSLB : Pools
- REST Kind
tm:gtm:pools:*
- class f5.bigip.tm.gtm.pool.Pools(container)[source]
BIG-IP® GTM Pool factory
The GTM Pool factory object is used to provide a consistent user experience across the SDK, while supporting the breaking changes in the BIG-IP APIs.
Between the 11.x and 12.x releases of BIG-IP, the REST endpoint for Pool changed from a Collection to an OrganizingCollection. The result is that breaking changes occurred in the API.
This breakage led to a discussion on naming conventions because there appeared to be a conflict now. For example, depending on your version, only one of the following would work.
For 11.x,
tm.gtm.pools.pool.load(name=’foo’)
For 12.x,
tm.gtm.pools.a_s.a.load(name=’foo’)
but not both. To stick with a consistent user experience, we decided to override the __new__ method to support both examples above. The SDK automatically detects which one to use based on the BIG-IP you are communicating with.
- class f5.bigip.tm.gtm.pool.Members_s(container)[source]
BIG-IP® GTM Members_s factory
The GTM Members_s factory is used here for code readability and maintenance purposes, to allow us to stay in conventions already set in this SDK, and at the same time accommodate changes between v11 and v12 versions of Members_s sub-collection
- class f5.bigip.tm.gtm.pool.MembersCollection_v11(pool)[source]
v11.x BIG-IP® GTM pool members sub-collection
- class f5.bigip.tm.gtm.pool.MembersCollectionA(pool)[source]
v12.x BIG-IP® GTM A pool members sub-collection
- class f5.bigip.tm.gtm.pool.MembersCollectionAAAA(pool)[source]
v12.x BIG-IP® GTM AAAA pool members sub-collection
- class f5.bigip.tm.gtm.pool.MembersCollectionCname(pool)[source]
v12.x BIG-IP® GTM CNAME pool members sub-collection
- class f5.bigip.tm.gtm.pool.MembersCollectionMx(pool)[source]
v12.x BIG-IP® GTM MX pool members sub-collection
- class f5.bigip.tm.gtm.pool.MembersCollectionNaptr(pool)[source]
v12.x BIG-IP® GTM NAPTR pool members sub-collection
- class f5.bigip.tm.gtm.pool.MembersCollectionSrv(pool)[source]
v12.x BIG-IP® GTM SRV pool members sub-collection
- class f5.bigip.tm.gtm.pool.Member(container)[source]
BIG-IP® GTM Members factory
The GTM Members factory is used here for code readability and maintenance purposes, to allow us to stay in conventions already set in this SDK, and at the same time accommodate changes between v11 and v12 versions of Members resource
- class f5.bigip.tm.gtm.pool.MembersResource_v11(members_s)[source]
v11.x BIG-IP® GTM members resource
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- refresh(**kwargs)[source]
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)
- delete(**kwargs)[source]
Delete the resource on the BIG-IP®.
Uses HTTP DELETE to delete the resource on the BIG-IP®.
After this method is called, and status_code 200 response is received
instance.__dict__
is replace with{'deleted': True}
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
The only current use is to pass kwargs to the requests API.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.delete
method where it will be handled according to that API.Use the method above to pass query args.
- class f5.bigip.tm.gtm.pool.MembersResourceA(members_s)[source]
v12.x BIG-IP® GTM A pool members resource
- create(**kwargs)[source]
This method needs to be created due to a bug in 12.x
The issue arises when you attempt to create a members sub-collection resource and while the operation succeeds BIGIP responds with 404.
By requiring partition as argument we have shielded ourselves from this issue in 12.0.0, however in v12.1.x the problem occurs, even when the partition parameter is submitted. Custom create method is required to catch and deal with iControlUnexpectedHTTPError exception.
Issue is tracked under: ID610441.
- note:: If version is 12.x then we use this method, otherwise we use
_create method from Resource class as usual.
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- refresh(**kwargs)[source]
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)
- delete(**kwargs)[source]
Delete the resource on the BIG-IP®.
Uses HTTP DELETE to delete the resource on the BIG-IP®.
After this method is called, and status_code 200 response is received
instance.__dict__
is replace with{'deleted': True}
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
The only current use is to pass kwargs to the requests API.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.delete
method where it will be handled according to that API.Use the method above to pass query args.
- class f5.bigip.tm.gtm.pool.MembersResourceAAAA(members_s)[source]
v12.x BIG-IP® GTM AAAA pool members resource
- create(**kwargs)[source]
This method needs to be created due to a bug in 12.x
The issue arises when you attempt to create a members sub-collection resource and while the operation succeeds BIGIP responds with 404.
By requiring partition as argument we have shielded ourselves from this issue in 12.0.0, however in v12.1.x the problem occurs, even when the partition parameter is submitted. Custom create method is required to catch and deal with iControlUnexpectedHTTPError exception.
Issue is tracked under: ID610441.
- note:: If version is 12.x then we use this method, otherwise we use
_create method from Resource class as usual.
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- refresh(**kwargs)[source]
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)
- delete(**kwargs)[source]
Delete the resource on the BIG-IP®.
Uses HTTP DELETE to delete the resource on the BIG-IP®.
After this method is called, and status_code 200 response is received
instance.__dict__
is replace with{'deleted': True}
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
The only current use is to pass kwargs to the requests API.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.delete
method where it will be handled according to that API.Use the method above to pass query args.
- class f5.bigip.tm.gtm.pool.MembersResourceCname(members_s)[source]
v12.x BIG-IP® GTM CNAME pool members resource
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- refresh(**kwargs)[source]
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)
- delete(**kwargs)[source]
Delete the resource on the BIG-IP®.
Uses HTTP DELETE to delete the resource on the BIG-IP®.
After this method is called, and status_code 200 response is received
instance.__dict__
is replace with{'deleted': True}
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
The only current use is to pass kwargs to the requests API.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.delete
method where it will be handled according to that API.Use the method above to pass query args.
- class f5.bigip.tm.gtm.pool.MembersResourceMx(members_s)[source]
v12.x BIG-IP® GTM MX pool members resource
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- refresh(**kwargs)[source]
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)
- delete(**kwargs)[source]
Delete the resource on the BIG-IP®.
Uses HTTP DELETE to delete the resource on the BIG-IP®.
After this method is called, and status_code 200 response is received
instance.__dict__
is replace with{'deleted': True}
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
The only current use is to pass kwargs to the requests API.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.delete
method where it will be handled according to that API.Use the method above to pass query args.
- class f5.bigip.tm.gtm.pool.MembersResourceNaptr(members_s)[source]
v12.x BIG-IP® GTM NAPTR pool members resource
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- refresh(**kwargs)[source]
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)
- delete(**kwargs)[source]
Delete the resource on the BIG-IP®.
Uses HTTP DELETE to delete the resource on the BIG-IP®.
After this method is called, and status_code 200 response is received
instance.__dict__
is replace with{'deleted': True}
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
The only current use is to pass kwargs to the requests API.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.delete
method where it will be handled according to that API.Use the method above to pass query args.
- class f5.bigip.tm.gtm.pool.MembersResourceSrv(members_s)[source]
v12.x BIG-IP® GTM SRV pool members resource
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- refresh(**kwargs)[source]
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)
- delete(**kwargs)[source]
Delete the resource on the BIG-IP®.
Uses HTTP DELETE to delete the resource on the BIG-IP®.
After this method is called, and status_code 200 response is received
instance.__dict__
is replace with{'deleted': True}
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
The only current use is to pass kwargs to the requests API.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.delete
method where it will be handled according to that API.Use the method above to pass query args.
region
BIG-IP® Global Traffic Manager™ (GTM®) Region module.
- REST URI
http://localhost/mgmt/tm/gtm/region
- GUI Path
DNS --> GSLB : Topology : Regions
- REST Kind
tm:gtm:region:*
rule
BIG-IP® Global Traffic Manager (GTM) rule module.
- REST URI
http://localhost/mgmt/tm/gtm/rule
- GUI Path
DNS --> GSLB : iRules
- REST Kind
tm:gtm:rule:*
server
BIG-IP® Global Traffic Manager™ (GTM®) pool module.
- REST URI
http://localhost/mgmt/tm/gtm/server
- GUI Path
DNS --> GSLB : Servers
- REST Kind
tm:gtm:server:*
- class f5.bigip.tm.gtm.server.Virtual_Servers_s(server)[source]
BIG-IP® GTM virtual server sub-collection
- class f5.bigip.tm.gtm.server.Virtual_Server(virtual_servers_s)[source]
BIG-IP® GTM virtual server resource
- load(**kwargs)[source]
Load an already configured service into this instance.
This method uses HTTP GET to obtain a resource from the BIG-IP®.
The URI of the target service is constructed from the instance’s container and
**kwargs
.kwargs
typically requires the keysname
andpartition
. this may, or may not, be true for a specific service.- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args
- Returns:
Resource: A Resource Instance with a populated
_meta_data['uri']
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Sends an HTTP GET to the URI of the named object and if it fails with a :exc:~requests.HTTPError` exception it checks the exception for status code of 404 and returns
False
in that case.If the GET is successful it returns
True
.For any other errors are raised as-is.
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.get
method where it will be handled according to that API.Use the method above to pass query args.
- Returns:
bool: True is the object exists. False otherwise.
- Raises:
requests.HTTPError: Any HTTP error that was not status code 404.
- refresh(**kwargs)[source]
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)
- delete(**kwargs)[source]
Delete the resource on the BIG-IP®.
Uses HTTP DELETE to delete the resource on the BIG-IP®.
After this method is called, and status_code 200 response is received
instance.__dict__
is replace with{'deleted': True}
- Args:
- **kwargs (dict): Arbitrary number of keyword arguments.
The only current use is to pass kwargs to the requests API.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.delete
method where it will be handled according to that API.Use the method above to pass query args.
topology
BIG-IP® Global Traffic Manager™ (GTM®) Topology Records module.
- REST URI
http://localhost/mgmt/tm/gtm/topology
- GUI Path
DNS --> GSLB : Topology : Records
- REST Kind
tm:gtm:topology:*
- class f5.bigip.tm.gtm.topology.Topology_s(gtm)[source]
BIG-IP® GTM Topology collection
Due to an bug where attempts to create/modify/load/delete etc. of this resource in 12.0.0 Final, we have disabled this resource for version 12.0.0
- class f5.bigip.tm.gtm.topology.Topology(topology_s)[source]
BIG-IP® GTM Topology resource
- create(**kwargs)[source]
Custom method to implement checking of kwarg[‘name’] contents.
- ::Warning:
Be sure to format the gtm topology OID string using the following rules:
Use only a single space between each item in the topology string.
2) Use a fully-pathed name for datacenter, isp, region, and pool objects.
For example: “ldns: subnet 11.11.11.0/24 server: datacenter /Common/DC”
wideip
BIG-IP® Global Traffic Manager™ (GTM®) pool module.
- REST URI
http://localhost/mgmt/tm/gtm/wideip
- GUI Path
DNS --> GSLB : Wide IPs
- REST Kind
tm:gtm:pools:*
- class f5.bigip.tm.gtm.wideip.Wideips(container)[source]
BIG-IP® GTM WideIP factory
The GTM WideIP factory object is used to provide a consistent user experience across the SDK, while supporting the breaking changes in the BIG-IP APIs.
Between the 11.x and 12.x releases of BIG-IP, the REST endpoint for WideIP changed from a Collection to an OrganizingCollection. The result is that breaking changes occurred in the API.
This breakage led to a discussion on naming conventions because there appeared to be a conflict now. For example, depending on your version, only one of the following would work.
For 11.x,
tm.gtm.wideips.wideip.load(name=’foo’)
For 12.x,
tm.gtm.wideips.a_s.a.load(name=’foo’)
but not both. To stick with a consistent user experience, we decided to override the __new__ method to support both examples above. The SDK automatically detects which one to use based on the BIG-IP you are communicating with.