traffic_ip_groups¶
TrafficIPGroups
¶
-
class
stingray.config.traffic_ip_groups.
TrafficIPGroups
(host=None, port=None, user=None, password=None, api_version=None, ssl_verify=None)[source]¶ Bases:
stingray.apiclient.Client
Class for interacting with Traffic IP Groups via the REST API
-
add
(group, ipaddresses=None, machines=None, mode='singlehosted', **group_props)[source]¶ Add a new traffic ip group.
Parameters: - group (str) – The traffic ip group name
- ipaddresses (list) – IP addresses to assign to the group
- machines (list) – Load balancers that can host the group’s IP addresses. Default is the current load balancer (or load balancers if clustered).
- mode (str) – Method used to distribute traffic across the cluster.
Default is
singlehosted
- group_props (dict) –
Additional arguments to set the properties of the traffic ip group at time of creation. Must be a dict in the form of:
{'section': {'key': 'value'}}
Returns: The new traffic ip group
Return type:
-
delete
(group)[source]¶ Delete a traffic ip group
Parameters: group (str) – The name of the traffic ip group to delete Returns: Response from the _api_delete method Return type: (dict)
-
get
(group)[source]¶ Get a TrafficIPGroup object for the requested traffic ip group
Parameters: group (str) – The name of the traffic ip group to get Returns: The requested traffic ip group Return type: (TrafficIPGroup)
-
TrafficIPGroup
¶
-
class
stingray.config.traffic_ip_groups.
TrafficIPGroup
(group_name, group_path=None, group_properties=None, host=None, port=None, user=None, password=None, api_version=None, ssl_verify=None)[source]¶ Bases:
stingray.apiclient.Client
Class for interacting with individual traffic ip groups via the REST API