f5.bigip.tm.security¶
Module contents¶
BIG-IP® Security module.
- REST URI
http://localhost/mgmt/tm/security
- GUI Path
Security
- REST Kind
tm:security:*
Submodule List¶
analytics |
BIG-IP® Advanced Firewall Manager™ (AFM®) module. |
dos |
BIG-IP® Advanced Firewall Manager™ (AFM®) module. |
firewall |
BIG-IP® Advanced Firewall Manager™ (AFM®) module. |
protocol_inspection |
BIG-IP® Advanced Firewall Manager™ (AFM®) module. |
-
class
f5.bigip.tm.security.
Security
(tm)[source]¶ Bases:
f5.bigip.resource.OrganizingCollection
BIG-IP® Security organizing collection.
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
get_collection
(**kwargs)¶ Call to obtain a list of the reference dicts in the instance items
- Returns:
- list: List of self.items
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
Submodules¶
analytics¶
BIG-IP® Advanced Firewall Manager™ (AFM®) module.
- REST URI
http://localhost/mgmt/tm/security/analytics
- GUI Path
Security --> Network Firewall
- REST Kind
tm:security:analytics:*
-
class
f5.bigip.tm.security.analytics.
Analytics
(security)[source]¶ Bases:
f5.bigip.resource.OrganizingCollection
BIG-IP® AFM® Analytics organizing collection.
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
get_collection
(**kwargs)¶ Call to obtain a list of the reference dicts in the instance items
- Returns:
- list: List of self.items
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.analytics.
Settings
(settings)[source]¶ Bases:
f5.bigip.resource.UnnamedResource
BIG-IP® Analytics settings resource
-
create
(**kwargs)¶ Create is not supported for unnamed resources
- Raises:
- UnsupportedMethod: If the method is used
-
delete
(**kwargs)¶ Delete is not supported for unnamed resources
- Raises:
- UnsupportedMethod: If the method is used
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
dos¶
BIG-IP® Advanced Firewall Manager™ (AFM®) module.
- REST URI
http://localhost/mgmt/tm/security/dos
- GUI Path
Security --> Dos Protection
- REST Kind
tm:security:dos*
-
class
f5.bigip.tm.security.dos.
Dos
(security)[source]¶ Bases:
f5.bigip.resource.OrganizingCollection
BIG-IP® DOS organizing collection.
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
get_collection
(**kwargs)¶ Call to obtain a list of the reference dicts in the instance items
- Returns:
- list: List of self.items
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Profiles
(dos)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® Dos Profile collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Profile
(profile_s)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® Dos Profile resource
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Applications
(profile)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® Dos Profile Application sub-collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Application
(applications)[source]¶ Bases:
f5.bigip.resource.Resource
,f5.bigip.mixins.CheckExistenceMixin
BIG-IP® Dos Profile Application resource
-
load
(**kwargs)[source]¶ Custom load method to address issue in 11.6.0 Final,
where non existing objects would be True.
-
exists
(**kwargs)[source]¶ Some objects when deleted still return when called by their
direct URI, this is a known issue in 11.6.0.
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Dos_Networks
(profile)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® Dos Profile Dos Networks sub-collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Dos_Network
(dos_networks)[source]¶ Bases:
f5.bigip.resource.Resource
,f5.bigip.mixins.CheckExistenceMixin
BIG-IP® Dos Profile Dos Network resource
-
load
(**kwargs)[source]¶ Custom load method to address issue in 11.6.0 Final,
where non existing objects would be True.
-
exists
(**kwargs)[source]¶ Some objects when deleted still return when called by their
direct URI, this is a known issue in 11.6.0.
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Protocol_Dns_s
(profile)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® Dos Profile Protocol Dns sub-collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Protocol_Dns
(protocol_dns_s)[source]¶ Bases:
f5.bigip.resource.Resource
,f5.bigip.mixins.CheckExistenceMixin
BIG-IP® Dos Profile Protocol Dns resource
-
load
(**kwargs)[source]¶ Custom load method to address issue in 11.6.0 Final,
where non existing objects would be True.
-
exists
(**kwargs)[source]¶ Some objects when deleted still return when called by their
direct URI, this is a known issue in 11.6.0.
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Protocol_Sips
(profile)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® Dos Profile Protocol Sip sub-collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Protocol_Sip
(protocol_sips)[source]¶ Bases:
f5.bigip.resource.Resource
,f5.bigip.mixins.CheckExistenceMixin
BIG-IP® Dos Profile Protocol Sip resource
-
load
(**kwargs)[source]¶ Custom load method to address issue in 11.6.0 Final,
where non existing objects would be True.
-
exists
(**kwargs)[source]¶ Some objects when deleted still return when called by their
direct URI, this is a known issue in 11.6.0.
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Device_Configs
(dos)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® Dos Device collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.dos.
Device_Config
(device_configs)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® Dos Device resource
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
firewall¶
BIG-IP® Advanced Firewall Manager™ (AFM®) module.
- REST URI
http://localhost/mgmt/tm/security/firewall
- GUI Path
Security --> Network Firewall
- REST Kind
tm:security:firewall:*
-
class
f5.bigip.tm.security.firewall.
Firewall
(security)[source]¶ Bases:
f5.bigip.resource.OrganizingCollection
BIG-IP® AFM® Firewall organizing collection.
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
get_collection
(**kwargs)¶ Call to obtain a list of the reference dicts in the instance items
- Returns:
- list: List of self.items
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Address_Lists
(firewall)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® AFM® Address List collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Address_List
(address_lists)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® Address List resource
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Port_Lists
(firewall)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® AFM® Port List collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Port_List
(port_lists)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® Port List resource
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Rule_Lists
(firewall)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® AFM® Rule List collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Rule_List
(rule_lists)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® Rule List resource
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Rules_s
(policy)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® AFM® Rules sub-collection.
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Rule
(rules_s)[source]¶ Bases:
f5.bigip.resource.Resource
,f5.bigip.mixins.CheckExistenceMixin
BIG-IP® AFM® Rule resource.
- NOTE:: The ‘place-before’ and ‘place-after’ attribute are
- mandatory but cannot be present with one another. Those attributes will not be visible when the class is created, they exist for the sole purpose of rule ordering in the BIGIP. The ordering of the rules corresponds to the index in the ‘items’ of the Rules_s sub-collection.
-
load
(**kwargs)[source]¶ Custom load method to address issue in 11.6.0 Final,
where non existing objects would be True.
-
exists
(**kwargs)[source]¶ Some objects when deleted still return when called by their
direct URI, this is a known issue in 11.6.0.
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
class
f5.bigip.tm.security.firewall.
Policy_s
(firewall)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® AFM® Policy collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Policy
(policy_s)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® AFM® Policy resource
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Global_Rules
(global_rules)[source]¶ Bases:
f5.bigip.resource.UnnamedResource
BIG-IP® AFM® Global Rules resource
-
create
(**kwargs)¶ Create is not supported for unnamed resources
- Raises:
- UnsupportedMethod: If the method is used
-
delete
(**kwargs)¶ Delete is not supported for unnamed resources
- Raises:
- UnsupportedMethod: If the method is used
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.firewall.
Global_Fqdn_Policy
(global_fqdn_policy)[source]¶ Bases:
f5.bigip.resource.UnnamedResource
BIG-IP® AFM® Global FQDN policy resource
-
create
(**kwargs)¶ Create is not supported for unnamed resources
- Raises:
- UnsupportedMethod: If the method is used
-
delete
(**kwargs)¶ Delete is not supported for unnamed resources
- Raises:
- UnsupportedMethod: If the method is used
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
protocol_inspection¶
BIG-IP® Advanced Firewall Manager™ (AFM®) module.
- REST URI
http://localhost/mgmt/tm/security/protocol-inspection
- GUI Path
- ``Security –> Protocol Security –> Inspection_Profiles
- Security –> Protocol Security –> Inspection_List
- REST Kind
tm:security:protocol-inspection*
-
class
f5.bigip.tm.security.protocol_inspection.
Protocol_Inspection
(security)[source]¶ Bases:
f5.bigip.resource.OrganizingCollection
BIG-IP® Protocol Inspection Organizing collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
get_collection
(**kwargs)¶ Call to obtain a list of the reference dicts in the instance items
- Returns:
- list: List of self.items
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.protocol_inspection.
Profiles
(protocol_inspection)[source]¶ Bases:
f5.bigip.resource.Collection
“BIG-IP® Protocol Inspection Profile collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.protocol_inspection.
Profile
(profiles)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® Protocol Inspection Profile resource
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.protocol_inspection.
Compliances
(protocol_inspection)[source]¶ Bases:
f5.bigip.resource.Collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.protocol_inspection.
Compliance
(compliances)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® Protocol Inspection Compliance 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®.
-
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.
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.protocol_inspection.
Signatures
(protocol_inspection)[source]¶ Bases:
f5.bigip.resource.Collection
BIG-IP® Protocol Inspection Signature collection
-
create
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete
(**kwargs)¶ Implement this by overriding it in a subclass of Resource
- Raises:
- InvalidResource: If method is used.
-
delete_collection
(**kwargs)¶ One can not simply delete a collection.
This is to support odata usage via the options request parameter:
requests_params={'params': 'options=glob_pattern'}
where glob_pattern can be used to delete one or all of a particular collection. Not submitting the requests params will fail, and specifying patterns that match default resources will fail as well.
-
get_collection
(**kwargs)¶ Get an iterator of Python
Resource
objects that represent URIs.The returned objects are Pythonic Resource`s that map to the most recently `refreshed state of uris-resources published by the device. In order to instantiate the correct types, the concrete subclass must populate its registry with acceptable types, based on the kind field returned by the REST server.
Note
This method implies a single REST transaction with the Collection subclass URI.
Raises: UnregisteredKind Returns: list of reference dicts and Python Resource
objects
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-
-
class
f5.bigip.tm.security.protocol_inspection.
Signature
(signatures)[source]¶ Bases:
f5.bigip.resource.Resource
BIG-IP® Protocol Inspection Signature resource
-
create
(**kwargs)¶ 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®.
-
delete
(**kwargs)¶ 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.
-
exists
(**kwargs)¶ 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.
-
load
(**kwargs)¶ 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']
-
modify
(**patch)¶ Modify the configuration of the resource on device based on patch
-
raw
¶ Display the attributes that the current object has and their values.
Returns: A dictionary of attributes and their values
-
refresh
(**kwargs)¶ Use this to make the device resource be represented by self.
This method makes an HTTP GET query against the device service. This method is run for its side-effects on self. If successful the instance attribute __dict__ is replaced with the dict representing the device state. To figure out what that state is, run a subsequest query of the object like this: As with all CURDLE methods use a “requests_params” dict to pass parameters to requests.session.HTTPMETHOD. See test_requests_params.py for an example. >>> resource_obj.refresh() >>> print(resource_obj.raw)
-
update
(**kwargs)¶ Update the configuration of the resource on the BIG-IP®.
This method uses HTTP PUT alter the resource state on the BIG-IP®.
The attributes of the instance will be packaged as a dictionary. That dictionary will be updated with kwargs. It is then submitted as JSON to the device.
Various edge cases are handled: * read-only attributes that are unchangeable are removed
- Args:
- kwargs (dict): Arbitrary number of keyword arguments.
Keys and associated values to alter on the device.
If kwargs has a
requests_params
key the corresponding dict will be passed to the underlyingrequests.session.put
method where it will be handled according to that API.
-