f5.bigip.tm.sys
Module contents
BIG-IP® System (sys) module
- REST URI
http://localhost/mgmt/tm/sys/
- GUI Path
System
- REST Kind
tm:sys:*
Submodule List
BIG-IP® iApp (application) module |
|
BIG-IP® system config module |
|
BIG-IP® system config module |
|
BIG-IP® system daemon log settings module |
|
BIG-IP® db module |
|
BIG-IP® system dns module |
|
BIG-IP® system failover module |
|
BIG-IP® system file module |
|
BIG-IP® system folder module |
|
BIG-IP® system global-settings module |
|
BIG-IP® system dns module |
|
BIG-IP® system icall module |
|
BIG-IP® system management IP module |
|
BIG-IP® system management route module |
|
BIG-IP® system ntp module |
|
BIG-IP® system peformance stats module. |
|
BIG-IP® system file module |
|
BIG-IP® system sflow module |
|
BIG-IP® SMTP Server module |
|
BIG-IP® SNMP submodule. |
|
BIG-IP® system sshd module |
|
BIG-IP® system syslog module |
|
BIG-IP® system config module |
Subpackages
BIG-IP® System Software module
- REST URI
http://localhost/mgmt/tm/sys/software
- GUI Path
System
- REST Kind
tm:sys:software:*
Submodules
application
BIG-IP® iApp (application) module
- REST URI
http://localhost/mgmt/sys/application/
- GUI Path
iApps
- REST Kind
tm:sys:application:*
- class f5.bigip.tm.sys.application.Customstats(application)[source]
BIG-IP® iApp custom stats sub-collection.
- class f5.bigip.tm.sys.application.Customstat(custom_stat_s)[source]
BIG-IP® iApp custom stats sub-collection resource.
- class f5.bigip.tm.sys.application.Services(application)[source]
BIG-IP® iApp service sub-collection.
- class f5.bigip.tm.sys.application.Service(service_s)[source]
BIG-IP® iApp service sub-collection resource
- update(**kwargs)[source]
Push local updates to the object on the device.
- Params kwargs:
keyword arguments for accessing/modifying the object
- Returns:
updated Python object
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Override of resource.Resource exists() to build proper URI unique to service resources.
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.
- Parameters:
kwargs – Keyword arguments required to get objects
NOTE: If kwargs has a ‘requests_params’ key the corresponding dict will be passed to the underlying requests.session.get method where it will be handled according to that API. THIS IS HOW TO PASS QUERY-ARGS! :returns: bool – The objects exists on BIG-IP® or not. :raises:
requests.HTTPError
, Any HTTP error that was not statuscode 404.
config
BIG-IP® system config module
- REST URI
http://localhost/mgmt/tm/sys/config
- GUI Path
N/A
- REST Kind
tm:sys:config:*
crypto
BIG-IP® system config module
- REST URI
http://localhost/mgmt/tm/sys/config
- GUI Path
N/A
- REST Kind
tm:sys:config:*
- class f5.bigip.tm.sys.crypto.Keys(crypto)[source]
BIG-IP® Crypto key collection
note:: This collection supports install command. Given the fact that we will be expecting hyphen parameters, the function will need to utilize variable keyword argument syntax. In other words define a dictionary with the arbitrary keys and then pass it as in the form **foo into the method call. e.g.
param_set ={‘from-local-file’: FOOPATH, ‘name’: ‘FOOKEY’} bigip.tm.sys.crypto.keys.exec_cmd(‘install’, **param_set)
- class f5.bigip.tm.sys.crypto.Certs(crypto)[source]
BIG-IP® Crypto cert collection
note:: This collection supports install command. Given the fact that we will be expecting hyphen parameters, the function will need to utilize variable keyword argument syntax. In other words define a dictionary with the arbitrary keys and then pass it as in the form **foo into the method call. e.g.
param_set ={‘from-local-file’: FOOPATH, ‘name’: ‘FOOCERT’} bigip.tm.sys.crypto.certs.exec_cmd(‘install’, **param_set)
daemon_log_settings
BIG-IP® system daemon log settings module
- REST URI
http://localhost/mgmt/tm/sys/daemon-log-settings
- tmsh Path
sys --> daemon-log-settings --> all-properties
- GUI Path
system --> logs --> configuration --> options
- REST Kind
tm:sys:daemon-log-settings:*
- class f5.bigip.tm.sys.daemon_log_settings.Clusterd(daemon_log_settings)[source]
BIG-IP® system daemon log settings clusterd resource
The object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.daemon_log_settings.Csyncd(daemon_log_settings)[source]
BIG-IP® system daemon log settings csyncd resource
The object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.daemon_log_settings.Icrd(daemon_log_settings)[source]
BIG-IP® system daemon log settings icrd resource
The object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.daemon_log_settings.Lind(daemon_log_settings)[source]
BIG-IP® system daemon log settings lind resource
The object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
db
BIG-IP® db module
- REST URI
http://localhost/mgmt/sys/db/
- GUI Path
N/A
- REST Kind
tm:sys:db:*
dns
BIG-IP® system dns module
- REST URI
http://localhost/mgmt/tm/sys/dns
- GUI Path
System --> Configuration --> Device --> DNS
- REST Kind
tm:sys:dns:*
failover
BIG-IP® system failover module
- REST URI
http://localhost/mgmt/tm/sys/failover
- GUI Path
System --> Failover
- REST Kind
tm:sys:failover:*
- class f5.bigip.tm.sys.failover.Failover(sys)[source]
BIG-IP® Failover stats and state change.
- The failover object only supports load, update, and refresh because it is
an unnamed resource.
To force the unit to standby call the
update()
method as follows:Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- exec_cmd(command, **kwargs)[source]
Defining custom method to append ‘exclusive_attributes’.
- WARNING: Some parameters are hyphenated therefore the function
will need to utilize variable keyword argument syntax. This only applies when utilCmdArgs method is not in use.
eg.
param_set ={‘standby’:True ‘traffic-group’: ‘traffic-group-1’} bigip.tm.sys.failover.exec_cmd(‘run’, **param_set
The ‘standby’ attribute cannot be present with either ‘offline’ or ‘online’ attribute, whichever is present. Additionally we check for existence of same attribute values in ‘offline’ and ‘online’ if both present.
- note:: There is also another way of using failover endpoint,
by the means of ‘utilCmdArgs’ attribute, here the syntax will resemble more that of the ‘tmsh run sys failover…’ command.
eg. exec_cmd(‘run’, utilCmdArgs=’standby traffic-group traffic-group-1’)
:: raises InvalidParameterValue
- toggle_standby(**kwargs)[source]
Toggle the standby status of a traffic group.
WARNING: This method which used POST obtains json keys from the device that are not available in the response to a GET against the same URI.
- NOTE: This method method is deprecated and probably will be removed,
usage of exec_cmd is encouraged.
file
BIG-IP® system file module
- REST URI
http://localhost/mgmt/tm/sys/file
- GUI Path
N/A
- REST Kind
tm:sys:file:*
- class f5.bigip.tm.sys.file.Data_Groups(File)[source]
BIG-IP® System sys file data-groups collection.
- class f5.bigip.tm.sys.file.Data_Group(data_groups)[source]
BIG-IP® System sys file data-groups resource.
- 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.
- class f5.bigip.tm.sys.file.External_Monitors(File)[source]
BIG-IP® System sys file data-groups collection.
- class f5.bigip.tm.sys.file.External_Monitor(external_monitors)[source]
BIG-IP® System sys file data-groups resource.
folder
BIG-IP® system folder module
- REST URI
http://localhost/mgmt/tm/sys/folder
- REST Kind
tm:sys:folder:*
- class f5.bigip.tm.sys.folder.Folders(sys)[source]
BIG-IP® system folder collection.
These are what we refer to as
partition
in the SDK.
- class f5.bigip.tm.sys.folder.Folder(folder_s)[source]
- update(**kwargs)[source]
Update the object, removing device group if inherited
If inheritedDevicegroup is the string “true” we need to remove deviceGroup from the args before we update or we get the following error:
The floating traffic-group: /Common/traffic-group-1 can only be set on /testfolder if its device-group is inherited from the root folder
- exists(**kwargs)[source]
Check for the existence of the named object on the BIG-IP
Tries to load() the object and if it fails checks the exception for 404. If the load() is successful it returns True if the exception is
requests.HTTPError
and thestatus_code
is404
it will return error. All other errors are raised as is.- Parameters:
kwargs – Keyword arguments required to get objects
NOTE: If kwargs has a ‘requests_params’ key the corresponding dict will be passed to the underlying requests.session.get method where it will be handled according to that API. THIS IS HOW TO PASS QUERY-ARGS! :returns: bool – The objects exists on BIG-IP® or not. :raises:
requests.HTTPError
, Any HTTP error that was not statuscode 404.
global_settings
BIG-IP® system global-settings module
- REST URI
http://localhost/mgmt/tm/sys/global-settings
- GUI Path
System --> Configuration --> Device
- REST Kind
tm:sys:global-settings:*
httpd
BIG-IP® system dns module
- REST URI
http://localhost/mgmt/tm/sys/dns
- tmsh Path
sys --> httpd --> all-properties
- GUI Path
various
- REST Kind
tm:sys:httpd:*
icall
BIG-IP® system icall module
- REST URI
http://localhost/mgmt/tm/sys/icall
- GUI Path
N/A
- REST Kind
tm:sys:icall:*
management_ip
BIG-IP® system management IP module
- REST URI
http://localhost/mgmt/tm/sys/management-ip
- GUI Path
System --> Platform
- REST Kind
tm:sys:management-ip:*
- class f5.bigip.tm.sys.management_ip.Management_Ip(Management_Ips)[source]
BIG-IP® management-ip 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']
management_route
BIG-IP® system management route module
- REST URI
http://localhost/mgmt/tm/sys/management-route
- GUI Path
System --> Platform
- REST Kind
tm:sys:management-route:management-routestate
- class f5.bigip.tm.sys.management_route.Management_Routes(sys)[source]
BIG-IP® management-route collection
- class f5.bigip.tm.sys.management_route.Management_Route(Management_Routes)[source]
BIG-IP® system management-route resource
- 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.
ntp
BIG-IP® system ntp module
- REST URI
http://localhost/mgmt/tm/sys/ntp
- GUI Path
System --> Configuration --> Device --> NTP
- REST Kind
tm:sys:ntp:*
performance
BIG-IP® system peformance stats module.
- REST URI
http://localhost/mgmt/tm/sys/performance
- GUI Path
System --> Users --> Partition List
- REST Kind
tm:sys:performance:*
provision
BIG-IP® system file module
- REST URI
http://localhost/mgmt/tm/sys/provision
- GUI Path
N/A
- REST Kind
tm:sys:provision:*
- class f5.bigip.tm.sys.provision.Afm(provision)[source]
BIG-IP® system provision afm resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Am(provision)[source]
BIG-IP® system provision afm resource
The am object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Apm(provision)[source]
BIG-IP® system provision apm resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Asm(provision)[source]
BIG-IP® system provision asm resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Avr(provision)[source]
BIG-IP® system provision avr resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Dos(provision)[source]
BIG-IP® system provision dos resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Fps(provision)[source]
BIG-IP® system provision fps resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Gtm(provision)[source]
BIG-IP® system provision gtm resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Ili(provision)[source]
BIG-IP® system provision ili resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Ilx(provision)[source]
BIG-IP® system provision ilx resource
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Lc(provision)[source]
BIG-IP® system provision lc resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Ltm(provision)[source]
BIG-IP® system provision ltm resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Pem(provision)[source]
BIG-IP® system provision pem resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
- class f5.bigip.tm.sys.provision.Swg(provision)[source]
BIG-IP® system provision swg resource
The afm object only supports load and update because it is an unnamed resource.
Note
This is an unnamed resource so it has not ~Partition~Name pattern at the end of its URI.
sflow
BIG-IP® system sflow module
- REST URI
http://localhost/mgmt/tm/sys/sflow
- GUI Path
System->sFlow
- REST Kind
tm:sys:sflow:*
smtp_server
BIG-IP® SMTP Server module
- REST URI
http://localhost/mgmt/sys/smtp-server/
- GUI Path
Systems > Configuration > Device > SMTP
- REST Kind
tm:sys:smtp-server:*
- class f5.bigip.tm.sys.smtp_server.Smtp_Server(smtp_servers)[source]
- 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.
snmp
BIG-IP® SNMP submodule.
- REST URI
http://localhost/mgmt/tm/sys/snmp/
- GUI Path
System --> SNMP
- REST Kind
tm:snmp:*
sshd
BIG-IP® system sshd module
- REST URI
http://localhost/mgmt/tm/sys/sshd
- GUI Path
System --> Configuration --> Device --> SSHD
- REST Kind
tm:sys:sshd:sshdstate
syslog
BIG-IP® system syslog module
- REST URI
http://localhost/mgmt/tm/sys/syslog
- GUI Path
System --> Logs --> Configuration --> Remote Logging
- REST Kind
tm:sys:sshd:sshdstate
ucs
BIG-IP® system config module
- REST URI
- GUI Path
N/A
- REST Kind
tm:sys:ucs:*
- class f5.bigip.tm.sys.ucs.Ucs(sys)[source]
BIG-IP® system UCS resource
Given the fact that 11.6.0 UCS via rest is broken, this feature will be supported in 12.0.0 and above. Listing of installed UCS has been fixed in 12.1.0. This resource is a collection which does not allow listing of each ucs as a resource. ‘Items’ attribute of the loaded object is used to access the list of installed UCS files.
Caveat: Loading UCS will result in ICRD restarting, therefore due to ID476518 502 Bad Gateway is generated, this is working as intended, at least until some architecture changes have been made.