\n\n
The purpose of this article is to give a brief overview of the F5 Python SDK. The F5 Python SDK provides a programmatic interface to BIG-IP and its modules. We will cover the basic concepts and definitions of F5 Networks BIG-IP iControl REST interface and how they relate to the SDK in its current state (LTM / core, etc.). We will also demonstrate some calls and then show the current state of AFM in the SDK. As the AFM is not yet developed, we will show one way to build a framework that makes taking the restful JSON endpoints and programmatically iterating to pull additional endpoints.
\n\n
The SDK is an Object model based SDK for the F5 Networks BIG-IP iControl REST interface. The structure of the SDK calls maps to iControl REST:
\n
http://192.168.1.1/mgmt/tm/ltm/pool/~Common~mypool/members/~Common~m1:80
\n
|----|--|---|----|--------------|-------|-------------|
\n
|root|OC|OC |Coll| Resource | SC |SubColl Resrc|
\n\n
An organizing collection is a superset of other collections. These are not configurable; rather, they contain other submodules which either contain configurable objects (Collection) or are configurable objects (Resource). For example, the ltm or net module listing would be an organizing collection, whereas ltm/pool or net/vlan would be collections. To retrieve either type, you use the get_collection method as shown below, with abbreviated output.
\n
Example:
\n
\n\n
A collection is similar to an organizing collection in that it is not a configurable object. Unlike an organizing collection, however, a collection only contains references to objects (or resources) of the same type. In the SDK, collection objects are usually plural, while Resource objects are singular. When the Resource object’s corresponding URI is already plural, we append the name of the collection with _s.
\n
Example:
\n
\n\n\nURI | \nCollection | \nResource | \n
\n\n /mgmt/tm/net/tunnels/ | \ntm.net.tunnels | \n tm.net.tunnels.tunnel | \n
\n\n /mgmt/tm/ltm/pool/ | \ntm.ltm.pools | \ntm.ltm.pools.pool | \n
\n\n /mgmt/tm/ltm/pool/members/ | \ntm.ltm.pool.members_s | \n tm.ltm.pool.members_s.members | \n
\n\n
\n
Example: Use f5.bigip.resource.Collection.get_collection() to get a list of the objects in the f5.bigip.tm.ltm.pool collection.
\n\n
A resource is a fully configurable object for which the CURDLE methods are supported.
\n
Methods
\n
\n
\n
\n\n\n\n Method \n | \n\n HTTP Command \n | \n\n Action(s) \n | \n
\n\n\n create() \n | \n\n POST \n | \n\n creates a new resource on the device with its own URI \n | \n
\n\n\n update() \n | \n\n PUT \n | \n\n submits a new configuration to the device resource; sets the \nResource attributes to the state reported by the device \n | \n
\n\n\n |modify| \n | \n\n PATCH \n | \n\n submits a new configuration to the device resource; sets only \nthe attributes specified in modify method. This is different \nfrom update because update will change all the attributes, not \nonly the ones that you specify. \n | \n
\n\n\n refresh() \n | \n\n GET \n | \n\n obtains the state of a device resource; sets the representing \nPython Resource Object; tracks device state via its attributes \n | \n
\n\n\n delete() \n | \n\n DELETE \n | \n\n removes the resource from the device, sets self.__dict__ \nto {'deleted': True} \n | \n
\n\n\n load() \n | \n\n GET \n | \n\n obtains the state of an existing resource on the device; sets \nthe Resource attributes to match that state \n | \n
\n\n\n exists() \n | \n\n GET \n | \n\n checks for the existence of an object on the BIG-IP \n | \n
\n\n
\n
\n
\n
Example: Load a f5.bigip.tm.ltm.node.Node Resource object. The output of the f5.bigip.tm.ltm.node.Node.raw (above) shows all of the available attributes. \n
\n\n
A subcollection is a Collection that’s attached to a higher-level Resource object. Subcollections are almost exactly the same as collections; the exception is that they can only be accessed via the resource they’re attached to (the ‘parent’ resource).
\n
Example:
\n
A pool resource has a members_s subcollection attached to it; you must create or load the ‘parent’ resource (pool) before you can access the subcollection (members_s).
\n
>>> from f5.bigip import ManagementRoot
\n
>>> mgmt = ManagementRoot('192.168.1.1', 'myuser', 'mypass')
\n
>>> pool = mgmt.tm.ltm.pools.pool.load(partition='Common', name='p1')
\n
>>> members = pool.members_s.get_collection()
\n\n
A subcollection resource is essentially the same as a resource. As with collections and subcollections, the only difference between the two is that you must access the subcollection resource via the subcollection attached to the main resource.
\n
Example
\n
To build on the subcollection example: pool is the resource, members_s is the subcollection, and members (the actual pool member) is the subcollection resource.
\n
>>> from f5.bigip import ManagementRoot
\n
>>> mgmt = ManagementRoot('192.168.1.1', 'myuser', 'mypass')
\n
>>> pool = mgmt.tm.ltm.pools.pool.load(partition='Common', name='p1')
\n
>>> member = pool.members_s.members.load(partition='Common', name='n1:80')
\n\n
You can directly infer REST URIs from the python expressions, and vice versa.
\n
Examples
\n
\n- Expression: mgmt = ManagementRoot('<ip_address>', '<username>', '<password>')
\n- URI Returned: [https://%3cip_address%3e/mgmt/]https://<ip_address>/mgmt/
\n- Expression: cm = mgmt.cm('<ip_address>', '<username>', '<password>')
\n- URI Returned: [https://%3cip_address%3e/mgmt/cm]https://<ip_address>/mgmt/cm
\n- Expression: tm = mgmt.tm('<ip_address>', '<username>', '<password>')
\n- URI Returned: [https://%3cip_address%3e/mgmt/tm]https://<ip_address>/mgmt/tm
\n- Expression: ltm = mgmt.tm.ltm('<ip_address>', '<username>', '<password>')
\n- URI Returned: [https://%3cip_address%3e/mgmt/tm/ltm/]https://<ip_address>/mgmt/tm/ltm/
\n- Expression: pools1 = mgmt.tm.ltm.pools
\n- URI Returned: [https://%3cip_address%3e/mgmt/tm/ltm/pool]https://<ip_address>/mgmt/tm/ltm/pool
\n- Expression: pool_a = pools1.create(partition=\"Common\", name=\"foo\")
\n- URI Returned: [https://%3cip_address%3e/mgmt/tm/ltm/pool/~Common~foo]https://<ip_address>/mgmt/tm/ltm/pool/~Common~foo
\n
\n\n\n
Here are the steps to set up a Python virtual environment:
\n
\n- Install Python. You can download the installer from the official website.
\n- Install pip. Python3 usually comes with pip preinstalled. However, if you get an error, you can install it using the following command:
python get-pip.py
. \n- Install virtualenv. You can install it using the following command:
pip install virtualenv
. \n- Create a virtual environment. You can create a virtual environment by specifying the target directory (absolute or relative to the current directory) which is to contain the virtual environment. The create method will either create the environment in the specified directory, or raise an appropriate exception. You can create a virtual environment using the following command:
python3 -m venv f5venv
. \n- Activate the virtual environment by running
source f5venv/bin/activate
\n- Install f5-sdk into the virtual environmet by running
pip install f5-sdk
\n- Run the sample script provided below.
\n
\n\n
from f5.bigip import ManagementRoot\nimport requests\nimport logging\nimport json\nimport sys\n\nclass objectview(object):\n def __init__(self, d):\n self.__dict__ = d\n\ndef bigip():\n return {\n \"bigip\": \"10.155.255.16\",\n \"rest_url\": \"https://admin:admin@\",\n \"rest_user\": \"admin\",\n \"rest_pwd\": \"admin\",\n \"partition\": \"Common\"\n }\n\ndef afm_rest_api():\n policy_name = \"restApiDemo\"\n rule_name = \"restApiDemoRule\"\n return {\n \"create_policy\": \"/mgmt/tm/security/firewall/policy\",\n \"add_rule\": \"/mgmt/tm/security/firewall/policy/~Common~\"+policy_name+\"/rules\",\n \"get_rules\": \"/mgmt/tm/security/firewall/policy/~Common~\"+policy_name+\"/rules\",\n \"change_rule\": \"/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules/\"+rule_name,\n \"delete_rule\": \"/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules/\"+rule_name,\n \"global_context\": \"/mgmt/tm/security/firewall/globalRules/\",\n \"global_rules\": \"/mgmt/tm/security/firewall/globalRules\",\n \"delete_policy\": \"/mgmt/tm/security/firewall/policy/~Common~\"+policy_name\n }\n\ndef create_firewall_pollcy():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n payload = '''{\"name\": \"restApiDemo\"}'''\n logger.info(bip.rest_url + bip.bigip + api.create_policy) \n resp = requests.post(bip.rest_url + bip.bigip + api.create_policy, headers={'accept': 'application/json','content-type': 'application/json'}, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n logger.info(resp.text)\n\ndef add_rule():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n payload = '''{\"name\":\"restApiDemoRule\", \"action\":\"reject\", \"place-before\":\"first\"}'''\n logger.info(bip.rest_url + bip.bigip + api.add_rule) \n resp = requests.post(bip.rest_url + bip.bigip + api.add_rule, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n logger.info(resp.text)\n\ndef display_rules():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n logger.info(bip.rest_url + bip.bigip + api.add_rule) \n resp = requests.get(bip.rest_url + bip.bigip + api.get_rules, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), verify=False)\n logger.info(resp.text)\n\ndef change_rule():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n payload = '''{\"action\":\"accept\"}'''\n logger.info(bip.rest_url + bip.bigip + api.change_rule) \n resp = requests.patch(bip.rest_url + bip.bigip + api.change_rule, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n logger.info(resp.text)\n\ndef delete_rule():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n logger.info(bip.rest_url + bip.bigip + api.delete_rule) \n resp = requests.delete(bip.rest_url + bip.bigip + api.change_rule, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), verify=False)\n logger.info(resp.text)\n\ndef global_context():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n payload = '''{\"enforcedPolicy\":\"restApiDemo\"}'''\n logger.info(bip.rest_url + bip.bigip + api.change_rule) \n resp = requests.patch(bip.rest_url + bip.bigip + api.global_context, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n logger.info(resp.text)\n\ndef global_rules():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n logger.info(bip.rest_url + bip.bigip + api.change_rule) \n resp = requests.get(bip.rest_url + bip.bigip + api.global_rules, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), verify=False)\n logger.info(resp.text)\n\ndef delete_policy():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n payload = '''{\"enforcedPolicy\":\"\"}'''\n logger.info(bip.rest_url + bip.bigip + api.change_rule) \n resp = requests.patch(bip.rest_url + bip.bigip + api.global_rules, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n resp = requests.delete(bip.rest_url + bip.bigip + api.delete_policy, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), verify=False)\n logger.info(resp.text)\n\nif __name__ == \"__main__\":\n logger = logging.getLogger(__name__)\n logger.setLevel(logging.INFO)\n formatter = logging.Formatter(\"%(asctime)s - %(name)s - %(levelname)s - %(message)s\")\n handler = logging.StreamHandler(sys.stdout)\n handler.setFormatter(formatter)\n logger.addHandler(handler)\n command= \" \".join( sys.argv[1:] )\n if command == \"\":\n logger.info(\"\"\"Examples:\"\n python afm_rest_api.py \"create_firewall_pollcy()\"\n python afm_rest_api.py \"add_rule()\"\n python afm_rest_api.py \"display_rules()\"\n python afm_rest_api.py \"change_rule()\"\n python afm_rest_api.py \"delete_rule()\" \n python afm_rest_api.py \"global_context()\"\n python afm_rest_api.py \"global_rules()\"\n python afm_rest_api.py \"delete_policy()\"\"\") \n else:\n logger.info(command)\n eval(command)
\n\n
","body@stringLength":"21976","rawBody":"\n
Introduction
\n
The purpose of this article is to give a brief overview of the F5 Python SDK. The F5 Python SDK provides a programmatic interface to BIG-IP and its modules. We will cover the basic concepts and definitions of F5 Networks BIG-IP iControl REST interface and how they relate to the SDK in its current state (LTM / core, etc.). We will also demonstrate some calls and then show the current state of AFM in the SDK. As the AFM is not yet developed, we will show one way to build a framework that makes taking the restful JSON endpoints and programmatically iterating to pull additional endpoints.
\n
Concepts
\n
The SDK is an Object model based SDK for the F5 Networks BIG-IP iControl REST interface. The structure of the SDK calls maps to iControl REST:
\n
http://192.168.1.1/mgmt/tm/ltm/pool/~Common~mypool/members/~Common~m1:80
\n
|----|--|---|----|--------------|-------|-------------|
\n
|root|OC|OC |Coll| Resource | SC |SubColl Resrc|
\n
Organizing Collection:
\n
An organizing collection is a superset of other collections. These are not configurable; rather, they contain other submodules which either contain configurable objects (Collection) or are configurable objects (Resource). For example, the ltm or net module listing would be an organizing collection, whereas ltm/pool or net/vlan would be collections. To retrieve either type, you use the get_collection method as shown below, with abbreviated output.
\n
Example:
\n
\n
Collection:
\n
A collection is similar to an organizing collection in that it is not a configurable object. Unlike an organizing collection, however, a collection only contains references to objects (or resources) of the same type. In the SDK, collection objects are usually plural, while Resource objects are singular. When the Resource object’s corresponding URI is already plural, we append the name of the collection with _s.
\n
Example:
\n
\n\n\nURI | \nCollection | \nResource | \n
\n\n /mgmt/tm/net/tunnels/ | \ntm.net.tunnels | \n tm.net.tunnels.tunnel | \n
\n\n /mgmt/tm/ltm/pool/ | \ntm.ltm.pools | \ntm.ltm.pools.pool | \n
\n\n /mgmt/tm/ltm/pool/members/ | \ntm.ltm.pool.members_s | \n tm.ltm.pool.members_s.members | \n
\n\n
\n
Example: Use f5.bigip.resource.Collection.get_collection() to get a list of the objects in the f5.bigip.tm.ltm.pool collection.
\n
Resource:
\n
A resource is a fully configurable object for which the CURDLE methods are supported.
\n
Methods
\n
\n
\n
\n\n\n\n Method \n | \n\n HTTP Command \n | \n\n Action(s) \n | \n
\n\n\n create() \n | \n\n POST \n | \n\n creates a new resource on the device with its own URI \n | \n
\n\n\n update() \n | \n\n PUT \n | \n\n submits a new configuration to the device resource; sets the \nResource attributes to the state reported by the device \n | \n
\n\n\n |modify| \n | \n\n PATCH \n | \n\n submits a new configuration to the device resource; sets only \nthe attributes specified in modify method. This is different \nfrom update because update will change all the attributes, not \nonly the ones that you specify. \n | \n
\n\n\n refresh() \n | \n\n GET \n | \n\n obtains the state of a device resource; sets the representing \nPython Resource Object; tracks device state via its attributes \n | \n
\n\n\n delete() \n | \n\n DELETE \n | \n\n removes the resource from the device, sets self.__dict__ \nto {'deleted': True} \n | \n
\n\n\n load() \n | \n\n GET \n | \n\n obtains the state of an existing resource on the device; sets \nthe Resource attributes to match that state \n | \n
\n\n\n exists() \n | \n\n GET \n | \n\n checks for the existence of an object on the BIG-IP \n | \n
\n\n
\n
\n
\n
Example: Load a f5.bigip.tm.ltm.node.Node Resource object. The output of the f5.bigip.tm.ltm.node.Node.raw (above) shows all of the available attributes. \n
\n
Subcollection:
\n
A subcollection is a Collection that’s attached to a higher-level Resource object. Subcollections are almost exactly the same as collections; the exception is that they can only be accessed via the resource they’re attached to (the ‘parent’ resource).
\n
Example:
\n
A pool resource has a members_s subcollection attached to it; you must create or load the ‘parent’ resource (pool) before you can access the subcollection (members_s).
\n
>>> from f5.bigip import ManagementRoot
\n
>>> mgmt = ManagementRoot('192.168.1.1', 'myuser', 'mypass')
\n
>>> pool = mgmt.tm.ltm.pools.pool.load(partition='Common', name='p1')
\n
>>> members = pool.members_s.get_collection()
\n
Subcollection Resource:
\n
A subcollection resource is essentially the same as a resource. As with collections and subcollections, the only difference between the two is that you must access the subcollection resource via the subcollection attached to the main resource.
\n
Example
\n
To build on the subcollection example: pool is the resource, members_s is the subcollection, and members (the actual pool member) is the subcollection resource.
\n
>>> from f5.bigip import ManagementRoot
\n
>>> mgmt = ManagementRoot('192.168.1.1', 'myuser', 'mypass')
\n
>>> pool = mgmt.tm.ltm.pools.pool.load(partition='Common', name='p1')
\n
>>> member = pool.members_s.members.load(partition='Common', name='n1:80')
\n
REST URIs:
\n
You can directly infer REST URIs from the python expressions, and vice versa.
\n
Examples
\n
\n- Expression: mgmt = ManagementRoot('<ip_address>', '<username>', '<password>')
\n- URI Returned: [https://%3cip_address%3e/mgmt/]https://<ip_address>/mgmt/
\n- Expression: cm = mgmt.cm('<ip_address>', '<username>', '<password>')
\n- URI Returned: [https://%3cip_address%3e/mgmt/cm]https://<ip_address>/mgmt/cm
\n- Expression: tm = mgmt.tm('<ip_address>', '<username>', '<password>')
\n- URI Returned: [https://%3cip_address%3e/mgmt/tm]https://<ip_address>/mgmt/tm
\n- Expression: ltm = mgmt.tm.ltm('<ip_address>', '<username>', '<password>')
\n- URI Returned: [https://%3cip_address%3e/mgmt/tm/ltm/]https://<ip_address>/mgmt/tm/ltm/
\n- Expression: pools1 = mgmt.tm.ltm.pools
\n- URI Returned: [https://%3cip_address%3e/mgmt/tm/ltm/pool]https://<ip_address>/mgmt/tm/ltm/pool
\n- Expression: pool_a = pools1.create(partition=\"Common\", name=\"foo\")
\n- URI Returned: [https://%3cip_address%3e/mgmt/tm/ltm/pool/~Common~foo]https://<ip_address>/mgmt/tm/ltm/pool/~Common~foo
\n
\n
Test the SDK:
\n
Create a Virtual Environment
\n
Here are the steps to set up a Python virtual environment:
\n
\n- Install Python. You can download the installer from the official website.
\n- Install pip. Python3 usually comes with pip preinstalled. However, if you get an error, you can install it using the following command: python get-pip.py.
\n- Install virtualenv. You can install it using the following command: pip install virtualenv.
\n- Create a virtual environment. You can create a virtual environment by specifying the target directory (absolute or relative to the current directory) which is to contain the virtual environment. The create method will either create the environment in the specified directory, or raise an appropriate exception. You can create a virtual environment using the following command: python3 -m venv f5venv.
\n- Activate the virtual environment by running source f5venv/bin/activate
\n- Install f5-sdk into the virtual environmet by runningpip install f5-sdk
\n- Run the sample script provided below.
\n
\n
AFM Code Sample
\n
from f5.bigip import ManagementRoot\nimport requests\nimport logging\nimport json\nimport sys\n\nclass objectview(object):\n def __init__(self, d):\n self.__dict__ = d\n\ndef bigip():\n return {\n \"bigip\": \"10.155.255.16\",\n \"rest_url\": \"https://admin:admin@\",\n \"rest_user\": \"admin\",\n \"rest_pwd\": \"admin\",\n \"partition\": \"Common\"\n }\n\ndef afm_rest_api():\n policy_name = \"restApiDemo\"\n rule_name = \"restApiDemoRule\"\n return {\n \"create_policy\": \"/mgmt/tm/security/firewall/policy\",\n \"add_rule\": \"/mgmt/tm/security/firewall/policy/~Common~\"+policy_name+\"/rules\",\n \"get_rules\": \"/mgmt/tm/security/firewall/policy/~Common~\"+policy_name+\"/rules\",\n \"change_rule\": \"/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules/\"+rule_name,\n \"delete_rule\": \"/mgmt/tm/security/firewall/policy/~Common~restApiDemo/rules/\"+rule_name,\n \"global_context\": \"/mgmt/tm/security/firewall/globalRules/\",\n \"global_rules\": \"/mgmt/tm/security/firewall/globalRules\",\n \"delete_policy\": \"/mgmt/tm/security/firewall/policy/~Common~\"+policy_name\n }\n\ndef create_firewall_pollcy():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n payload = '''{\"name\": \"restApiDemo\"}'''\n logger.info(bip.rest_url + bip.bigip + api.create_policy) \n resp = requests.post(bip.rest_url + bip.bigip + api.create_policy, headers={'accept': 'application/json','content-type': 'application/json'}, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n logger.info(resp.text)\n\ndef add_rule():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n payload = '''{\"name\":\"restApiDemoRule\", \"action\":\"reject\", \"place-before\":\"first\"}'''\n logger.info(bip.rest_url + bip.bigip + api.add_rule) \n resp = requests.post(bip.rest_url + bip.bigip + api.add_rule, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n logger.info(resp.text)\n\ndef display_rules():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n logger.info(bip.rest_url + bip.bigip + api.add_rule) \n resp = requests.get(bip.rest_url + bip.bigip + api.get_rules, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), verify=False)\n logger.info(resp.text)\n\ndef change_rule():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n payload = '''{\"action\":\"accept\"}'''\n logger.info(bip.rest_url + bip.bigip + api.change_rule) \n resp = requests.patch(bip.rest_url + bip.bigip + api.change_rule, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n logger.info(resp.text)\n\ndef delete_rule():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n logger.info(bip.rest_url + bip.bigip + api.delete_rule) \n resp = requests.delete(bip.rest_url + bip.bigip + api.change_rule, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), verify=False)\n logger.info(resp.text)\n\ndef global_context():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n payload = '''{\"enforcedPolicy\":\"restApiDemo\"}'''\n logger.info(bip.rest_url + bip.bigip + api.change_rule) \n resp = requests.patch(bip.rest_url + bip.bigip + api.global_context, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n logger.info(resp.text)\n\ndef global_rules():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n logger.info(bip.rest_url + bip.bigip + api.change_rule) \n resp = requests.get(bip.rest_url + bip.bigip + api.global_rules, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), verify=False)\n logger.info(resp.text)\n\ndef delete_policy():\n bip = objectview(bigip())\n api = objectview(afm_rest_api())\n mgmt = ManagementRoot(bip.bigip, bip.rest_user, bip.rest_pwd) \n headers = {'accept': 'application/json','content-type': 'application/json'}\n payload = '''{\"enforcedPolicy\":\"\"}'''\n logger.info(bip.rest_url + bip.bigip + api.change_rule) \n resp = requests.patch(bip.rest_url + bip.bigip + api.global_rules, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), data=payload, verify=False)\n resp = requests.delete(bip.rest_url + bip.bigip + api.delete_policy, headers=headers, auth=(\n bip.rest_user, bip.rest_pwd), verify=False)\n logger.info(resp.text)\n\nif __name__ == \"__main__\":\n logger = logging.getLogger(__name__)\n logger.setLevel(logging.INFO)\n formatter = logging.Formatter(\"%(asctime)s - %(name)s - %(levelname)s - %(message)s\")\n handler = logging.StreamHandler(sys.stdout)\n handler.setFormatter(formatter)\n logger.addHandler(handler)\n command= \" \".join( sys.argv[1:] )\n if command == \"\":\n logger.info(\"\"\"Examples:\"\n python afm_rest_api.py \"create_firewall_pollcy()\"\n python afm_rest_api.py \"add_rule()\"\n python afm_rest_api.py \"display_rules()\"\n python afm_rest_api.py \"change_rule()\"\n python afm_rest_api.py \"delete_rule()\" \n python afm_rest_api.py \"global_context()\"\n python afm_rest_api.py \"global_rules()\"\n python afm_rest_api.py \"delete_policy()\"\"\") \n else:\n logger.info(command)\n eval(command)
\n\n
","kudosSumWeight":6,"postTime":"2023-03-27T09:00:00.344-07:00","images":{"__typename":"AssociatedImageConnection","edges":[{"__typename":"AssociatedImageEdge","cursor":"MjUuM3wyLjF8b3wyNXxfTlZffDE","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.f5.com/t5/s/zihoc95639/images/bS0zMTE5MTUtMjIwNjVpN0I2QTM3RjVFRUREQzFBQQ?revision=9\"}"}}],"totalCount":1,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"attachments":{"__typename":"AttachmentConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"tags":{"__typename":"TagConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"TagEdge","cursor":"MjUuM3wyLjF8b3wxMHxfTlZffDE","node":{"__typename":"Tag","id":"tag:devops","text":"devops","time":"2011-10-19T17:50:55.000-07:00","lastActivityTime":null,"messagesCount":null,"followersCount":null}},{"__typename":"TagEdge","cursor":"MjUuM3wyLjF8b3wxMHxfTlZffDI","node":{"__typename":"Tag","id":"tag:f5 sirt","text":"f5 sirt","time":"2022-11-30T10:40:39.228-08:00","lastActivityTime":null,"messagesCount":null,"followersCount":null}},{"__typename":"TagEdge","cursor":"MjUuM3wyLjF8b3wxMHxfTlZffDM","node":{"__typename":"Tag","id":"tag:security","text":"security","time":"2009-07-03T08:19:36.000-07:00","lastActivityTime":null,"messagesCount":null,"followersCount":null}}]},"timeToRead":8,"rawTeaser":"","introduction":"","currentRevision":{"__ref":"Revision:revision:311915_9"},"latestVersion":{"__typename":"FriendlyVersion","major":"3","minor":"0"},"metrics":{"__typename":"MessageMetrics","views":4893},"visibilityScope":"PUBLIC","canonicalUrl":null,"seoTitle":"F5 Python SDK Overview","seoDescription":"This is a brief overview of the F5 Python SDK. The F5 Python SDK provides a programmatic interface to BIG-IP and its modules.","placeholder":false,"originalMessageForPlaceholder":null,"contributors":{"__typename":"UserConnection","edges":[]},"nonCoAuthorContributors":{"__typename":"UserConnection","edges":[]},"coAuthors":{"__typename":"UserConnection","edges":[]},"tkbMessagePolicies":{"__typename":"TkbMessagePolicies","canDoAuthoringActionsOnTkb":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.tkb.policy_can_do_authoring_action.accessDenied","key":"error.lithium.policies.tkb.policy_can_do_authoring_action.accessDenied","args":[]}}},"archivalData":null,"replies":{"__typename":"MessageConnection","edges":[{"__typename":"MessageEdge","cursor":"MjUuM3wyLjF8aXwxMHwzOToxfGludCwzMTI0NzIsMzEyNDcy","node":{"__ref":"TkbReplyMessage:message:312472"}}],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"customFields":[],"revisions({\"constraints\":{\"isPublished\":{\"eq\":true}},\"first\":1})":{"__typename":"RevisionConnection","totalCount":3}},"Conversation:conversation:311915":{"__typename":"Conversation","id":"conversation:311915","solved":false,"topic":{"__ref":"TkbTopicMessage:message:311915"},"lastPostingActivityTime":"2023-06-05T21:36:09.306-07:00","lastPostTime":"2023-03-28T06:40:01.236-07:00","unreadReplyCount":1,"isSubscribed":false},"ModerationData:moderation_data:311915":{"__typename":"ModerationData","id":"moderation_data:311915","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"AssociatedImage:{\"url\":\"https://community.f5.com/t5/s/zihoc95639/images/bS0zMTE5MTUtMjIwNjVpN0I2QTM3RjVFRUREQzFBQQ?revision=9\"}":{"__typename":"AssociatedImage","url":"https://community.f5.com/t5/s/zihoc95639/images/bS0zMTE5MTUtMjIwNjVpN0I2QTM3RjVFRUREQzFBQQ?revision=9","title":"aida-l-6y5iySR_UXc-unsplash.jpg","associationType":"COVER","width":875,"height":875,"altText":""},"Revision:revision:311915_9":{"__typename":"Revision","id":"revision:311915_9","lastEditTime":"2023-06-05T21:36:09.306-07:00"},"CachedAsset:theme:customTheme1-1744704761434":{"__typename":"CachedAsset","id":"theme:customTheme1-1744704761434","value":{"id":"customTheme1","animation":{"fast":"150ms","normal":"250ms","slow":"500ms","slowest":"750ms","function":"cubic-bezier(0.07, 0.91, 0.51, 1)","__typename":"AnimationThemeSettings"},"avatar":{"borderRadius":"50%","collections":["custom"],"__typename":"AvatarThemeSettings"},"basics":{"browserIcon":{"imageAssetName":"JimmyPackets-512-1702592938213.png","imageLastModified":"1702592945815","__typename":"ThemeAsset"},"customerLogo":{"imageAssetName":"f5_logo_fix-1704824537976.svg","imageLastModified":"1704824540697","__typename":"ThemeAsset"},"maximumWidthOfPageContent":"1600px","oneColumnNarrowWidth":"800px","gridGutterWidthMd":"30px","gridGutterWidthXs":"10px","pageWidthStyle":"WIDTH_OF_PAGE_CONTENT","__typename":"BasicsThemeSettings"},"buttons":{"borderRadiusSm":"5px","borderRadius":"5px","borderRadiusLg":"5px","paddingY":"5px","paddingYLg":"7px","paddingYHero":"var(--lia-bs-btn-padding-y-lg)","paddingX":"12px","paddingXLg":"14px","paddingXHero":"42px","fontStyle":"NORMAL","fontWeight":"400","textTransform":"NONE","disabledOpacity":0.5,"primaryTextColor":"var(--lia-bs-white)","primaryTextHoverColor":"var(--lia-bs-white)","primaryTextActiveColor":"var(--lia-bs-white)","primaryBgColor":"var(--lia-bs-primary)","primaryBgHoverColor":"hsl(var(--lia-bs-primary-h), var(--lia-bs-primary-s), calc(var(--lia-bs-primary-l) * 0.85))","primaryBgActiveColor":"hsl(var(--lia-bs-primary-h), var(--lia-bs-primary-s), calc(var(--lia-bs-primary-l) * 0.7))","primaryBorder":"1px solid transparent","primaryBorderHover":"1px solid transparent","primaryBorderActive":"1px solid transparent","primaryBorderFocus":"1px solid var(--lia-bs-white)","primaryBoxShadowFocus":"0 0 0 1px var(--lia-bs-primary), 0 0 0 4px hsla(var(--lia-bs-primary-h), var(--lia-bs-primary-s), var(--lia-bs-primary-l), 0.2)","secondaryTextColor":"var(--lia-bs-gray-900)","secondaryTextHoverColor":"hsl(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), calc(var(--lia-bs-gray-900-l) * 0.95))","secondaryTextActiveColor":"hsl(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), calc(var(--lia-bs-gray-900-l) * 0.9))","secondaryBgColor":"var(--lia-bs-gray-400)","secondaryBgHoverColor":"hsl(var(--lia-bs-gray-400-h), var(--lia-bs-gray-400-s), calc(var(--lia-bs-gray-400-l) * 0.96))","secondaryBgActiveColor":"hsl(var(--lia-bs-gray-400-h), var(--lia-bs-gray-400-s), calc(var(--lia-bs-gray-400-l) * 0.92))","secondaryBorder":"1px solid transparent","secondaryBorderHover":"1px solid transparent","secondaryBorderActive":"1px solid transparent","secondaryBorderFocus":"1px solid transparent","secondaryBoxShadowFocus":"0 0 0 1px var(--lia-bs-primary), 0 0 0 4px hsla(var(--lia-bs-primary-h), var(--lia-bs-primary-s), var(--lia-bs-primary-l), 0.2)","tertiaryTextColor":"var(--lia-bs-gray-900)","tertiaryTextHoverColor":"hsl(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), calc(var(--lia-bs-gray-900-l) * 0.95))","tertiaryTextActiveColor":"hsl(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), calc(var(--lia-bs-gray-900-l) * 0.9))","tertiaryBgColor":"transparent","tertiaryBgHoverColor":"transparent","tertiaryBgActiveColor":"hsla(var(--lia-bs-black-h), var(--lia-bs-black-s), var(--lia-bs-black-l), 0.04)","tertiaryBorder":"1px solid transparent","tertiaryBorderHover":"1px solid hsla(var(--lia-bs-black-h), var(--lia-bs-black-s), var(--lia-bs-black-l), 0.08)","tertiaryBorderActive":"1px solid transparent","tertiaryBorderFocus":"1px solid transparent","tertiaryBoxShadowFocus":"0 0 0 1px var(--lia-bs-primary), 0 0 0 4px hsla(var(--lia-bs-primary-h), var(--lia-bs-primary-s), var(--lia-bs-primary-l), 0.2)","destructiveTextColor":"var(--lia-bs-danger)","destructiveTextHoverColor":"hsl(var(--lia-bs-danger-h), var(--lia-bs-danger-s), calc(var(--lia-bs-danger-l) * 0.95))","destructiveTextActiveColor":"hsl(var(--lia-bs-danger-h), var(--lia-bs-danger-s), calc(var(--lia-bs-danger-l) * 0.9))","destructiveBgColor":"var(--lia-bs-gray-300)","destructiveBgHoverColor":"hsl(var(--lia-bs-gray-300-h), var(--lia-bs-gray-300-s), calc(var(--lia-bs-gray-300-l) * 0.96))","destructiveBgActiveColor":"hsl(var(--lia-bs-gray-300-h), var(--lia-bs-gray-300-s), calc(var(--lia-bs-gray-300-l) * 0.92))","destructiveBorder":"1px solid transparent","destructiveBorderHover":"1px solid transparent","destructiveBorderActive":"1px solid transparent","destructiveBorderFocus":"1px solid transparent","destructiveBoxShadowFocus":"0 0 0 1px var(--lia-bs-primary), 0 0 0 4px hsla(var(--lia-bs-primary-h), var(--lia-bs-primary-s), var(--lia-bs-primary-l), 0.2)","__typename":"ButtonsThemeSettings"},"border":{"color":"hsla(var(--lia-bs-black-h), var(--lia-bs-black-s), var(--lia-bs-black-l), 0.08)","mainContent":"NONE","sideContent":"NONE","radiusSm":"3px","radius":"5px","radiusLg":"9px","radius50":"100vw","__typename":"BorderThemeSettings"},"boxShadow":{"xs":"0 0 0 1px hsla(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), var(--lia-bs-gray-900-l), 0.08), 0 3px 0 -1px hsla(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), var(--lia-bs-gray-900-l), 0.08)","sm":"0 2px 4px hsla(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), var(--lia-bs-gray-900-l), 0.06)","md":"0 5px 15px hsla(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), var(--lia-bs-gray-900-l), 0.15)","lg":"0 10px 30px hsla(var(--lia-bs-gray-900-h), var(--lia-bs-gray-900-s), var(--lia-bs-gray-900-l), 0.15)","__typename":"BoxShadowThemeSettings"},"cards":{"bgColor":"var(--lia-panel-bg-color)","borderRadius":"var(--lia-panel-border-radius)","boxShadow":"var(--lia-box-shadow-xs)","__typename":"CardsThemeSettings"},"chip":{"maxWidth":"300px","height":"30px","__typename":"ChipThemeSettings"},"coreTypes":{"defaultMessageLinkColor":"var(--lia-bs-primary)","defaultMessageLinkDecoration":"none","defaultMessageLinkFontStyle":"NORMAL","defaultMessageLinkFontWeight":"400","defaultMessageFontStyle":"NORMAL","defaultMessageFontWeight":"400","defaultMessageFontFamily":"var(--lia-bs-font-family-base)","forumColor":"#0C5C8D","forumFontFamily":"var(--lia-bs-font-family-base)","forumFontWeight":"var(--lia-default-message-font-weight)","forumLineHeight":"var(--lia-bs-line-height-base)","forumFontStyle":"var(--lia-default-message-font-style)","forumMessageLinkColor":"var(--lia-default-message-link-color)","forumMessageLinkDecoration":"var(--lia-default-message-link-decoration)","forumMessageLinkFontStyle":"var(--lia-default-message-link-font-style)","forumMessageLinkFontWeight":"var(--lia-default-message-link-font-weight)","forumSolvedColor":"#62C026","blogColor":"#730015","blogFontFamily":"var(--lia-bs-font-family-base)","blogFontWeight":"var(--lia-default-message-font-weight)","blogLineHeight":"1.75","blogFontStyle":"var(--lia-default-message-font-style)","blogMessageLinkColor":"var(--lia-default-message-link-color)","blogMessageLinkDecoration":"var(--lia-default-message-link-decoration)","blogMessageLinkFontStyle":"var(--lia-default-message-link-font-style)","blogMessageLinkFontWeight":"var(--lia-default-message-link-font-weight)","tkbColor":"#C20025","tkbFontFamily":"var(--lia-bs-font-family-base)","tkbFontWeight":"var(--lia-default-message-font-weight)","tkbLineHeight":"1.75","tkbFontStyle":"var(--lia-default-message-font-style)","tkbMessageLinkColor":"var(--lia-default-message-link-color)","tkbMessageLinkDecoration":"var(--lia-default-message-link-decoration)","tkbMessageLinkFontStyle":"var(--lia-default-message-link-font-style)","tkbMessageLinkFontWeight":"var(--lia-default-message-link-font-weight)","qandaColor":"#4099E2","qandaFontFamily":"var(--lia-bs-font-family-base)","qandaFontWeight":"var(--lia-default-message-font-weight)","qandaLineHeight":"var(--lia-bs-line-height-base)","qandaFontStyle":"var(--lia-default-message-link-font-style)","qandaMessageLinkColor":"var(--lia-default-message-link-color)","qandaMessageLinkDecoration":"var(--lia-default-message-link-decoration)","qandaMessageLinkFontStyle":"var(--lia-default-message-link-font-style)","qandaMessageLinkFontWeight":"var(--lia-default-message-link-font-weight)","qandaSolvedColor":"#3FA023","ideaColor":"#F3704B","ideaFontFamily":"var(--lia-bs-font-family-base)","ideaFontWeight":"var(--lia-default-message-font-weight)","ideaLineHeight":"var(--lia-bs-line-height-base)","ideaFontStyle":"var(--lia-default-message-font-style)","ideaMessageLinkColor":"var(--lia-default-message-link-color)","ideaMessageLinkDecoration":"var(--lia-default-message-link-decoration)","ideaMessageLinkFontStyle":"var(--lia-default-message-link-font-style)","ideaMessageLinkFontWeight":"var(--lia-default-message-link-font-weight)","contestColor":"#FCC845","contestFontFamily":"var(--lia-bs-font-family-base)","contestFontWeight":"var(--lia-default-message-font-weight)","contestLineHeight":"var(--lia-bs-line-height-base)","contestFontStyle":"var(--lia-default-message-link-font-style)","contestMessageLinkColor":"var(--lia-default-message-link-color)","contestMessageLinkDecoration":"var(--lia-default-message-link-decoration)","contestMessageLinkFontStyle":"ITALIC","contestMessageLinkFontWeight":"var(--lia-default-message-link-font-weight)","occasionColor":"#EE4B5B","occasionFontFamily":"var(--lia-bs-font-family-base)","occasionFontWeight":"var(--lia-default-message-font-weight)","occasionLineHeight":"var(--lia-bs-line-height-base)","occasionFontStyle":"var(--lia-default-message-font-style)","occasionMessageLinkColor":"var(--lia-default-message-link-color)","occasionMessageLinkDecoration":"var(--lia-default-message-link-decoration)","occasionMessageLinkFontStyle":"var(--lia-default-message-link-font-style)","occasionMessageLinkFontWeight":"var(--lia-default-message-link-font-weight)","grouphubColor":"#491B62","categoryColor":"#949494","communityColor":"#FFFFFF","productColor":"#949494","__typename":"CoreTypesThemeSettings"},"colors":{"black":"#000000","white":"#FFFFFF","gray100":"#F7F7F7","gray200":"#F7F7F7","gray300":"#E8E8E8","gray400":"#D9D9D9","gray500":"#CCCCCC","gray600":"#949494","gray700":"#707070","gray800":"#545454","gray900":"#333333","dark":"#545454","light":"#F7F7F7","primary":"#0C5C8D","secondary":"#333333","bodyText":"#222222","bodyBg":"#F5F5F5","info":"#1D9CD3","success":"#62C026","warning":"#FFD651","danger":"#C20025","alertSystem":"#FF6600","textMuted":"#707070","highlight":"#FFFCAD","outline":"var(--lia-bs-primary)","custom":["#C20025","#081B85","#009639","#B3C6D7","#7CC0EB","#F29A36"],"__typename":"ColorsThemeSettings"},"divider":{"size":"3px","marginLeft":"4px","marginRight":"4px","borderRadius":"50%","bgColor":"var(--lia-bs-gray-600)","bgColorActive":"var(--lia-bs-gray-600)","__typename":"DividerThemeSettings"},"dropdown":{"fontSize":"var(--lia-bs-font-size-sm)","borderColor":"var(--lia-bs-border-color)","borderRadius":"var(--lia-bs-border-radius-sm)","dividerBg":"var(--lia-bs-gray-300)","itemPaddingY":"5px","itemPaddingX":"20px","headerColor":"var(--lia-bs-gray-700)","__typename":"DropdownThemeSettings"},"email":{"link":{"color":"#0069D4","hoverColor":"#0061c2","decoration":"none","hoverDecoration":"underline","__typename":"EmailLinkSettings"},"border":{"color":"#e4e4e4","__typename":"EmailBorderSettings"},"buttons":{"borderRadiusLg":"5px","paddingXLg":"16px","paddingYLg":"7px","fontWeight":"700","primaryTextColor":"#ffffff","primaryTextHoverColor":"#ffffff","primaryBgColor":"#0069D4","primaryBgHoverColor":"#005cb8","primaryBorder":"1px solid transparent","primaryBorderHover":"1px solid transparent","__typename":"EmailButtonsSettings"},"panel":{"borderRadius":"5px","borderColor":"#e4e4e4","__typename":"EmailPanelSettings"},"__typename":"EmailThemeSettings"},"emoji":{"skinToneDefault":"#ffcd43","skinToneLight":"#fae3c5","skinToneMediumLight":"#e2cfa5","skinToneMedium":"#daa478","skinToneMediumDark":"#a78058","skinToneDark":"#5e4d43","__typename":"EmojiThemeSettings"},"heading":{"color":"var(--lia-bs-body-color)","fontFamily":"Inter","fontStyle":"NORMAL","fontWeight":"600","h1FontSize":"30px","h2FontSize":"25px","h3FontSize":"20px","h4FontSize":"18px","h5FontSize":"16px","h6FontSize":"16px","lineHeight":"1.2","subHeaderFontSize":"11px","subHeaderFontWeight":"500","h1LetterSpacing":"normal","h2LetterSpacing":"normal","h3LetterSpacing":"normal","h4LetterSpacing":"normal","h5LetterSpacing":"normal","h6LetterSpacing":"normal","subHeaderLetterSpacing":"2px","h1FontWeight":"var(--lia-bs-headings-font-weight)","h2FontWeight":"var(--lia-bs-headings-font-weight)","h3FontWeight":"var(--lia-bs-headings-font-weight)","h4FontWeight":"var(--lia-bs-headings-font-weight)","h5FontWeight":"var(--lia-bs-headings-font-weight)","h6FontWeight":"var(--lia-bs-headings-font-weight)","__typename":"HeadingThemeSettings"},"icons":{"size10":"10px","size12":"12px","size14":"14px","size16":"16px","size20":"20px","size24":"24px","size30":"30px","size40":"40px","size50":"50px","size60":"60px","size80":"80px","size120":"120px","size160":"160px","__typename":"IconsThemeSettings"},"imagePreview":{"bgColor":"var(--lia-bs-gray-900)","titleColor":"var(--lia-bs-white)","controlColor":"var(--lia-bs-white)","controlBgColor":"var(--lia-bs-gray-800)","__typename":"ImagePreviewThemeSettings"},"input":{"borderColor":"var(--lia-bs-gray-600)","disabledColor":"var(--lia-bs-gray-600)","focusBorderColor":"var(--lia-bs-primary)","labelMarginBottom":"10px","btnFontSize":"var(--lia-bs-font-size-sm)","focusBoxShadow":"0 0 0 3px hsla(var(--lia-bs-primary-h), var(--lia-bs-primary-s), var(--lia-bs-primary-l), 0.2)","checkLabelMarginBottom":"2px","checkboxBorderRadius":"3px","borderRadiusSm":"var(--lia-bs-border-radius-sm)","borderRadius":"var(--lia-bs-border-radius)","borderRadiusLg":"var(--lia-bs-border-radius-lg)","formTextMarginTop":"4px","textAreaBorderRadius":"var(--lia-bs-border-radius)","activeFillColor":"var(--lia-bs-primary)","__typename":"InputThemeSettings"},"loading":{"dotDarkColor":"hsla(var(--lia-bs-black-h), var(--lia-bs-black-s), var(--lia-bs-black-l), 0.2)","dotLightColor":"hsla(var(--lia-bs-white-h), var(--lia-bs-white-s), var(--lia-bs-white-l), 0.5)","barDarkColor":"hsla(var(--lia-bs-black-h), var(--lia-bs-black-s), var(--lia-bs-black-l), 0.06)","barLightColor":"hsla(var(--lia-bs-white-h), var(--lia-bs-white-s), var(--lia-bs-white-l), 0.4)","__typename":"LoadingThemeSettings"},"link":{"color":"var(--lia-bs-primary)","hoverColor":"hsl(var(--lia-bs-primary-h), var(--lia-bs-primary-s), calc(var(--lia-bs-primary-l) - 10%))","decoration":"none","hoverDecoration":"underline","__typename":"LinkThemeSettings"},"listGroup":{"itemPaddingY":"15px","itemPaddingX":"15px","borderColor":"var(--lia-bs-gray-300)","__typename":"ListGroupThemeSettings"},"modal":{"contentTextColor":"var(--lia-bs-body-color)","contentBg":"var(--lia-bs-white)","backgroundBg":"var(--lia-bs-black)","smSize":"440px","mdSize":"760px","lgSize":"1080px","backdropOpacity":0.3,"contentBoxShadowXs":"var(--lia-bs-box-shadow-sm)","contentBoxShadow":"var(--lia-bs-box-shadow)","headerFontWeight":"700","__typename":"ModalThemeSettings"},"navbar":{"position":"FIXED","background":{"attachment":null,"clip":null,"color":"var(--lia-bs-white)","imageAssetName":null,"imageLastModified":"0","origin":null,"position":"CENTER_CENTER","repeat":"NO_REPEAT","size":"COVER","__typename":"BackgroundProps"},"backgroundOpacity":0.8,"paddingTop":"15px","paddingBottom":"15px","borderBottom":"1px solid var(--lia-bs-border-color)","boxShadow":"var(--lia-bs-box-shadow-sm)","brandMarginRight":"30px","brandMarginRightSm":"10px","brandLogoHeight":"30px","linkGap":"10px","linkJustifyContent":"flex-start","linkPaddingY":"5px","linkPaddingX":"10px","linkDropdownPaddingY":"9px","linkDropdownPaddingX":"var(--lia-nav-link-px)","linkColor":"var(--lia-bs-body-color)","linkHoverColor":"var(--lia-bs-primary)","linkFontSize":"var(--lia-bs-font-size-sm)","linkFontStyle":"NORMAL","linkFontWeight":"400","linkTextTransform":"NONE","linkLetterSpacing":"normal","linkBorderRadius":"var(--lia-bs-border-radius-sm)","linkBgColor":"transparent","linkBgHoverColor":"transparent","linkBorder":"none","linkBorderHover":"none","linkBoxShadow":"none","linkBoxShadowHover":"none","linkTextBorderBottom":"none","linkTextBorderBottomHover":"none","dropdownPaddingTop":"10px","dropdownPaddingBottom":"15px","dropdownPaddingX":"10px","dropdownMenuOffset":"2px","dropdownDividerMarginTop":"10px","dropdownDividerMarginBottom":"10px","dropdownBorderColor":"hsla(var(--lia-bs-black-h), var(--lia-bs-black-s), var(--lia-bs-black-l), 0.08)","controllerBgHoverColor":"hsla(var(--lia-bs-black-h), var(--lia-bs-black-s), var(--lia-bs-black-l), 0.1)","controllerIconColor":"var(--lia-bs-body-color)","controllerIconHoverColor":"var(--lia-bs-body-color)","controllerTextColor":"var(--lia-nav-controller-icon-color)","controllerTextHoverColor":"var(--lia-nav-controller-icon-hover-color)","controllerHighlightColor":"hsla(30, 100%, 50%)","controllerHighlightTextColor":"var(--lia-yiq-light)","controllerBorderRadius":"var(--lia-border-radius-50)","hamburgerColor":"var(--lia-nav-controller-icon-color)","hamburgerHoverColor":"var(--lia-nav-controller-icon-color)","hamburgerBgColor":"transparent","hamburgerBgHoverColor":"transparent","hamburgerBorder":"none","hamburgerBorderHover":"none","collapseMenuMarginLeft":"20px","collapseMenuDividerBg":"var(--lia-nav-link-color)","collapseMenuDividerOpacity":0.16,"__typename":"NavbarThemeSettings"},"pager":{"textColor":"var(--lia-bs-link-color)","textFontWeight":"var(--lia-font-weight-md)","textFontSize":"var(--lia-bs-font-size-sm)","__typename":"PagerThemeSettings"},"panel":{"bgColor":"var(--lia-bs-white)","borderRadius":"var(--lia-bs-border-radius)","borderColor":"var(--lia-bs-border-color)","boxShadow":"none","__typename":"PanelThemeSettings"},"popover":{"arrowHeight":"8px","arrowWidth":"16px","maxWidth":"300px","minWidth":"100px","headerBg":"var(--lia-bs-white)","borderColor":"var(--lia-bs-border-color)","borderRadius":"var(--lia-bs-border-radius)","boxShadow":"0 0.5rem 1rem hsla(var(--lia-bs-black-h), var(--lia-bs-black-s), var(--lia-bs-black-l), 0.15)","__typename":"PopoverThemeSettings"},"prism":{"color":"#000000","bgColor":"#f5f2f0","fontFamily":"var(--font-family-monospace)","fontSize":"var(--lia-bs-font-size-base)","fontWeightBold":"var(--lia-bs-font-weight-bold)","fontStyleItalic":"italic","tabSize":2,"highlightColor":"#b3d4fc","commentColor":"#62707e","punctuationColor":"#6f6f6f","namespaceOpacity":"0.7","propColor":"#990055","selectorColor":"#517a00","operatorColor":"#906736","operatorBgColor":"hsla(0, 0%, 100%, 0.5)","keywordColor":"#0076a9","functionColor":"#d3284b","variableColor":"#c14700","__typename":"PrismThemeSettings"},"rte":{"bgColor":"var(--lia-bs-white)","borderRadius":"var(--lia-panel-border-radius)","boxShadow":" var(--lia-panel-box-shadow)","customColor1":"#bfedd2","customColor2":"#fbeeb8","customColor3":"#f8cac6","customColor4":"#eccafa","customColor5":"#c2e0f4","customColor6":"#2dc26b","customColor7":"#f1c40f","customColor8":"#e03e2d","customColor9":"#b96ad9","customColor10":"#3598db","customColor11":"#169179","customColor12":"#e67e23","customColor13":"#ba372a","customColor14":"#843fa1","customColor15":"#236fa1","customColor16":"#ecf0f1","customColor17":"#ced4d9","customColor18":"#95a5a6","customColor19":"#7e8c8d","customColor20":"#34495e","customColor21":"#000000","customColor22":"#ffffff","defaultMessageHeaderMarginTop":"14px","defaultMessageHeaderMarginBottom":"10px","defaultMessageItemMarginTop":"0","defaultMessageItemMarginBottom":"10px","diffAddedColor":"hsla(170, 53%, 51%, 0.4)","diffChangedColor":"hsla(43, 97%, 63%, 0.4)","diffNoneColor":"hsla(0, 0%, 80%, 0.4)","diffRemovedColor":"hsla(9, 74%, 47%, 0.4)","specialMessageHeaderMarginTop":"14px","specialMessageHeaderMarginBottom":"10px","specialMessageItemMarginTop":"0","specialMessageItemMarginBottom":"10px","__typename":"RteThemeSettings"},"tags":{"bgColor":"var(--lia-bs-gray-200)","bgHoverColor":"var(--lia-bs-gray-400)","borderRadius":"var(--lia-bs-border-radius-sm)","color":"var(--lia-bs-body-color)","hoverColor":"var(--lia-bs-body-color)","fontWeight":"var(--lia-font-weight-md)","fontSize":"var(--lia-font-size-xxs)","textTransform":"UPPERCASE","letterSpacing":"0.5px","__typename":"TagsThemeSettings"},"toasts":{"borderRadius":"var(--lia-bs-border-radius)","paddingX":"12px","__typename":"ToastsThemeSettings"},"typography":{"fontFamilyBase":"Atkinson Hyperlegible","fontStyleBase":"NORMAL","fontWeightBase":"400","fontWeightLight":"300","fontWeightNormal":"400","fontWeightMd":"500","fontWeightBold":"700","letterSpacingSm":"normal","letterSpacingXs":"normal","lineHeightBase":"1.3","fontSizeBase":"15px","fontSizeXxs":"11px","fontSizeXs":"12px","fontSizeSm":"13px","fontSizeLg":"20px","fontSizeXl":"24px","smallFontSize":"14px","customFonts":[],"__typename":"TypographyThemeSettings"},"unstyledListItem":{"marginBottomSm":"5px","marginBottomMd":"10px","marginBottomLg":"15px","marginBottomXl":"20px","marginBottomXxl":"25px","__typename":"UnstyledListItemThemeSettings"},"yiq":{"light":"#ffffff","dark":"#000000","__typename":"YiqThemeSettings"},"colorLightness":{"primaryDark":0.36,"primaryLight":0.74,"primaryLighter":0.89,"primaryLightest":0.95,"infoDark":0.39,"infoLight":0.72,"infoLighter":0.85,"infoLightest":0.93,"successDark":0.24,"successLight":0.62,"successLighter":0.8,"successLightest":0.91,"warningDark":0.39,"warningLight":0.68,"warningLighter":0.84,"warningLightest":0.93,"dangerDark":0.41,"dangerLight":0.72,"dangerLighter":0.89,"dangerLightest":0.95,"__typename":"ColorLightnessThemeSettings"},"localOverride":false,"__typename":"Theme"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/common/Loading/LoadingDot-1744046271000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/common/Loading/LoadingDot-1744046271000","value":{"title":"Loading..."},"localOverride":false},"CachedAsset:quilt:f5.prod:pages/kbs/TkbMessagePage:board:TechnicalArticles-1744704712036":{"__typename":"CachedAsset","id":"quilt:f5.prod:pages/kbs/TkbMessagePage:board:TechnicalArticles-1744704712036","value":{"id":"TkbMessagePage","container":{"id":"Common","headerProps":{"backgroundImageProps":null,"backgroundColor":null,"addComponents":null,"removeComponents":["community.widget.bannerWidget"],"componentOrder":null,"__typename":"QuiltContainerSectionProps"},"headerComponentProps":{"community.widget.breadcrumbWidget":{"disableLastCrumbForDesktop":false}},"footerProps":null,"footerComponentProps":null,"items":[{"id":"message-list","layout":"MAIN_SIDE","bgColor":"transparent","showTitle":true,"showDescription":true,"textPosition":"CENTER","textColor":"var(--lia-bs-body-color)","sectionEditLevel":null,"bgImage":null,"disableSpacing":null,"edgeToEdgeDisplay":null,"fullHeight":null,"showBorder":null,"__typename":"MainSideQuiltSection","columnMap":{"main":[{"id":"tkbs.widget.tkbArticleWidget","className":"lia-tkb-container","props":{"contributorListType":"panel","showHelpfulness":false,"showTimestamp":true,"showGuideNavigationSection":true,"showVersion":true,"lazyLoad":false,"editLevel":"CONFIGURE"},"__typename":"QuiltComponent"}],"side":[{"id":"featuredWidgets.widget.featuredContentWidget","className":null,"props":{"instanceId":"featuredWidgets.widget.featuredContentWidget-1702666556326","layoutProps":{"layout":"card","layoutOptions":{"useRepliesCount":false,"useAuthorRank":false,"useTimeToRead":true,"useKudosCount":false,"useViewCount":true,"usePreviewMedia":true,"useBody":false,"useCenteredCardContent":false,"useTags":true,"useTimestamp":false,"useBoardLink":true,"useAuthorLink":false,"useSolvedBadge":true}},"titleSrOnly":false,"showPager":true,"pageSize":3,"lazyLoad":true},"__typename":"QuiltComponent"},{"id":"messages.widget.relatedContentWidget","className":null,"props":{"hideIfEmpty":true,"enablePagination":true,"useTitle":true,"listVariant":{"type":"listGroup"},"pageSize":3,"style":"list","pagerVariant":{"type":"loadMore"},"viewVariant":{"type":"inline","props":{"useRepliesCount":true,"useMedia":true,"useAuthorRank":false,"useNode":true,"useTimeToRead":true,"useSpoilerFreeBody":true,"useKudosCount":true,"useNodeLink":true,"useViewCount":true,"usePreviewMedia":false,"useBody":false,"timeStampType":"postTime","useTags":true,"clampSubjectLines":2,"useBoardIcon":false,"useMessageTimeLink":true,"clampBodyLines":3,"useTextBody":true,"useSolvedBadge":true,"useAvatar":true,"useAuthorLogin":true,"useUnreadCount":true}},"lazyLoad":true,"panelType":"divider"},"__typename":"QuiltComponent"}],"__typename":"MainSideSectionColumns"}}],"__typename":"QuiltContainer"},"__typename":"Quilt","localOverride":false},"localOverride":false},"CachedAsset:text:en_US-components/common/EmailVerification-1744046271000":{"__typename":"CachedAsset","id":"text:en_US-components/common/EmailVerification-1744046271000","value":{"email.verification.title":"Email Verification Required","email.verification.message.update.email":"To participate in the community, you must first verify your email address. The verification email was sent to {email}. To change your email, visit I also like use python f5-sdk, from September 2020 to now(Although the sdk does not support updates now),Use it to GET AS3 or Common or other partitions LTM and GTM configuration, or use it POST create LTM virtual server or GTM wideips.
\n