Skip to content

Commit 8b6ef37

Browse files
Merge pull request #231 from vmware/jenkins_sync_31.1.2_ansible_collection
Auto updated assets for ansible collection 31.1.2
2 parents 50bc53d + 4a985d7 commit 8b6ef37

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+700
-93
lines changed

CHANGELOG.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11

2+
===========================
3+
vmware.alb Release Notes
4+
===========================
5+
6+
7+
v31.1.2
8+
======
9+
10+
- AV-128581 - Added the installation of bs4 as a requirement to fix failure of auto… by @chandanapatnala in #160
11+
- Auto updated assets for ansible collection eng by @sagarpsalvi in [#178](https://github.com/vmware/ansible-collection-alb/pull/178)
12+
- Auto updated assets for ansible collection eng by @sagarpsalvi in [#195](https://github.com/vmware/ansible-collection-alb/pull/195)
13+
- AV-232916 Fixes ansible module doc by @Rohan-sss1 in [#222](https://github.com/vmware/ansible-collection-alb/pull/222)

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!--start requires_ansible-->
88
## Ansible version compatibility
99

10-
This collection has been tested against following Ansible versions: **>=2.9.10**.
10+
This collection has been tested against following Ansible versions: **>=2.15.0**.
1111

1212
<!--end requires_ansible-->
1313

@@ -17,11 +17,6 @@ This collection has been tested against following Ansible versions: **>=2.9.10**
1717

1818
## Installation and Usage
1919

20-
Ansible must be installed
21-
```
22-
pip install ansible
23-
```
24-
2520
Install ALB collection using `ansible-galaxy` CLI:
2621
```
2722
ansible-galaxy collection install vmware.alb
@@ -285,5 +280,21 @@ avi_config:
285280
# please use vars_files parameter as shown in previous example
286281
```
287282

283+
## Support
284+
285+
As Red Hat Ansible Certified Content, this collection is entitled to support through the Ansible Automation Platform (AAP) using the Create issue button on the top right corner.
286+
If a support case cannot be opened with Red Hat and the collection has been obtained either from Galaxy or GitHub, there may community help available on the [Ansible Forum](https://forum.ansible.com/).
287+
288+
## Release Notes
289+
290+
For release notes, see [CHANGELOG.rst](https://github.com/vmware/ansible-collection-alb/blob//CHANGELOG.rst).
291+
292+
## Licensing
293+
294+
GNU General Public License v2.0 or later.
295+
296+
See [LICENSE](https://github.com/vmware/ansible-collection-alb/blob/31.1.2/LICENSE) to see the full text.
297+
298+
288299
**Notes**
289300
Please use Python >= 3.8 if you are using avi_serviceenginegroup module as it has more than 255 arguments

meta/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
requires_ansible: '>=2.9.10'
2+
requires_ansible: '>=2.15.0'

plugins/lookup/avi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
__metaclass__ = type
77

88
DOCUMENTATION = '''
9-
lookup: avi
10-
author: Sandeep Bandi <[email protected]>
9+
name: avi
10+
author:
11+
- Sandeep Bandi (@sabandi)
1112
short_description: Look up ``Avi`` objects.
1213
description:
1314
- Given an object_type, fetch all the objects of that type or fetch

plugins/module_utils/avi_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from urllib.parse import urlparse
1818

1919
from datetime import datetime, timedelta
20+
import requests
2021
from requests import ConnectionError
2122
from requests import Response
2223
from requests.exceptions import ChunkedEncodingError
@@ -647,6 +648,10 @@ def _api(self, api_name, path, tenant, tenant_uuid, data=None,
647648
err = None
648649
api_hdrs = self._get_api_headers(tenant, tenant_uuid, timeout, headers,
649650
api_version)
651+
certificate = self.avi_credentials.ssl_cert
652+
key = self.avi_credentials.ssl_key
653+
if certificate and key:
654+
kwargs['cert'] = (certificate, key)
650655
if 'X-CSRFToken' in api_hdrs:
651656
cookies = {
652657
'csrftoken': api_hdrs['X-CSRFToken'],

plugins/modules/avi_csrfpolicy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
- Even after that, tokens will be accepted until twice this amount of time has passed.
104104
- Note, however, that other timeouts from the underlying session layer also affect how long a given token can be used.
105105
- A token will be invalidated (rotated or deleted) after one of 'token_validity_time_min' (this value), 'session_establishment_timeout',
106-
- session_idle_timeout, session_maximum_timeout is reached, whichever occurs first.
106+
'session_idle_timeout', 'session_maximum_timeout' is reached, whichever occurs first.
107107
- Allowed values are 10-1440.
108108
- Special values are 0- unlimited.
109109
- Field introduced in 30.2.1.

plugins/modules/avi_deploy_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
DOCUMENTATION = '''
88
---
99
module: avi_deploy_controller
10-
author: chaitanyaavi (@chaitanyaavi) <chaitanya.deshpande@avinetworks.com>
10+
author: Rohan-sss1 (@Rohan-sss1) <rohan.suryavanshi@broadcom.com>
1111
1212
short_description: Module is to deploy vm on vcenter
1313
description:

plugins/modules/avi_pingaccessagent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
- Allowed in enterprise edition with any value, essentials edition with any value, basic edition with any value, enterprise with cloud services
6767
- edition.
6868
type: list
69-
elements: str
7069
name:
7170
description:
7271
- Name of the pingaccess agent.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
#!/usr/bin/python
2+
# module_check: supported
3+
4+
# Copyright 2021 VMware, Inc. All rights reserved. VMware Confidential
5+
# SPDX-License-Identifier: Apache License 2.0
6+
7+
from __future__ import (absolute_import, division, print_function)
8+
__metaclass__ = type
9+
10+
ANSIBLE_METADATA = {'metadata_version': '1.1',
11+
'status': ['preview'],
12+
'supported_by': 'community'}
13+
14+
DOCUMENTATION = '''
15+
---
16+
module: avi_upgradeprofile
17+
author: Gaurav Rastogi (@grastogi23) <[email protected]>
18+
short_description: Module for setup of UpgradeProfile Avi RESTful Object
19+
description:
20+
- This module is used to configure UpgradeProfile object
21+
- more examples at U(https://github.com/avinetworks/devops)
22+
options:
23+
state:
24+
description:
25+
- The state that should be applied on the entity.
26+
default: present
27+
choices: ["absent", "present"]
28+
type: str
29+
avi_api_update_method:
30+
description:
31+
- Default method for object update is HTTP PUT.
32+
- Setting to patch will override that behavior to use HTTP PATCH.
33+
default: put
34+
choices: ["put", "patch"]
35+
type: str
36+
avi_api_patch_op:
37+
description:
38+
- Patch operation to use when using avi_api_update_method as patch.
39+
choices: ["add", "replace", "delete", "remove"]
40+
type: str
41+
avi_patch_path:
42+
description:
43+
- Patch path to use when using avi_api_update_method as patch.
44+
type: str
45+
avi_patch_value:
46+
description:
47+
- Patch value to use when using avi_api_update_method as patch.
48+
type: str
49+
controller:
50+
description:
51+
- List of controller upgrade related configurable parameters.
52+
- Field introduced in 31.1.1.
53+
- Allowed with any value in enterprise, enterprise with cloud services edition.
54+
type: dict
55+
dry_run:
56+
description:
57+
- List of dryrun related configurable parameters.
58+
- Field introduced in 31.1.1.
59+
- Allowed with any value in enterprise, enterprise with cloud services edition.
60+
type: dict
61+
image:
62+
description:
63+
- List of image related configurable parameters.
64+
- Field introduced in 31.1.1.
65+
- Allowed with any value in enterprise, enterprise with cloud services edition.
66+
type: dict
67+
pre_checks:
68+
description:
69+
- List of upgrade pre-checks related configurable parameters.
70+
- Field introduced in 31.1.1.
71+
- Allowed with any value in enterprise, enterprise with cloud services edition.
72+
type: dict
73+
service_engine:
74+
description:
75+
- List of service engine upgrade related configurable parameters.
76+
- Field introduced in 31.1.1.
77+
- Allowed with any value in enterprise, enterprise with cloud services edition.
78+
type: dict
79+
url:
80+
description:
81+
- Avi controller URL of the object.
82+
type: str
83+
uuid:
84+
description:
85+
- Uuid identifier for the upgradeprofile object.
86+
- Field introduced in 31.1.1.
87+
- Allowed with any value in enterprise, enterprise with cloud services edition.
88+
type: str
89+
extends_documentation_fragment:
90+
- vmware.alb.avi
91+
'''
92+
93+
EXAMPLES = """
94+
- hosts: all
95+
vars:
96+
avi_credentials:
97+
username: "admin"
98+
password: "something"
99+
controller: "192.168.15.18"
100+
api_version: "21.1.1"
101+
102+
- name: Example to create UpgradeProfile object
103+
vmware.alb.avi_upgradeprofile:
104+
avi_credentials: "{{ avi_credentials }}"
105+
state: present
106+
name: sample_upgradeprofile
107+
"""
108+
109+
RETURN = '''
110+
obj:
111+
description: UpgradeProfile (api/upgradeprofile) object
112+
returned: success, changed
113+
type: dict
114+
'''
115+
116+
from ansible.module_utils.basic import AnsibleModule
117+
try:
118+
from ansible_collections.vmware.alb.plugins.module_utils.utils.ansible_utils import (
119+
avi_common_argument_spec, avi_ansible_api)
120+
HAS_REQUESTS = True
121+
except ImportError:
122+
HAS_REQUESTS = False
123+
124+
125+
def main():
126+
argument_specs = dict(
127+
state=dict(default='present',
128+
choices=['absent', 'present']),
129+
avi_api_update_method=dict(default='put',
130+
choices=['put', 'patch']),
131+
avi_api_patch_op=dict(choices=['add', 'replace', 'delete', 'remove']),
132+
avi_patch_path=dict(type='str',),
133+
avi_patch_value=dict(type='str',),
134+
controller=dict(type='dict',),
135+
dry_run=dict(type='dict',),
136+
image=dict(type='dict',),
137+
pre_checks=dict(type='dict',),
138+
service_engine=dict(type='dict',),
139+
url=dict(type='str',),
140+
uuid=dict(type='str',),
141+
)
142+
argument_specs.update(avi_common_argument_spec())
143+
module = AnsibleModule(
144+
argument_spec=argument_specs, supports_check_mode=True)
145+
if not HAS_REQUESTS:
146+
return module.fail_json(msg=(
147+
'Python requests package is not installed. '
148+
'For installation instructions, visit https://pypi.org/project/requests.'))
149+
return avi_ansible_api(module, 'upgradeprofile',
150+
set())
151+
152+
153+
if __name__ == '__main__':
154+
main()

plugins/modules/deploy_se.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def main():
479479
se_vmw_mgmt_mask=dict(required=False, type='str'),
480480
se_vmw_default_gw=dict(required=False, type='str'),
481481
se_vmw_sysadmin_public_key=dict(required=False, type='str'),
482-
se_auth_token=dict(required=True, type='str'),
482+
se_auth_token=dict(required=True, type='str', no_log=True),
483483
se_cluster_uuid=dict(required=True, type='str'),
484484
se_leader_ctl_ip=dict(required=True, type='str'),
485485
se_vmw_number_of_cpus=dict(required=False, type='int'),

0 commit comments

Comments
 (0)