mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Updated Avi Modules with new features and documentation update. (#34206)
* Updated Avi Modules with following 1. Support to perform patch operation using the modules. The data update method is selected using avi_api_update_method=patch and patch operation is determined by avi_api_patch_op. The patch data is the normal params that are provided in the modules 2. Support for avi_credentials as single authentication dictionary for all API calls. This is preferred way as opposed to previously all credentials details would pollute the individual Ansible tasks. It also allows the module development to be enhanced without breaking compatibility for new authentication schemes like SAML etc. 3. Support for sharing api_context between the module invocations. This is a workaround to not do multiple logins to Avi Controller and be able to re-use single login across multiple REST API calls. 4. Documentation update for new parameters and existing ones with Units data. * Fixed the pylint and pep8 errors caused due to pycharm editor auto formatting
This commit is contained in:
committed by
John R Barker
parent
9b4a1ed475
commit
9e2ff3e4d5
@@ -43,7 +43,19 @@ options:
|
||||
description:
|
||||
- The state that should be applied on the entity.
|
||||
default: present
|
||||
choices: ["absent","present"]
|
||||
choices: ["absent", "present"]
|
||||
avi_api_update_method:
|
||||
description:
|
||||
- Default method for object update is HTTP PUT.
|
||||
- Setting to patch will override that behavior to use HTTP PATCH.
|
||||
version_added: "2.5"
|
||||
default: put
|
||||
choices: ["put", "patch"]
|
||||
avi_api_patch_op:
|
||||
description:
|
||||
- Patch operation to use when using avi_api_update_method as patch.
|
||||
version_added: "2.5"
|
||||
choices: ["add", "replace", "delete"]
|
||||
active_standby_se_tag:
|
||||
description:
|
||||
- This configuration only applies if the virtualservice is in legacy active standby ha mode and load distribution among active standby is enabled.
|
||||
@@ -92,6 +104,12 @@ options:
|
||||
client_auth:
|
||||
description:
|
||||
- Http authentication configuration for protected resources.
|
||||
close_client_conn_on_config_update:
|
||||
description:
|
||||
- Close client connection on vs config update.
|
||||
- Field introduced in 17.2.4.
|
||||
- Default value when not specified in API or module is interpreted by Avi Controller as False.
|
||||
version_added: "2.5"
|
||||
cloud_config_cksum:
|
||||
description:
|
||||
- Checksum of cloud configuration for vs.
|
||||
@@ -102,7 +120,7 @@ options:
|
||||
cloud_type:
|
||||
description:
|
||||
- Enum options - cloud_none, cloud_vcenter, cloud_openstack, cloud_aws, cloud_vca, cloud_apic, cloud_mesos, cloud_linuxserver, cloud_docker_ucp,
|
||||
- cloud_rancher, cloud_oshift_k8s.
|
||||
- cloud_rancher, cloud_oshift_k8s, cloud_azure.
|
||||
- Default value when not specified in API or module is interpreted by Avi Controller as CLOUD_NONE.
|
||||
connections_rate_limit:
|
||||
description:
|
||||
@@ -164,6 +182,12 @@ options:
|
||||
description:
|
||||
- Enable or disable the virtual service.
|
||||
- Default value when not specified in API or module is interpreted by Avi Controller as True.
|
||||
error_page_profile_ref:
|
||||
description:
|
||||
- Error page profile to be used for this virtualservice.this profile is used to send the custom error page to the client generated by the proxy.
|
||||
- It is a reference to an object of type errorpageprofile.
|
||||
- Field introduced in 17.2.4.
|
||||
version_added: "2.5"
|
||||
floating_ip:
|
||||
description:
|
||||
- Floating ip to associate with this virtual service.
|
||||
@@ -182,7 +206,7 @@ options:
|
||||
flow_label_type:
|
||||
description:
|
||||
- Criteria for flow labelling.
|
||||
- Enum options - NO_LABEL, SERVICE_LABEL.
|
||||
- Enum options - NO_LABEL, APPLICATION_LABEL, SERVICE_LABEL.
|
||||
- Default value when not specified in API or module is interpreted by Avi Controller as NO_LABEL.
|
||||
fqdn:
|
||||
description:
|
||||
@@ -206,6 +230,7 @@ options:
|
||||
ipam_network_subnet:
|
||||
description:
|
||||
- Subnet and/or network for allocating virtualservice ip by ipam provider module.
|
||||
- Field deprecated in 17.1.1.
|
||||
limit_doser:
|
||||
description:
|
||||
- Limit potential dos attackers who exceed max_cps_per_client significantly to a fraction of max_cps_per_client for a while.
|
||||
@@ -298,6 +323,14 @@ options:
|
||||
snat_ip:
|
||||
description:
|
||||
- Nat'ted floating source ip address(es) for upstream connection to servers.
|
||||
sp_pool_refs:
|
||||
description:
|
||||
- Gslb pools used to manage site-persistence functionality.
|
||||
- Each site-persistence pool contains the virtualservices in all the other sites, that is auto-generated by the gslb manager.
|
||||
- This is a read-only field for the user.
|
||||
- It is a reference to an object of type pool.
|
||||
- Field introduced in 17.2.2.
|
||||
version_added: "2.5"
|
||||
ssl_key_and_certificate_refs:
|
||||
description:
|
||||
- Select or create one or two certificates, ec and/or rsa, that will be presented to ssl/tls terminated connections.
|
||||
@@ -345,6 +378,14 @@ options:
|
||||
description:
|
||||
- Use bridge ip as vip on each host in mesos deployments.
|
||||
- Default value when not specified in API or module is interpreted by Avi Controller as False.
|
||||
use_vip_as_snat:
|
||||
description:
|
||||
- Use the virtual ip as the snat ip for health monitoring and sending traffic to the backend servers instead of the service engine interface ip.
|
||||
- The caveat of enabling this option is that the virtualservice cannot be configued in an active-active ha mode.
|
||||
- Dns based multi vip solution has to be used for ha & non-disruptive upgrade purposes.
|
||||
- Field introduced in 17.1.9,17.2.3.
|
||||
- Default value when not specified in API or module is interpreted by Avi Controller as False.
|
||||
version_added: "2.5"
|
||||
uuid:
|
||||
description:
|
||||
- Uuid of the virtualservice.
|
||||
@@ -375,17 +416,23 @@ options:
|
||||
- It is a reference to an object of type vsvip.
|
||||
- Field introduced in 17.1.1.
|
||||
version_added: "2.4"
|
||||
waf_policy_ref:
|
||||
description:
|
||||
- Waf policy for the virtual service.
|
||||
- It is a reference to an object of type wafpolicy.
|
||||
- Field introduced in 17.2.1.
|
||||
version_added: "2.5"
|
||||
weight:
|
||||
description:
|
||||
- The quality of service weight to assign to traffic transmitted from this virtual service.
|
||||
- A higher weight will prioritize traffic versus other virtual services sharing the same service engines.
|
||||
- Allowed values are 1-128.
|
||||
- Default value when not specified in API or module is interpreted by Avi Controller as 1.
|
||||
extends_documentation_fragment:
|
||||
- avi
|
||||
'''
|
||||
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = """
|
||||
- name: Create SSL Virtual Service using Pool testpool2
|
||||
avi_virtualservice:
|
||||
controller: 10.10.27.90
|
||||
@@ -407,7 +454,8 @@ EXAMPLES = '''
|
||||
addr: 10.90.131.103
|
||||
type: V4
|
||||
pool_ref: '/api/pool?name=testpool2'
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
obj:
|
||||
description: VirtualService (api/virtualservice) object
|
||||
@@ -427,6 +475,9 @@ def main():
|
||||
argument_specs = dict(
|
||||
state=dict(default='present',
|
||||
choices=['absent', 'present']),
|
||||
avi_api_update_method=dict(default='put',
|
||||
choices=['put', 'patch']),
|
||||
avi_api_patch_op=dict(choices=['add', 'replace', 'delete']),
|
||||
active_standby_se_tag=dict(type='str',),
|
||||
analytics_policy=dict(type='dict',),
|
||||
analytics_profile_ref=dict(type='str',),
|
||||
@@ -437,6 +488,7 @@ def main():
|
||||
avi_allocated_fip=dict(type='bool',),
|
||||
avi_allocated_vip=dict(type='bool',),
|
||||
client_auth=dict(type='dict',),
|
||||
close_client_conn_on_config_update=dict(type='bool',),
|
||||
cloud_config_cksum=dict(type='str',),
|
||||
cloud_ref=dict(type='str',),
|
||||
cloud_type=dict(type='str',),
|
||||
@@ -455,6 +507,7 @@ def main():
|
||||
enable_rhi=dict(type='bool',),
|
||||
enable_rhi_snat=dict(type='bool',),
|
||||
enabled=dict(type='bool',),
|
||||
error_page_profile_ref=dict(type='str',),
|
||||
floating_ip=dict(type='dict',),
|
||||
floating_subnet_uuid=dict(type='str',),
|
||||
flow_dist=dict(type='str',),
|
||||
@@ -487,6 +540,7 @@ def main():
|
||||
services=dict(type='list',),
|
||||
sideband_profile=dict(type='dict',),
|
||||
snat_ip=dict(type='list',),
|
||||
sp_pool_refs=dict(type='list',),
|
||||
ssl_key_and_certificate_refs=dict(type='list',),
|
||||
ssl_profile_ref=dict(type='str',),
|
||||
ssl_sess_cache_avg_size=dict(type='int',),
|
||||
@@ -498,6 +552,7 @@ def main():
|
||||
type=dict(type='str',),
|
||||
url=dict(type='str',),
|
||||
use_bridge_ip_as_vip=dict(type='bool',),
|
||||
use_vip_as_snat=dict(type='bool',),
|
||||
uuid=dict(type='str',),
|
||||
vh_domain_name=dict(type='list',),
|
||||
vh_parent_vs_uuid=dict(type='str',),
|
||||
@@ -505,6 +560,7 @@ def main():
|
||||
vrf_context_ref=dict(type='str',),
|
||||
vs_datascripts=dict(type='list',),
|
||||
vsvip_ref=dict(type='str',),
|
||||
waf_policy_ref=dict(type='str',),
|
||||
weight=dict(type='int',),
|
||||
)
|
||||
argument_specs.update(avi_common_argument_spec())
|
||||
|
||||
Reference in New Issue
Block a user