Skip to content

Commit a63ae5b

Browse files
committed
Release 1.1.3
1 parent 5c57a47 commit a63ae5b

File tree

2 files changed

+53
-20
lines changed

2 files changed

+53
-20
lines changed

docs/changelog.rst

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,25 @@ A log of changes by version and date.
77
:header: "Version", "Date", "Notes"
88
:widths: 10, 10, 60
99

10-
"0.0.1", "10/03/2020", "Initial Version"
11-
"0.0.2", "10/08/2020", "Added ntp & dns get/add/delete/set to ntnx_api.cluster"
12-
"0.0.3", "10/09/2020", "Added proxy get/add/delete/set to ntnx_api.cluster. Added ui_color, ui_text, ui_banner, ui_2048_game, ui_animation get/set to ntnx_api.prism"
13-
"0.0.4", "10/09/2020", "Added pulse get/set/update to ntnx_api.prism"
14-
"0.0.5", "10/12/2020", "Added smtp get/set/update/delete to ntnx_api.prism"
15-
"0.0.6", "10/12/2020", "Added auth_type get. Added auth_directory get/add/update/set to ntnx_api.prism. Moved multiple occurances of a dict lookup to a static function for improved code usability."
16-
"0.0.7", "10/12/2020", "Updated documentation for API glossary to provide headings for each class to improve navigation"
17-
"0.0.8", "10/12/2020", "Updated author email address & added README.rst"
18-
"0.0.9", "10/12/2020", "Updated docstring for auth_directory to include default values"
19-
"0.0.10", "10/13/2020", "Included changelog.rst in README.rst. Updated tox.ini to improve test troubleshooting. Improved error messaging to client.NutanixRestHTTPError. Resolved issue for Cluster.get_all_uuids() for connections to Prism Central where the UUIDs were being returned as None. Updated Prism.set_smtp docstring. Renamed Prism.*_auth_directory to Prism.*_auth_dir."
20-
"0.0.11", "10/13/2020", "Resolved issue in README.rst causing publication to pypi to fail."
21-
"0.0.12", "10/13/2020", "Added initial unit tests & gitlab runner in homelab for testing."
22-
"0.0.13", "10/14/2020", "Added directory authentication, directory role & local user add/update/delete/set to ntnx_api.prism. Added OS tags to gitlab ci to ensure tasks use correct runners. Resolved issue calling incorrect API for ntnx_api.prism.*_smtp"
23-
"0.0.14", "10/15/2020", "Set correct method for ntnx_api.prism.add_local_user and ntnx_api.prism.update_local_user"
24-
"0.0.15", "10/15/2020", "Commented out windows gitlab build step as its note required currently."
25-
"0.0.16", "10/15/2020", "Added alert configuration to ntnx_api.prism"
26-
"0.0.17", "10/15/2020", "Added SAST to gitlab-ci.yml. Added tests for all added functions."
27-
"1.0.0", "10/19/2020", "Release 1.0.0."
28-
"1.0.1", "10/20/2020", "For all set_* functions in ntnx_api.prism updated the return value to indicate whether a record has been added or updated."
29-
"1.1.1", "3/19/2021", "Added new PrismApi class to client.py to replace existing ApiClient class. Added console logged for enhanced troubleshooting. Added Image upload from URL & file. Added task monitoring to support image upload completion tracking."
10+
"1.1.3", "3/19/2021", "Re-ordered changelog to improve readability. Added Config.accept_elua
3011
"1.1.2", "3/19/2021", "Fix to ensure that class variables holding data are cleaned up prior to be refreshed."
12+
"1.1.1", "3/19/2021", "Added new PrismApi class to client.py to replace existing ApiClient class. Added console logged for enhanced troubleshooting. Added Image upload from URL & file. Added task monitoring to support image upload completion tracking."
13+
"1.0.1", "10/20/2020", "For all set_* functions in ntnx_api.prism updated the return value to indicate whether a record has been added or updated."
14+
"1.0.0", "10/19/2020", "Release 1.0.0."
15+
"0.0.17", "10/15/2020", "Added SAST to gitlab-ci.yml. Added tests for all added functions."
16+
"0.0.16", "10/15/2020", "Added alert configuration to ntnx_api.prism"
17+
"0.0.15", "10/15/2020", "Commented out windows gitlab build step as its note required currently."
18+
"0.0.14", "10/15/2020", "Set correct method for ntnx_api.prism.add_local_user and ntnx_api.prism.update_local_user"
19+
"0.0.13", "10/14/2020", "Added directory authentication, directory role & local user add/update/delete/set to ntnx_api.prism. Added OS tags to gitlab ci to ensure tasks use correct runners. Resolved issue calling incorrect API for ntnx_api.prism.*_smtp"
20+
"0.0.12", "10/13/2020", "Added initial unit tests & gitlab runner in homelab for testing."
21+
"0.0.11", "10/13/2020", "Resolved issue in README.rst causing publication to pypi to fail."
22+
"0.0.10", "10/13/2020", "Included changelog.rst in README.rst. Updated tox.ini to improve test troubleshooting. Improved error messaging to client.NutanixRestHTTPError. Resolved issue for Cluster.get_all_uuids() for connections to Prism Central where the UUIDs were being returned as None. Updated Prism.set_smtp docstring. Renamed Prism.*_auth_directory to Prism.*_auth_dir."
23+
"0.0.9", "10/12/2020", "Updated docstring for auth_directory to include default values"
24+
"0.0.8", "10/12/2020", "Updated author email address & added README.rst"
25+
"0.0.7", "10/12/2020", "Updated documentation for API glossary to provide headings for each class to improve navigation"
26+
"0.0.6", "10/12/2020", "Added auth_type get. Added auth_directory get/add/update/set to ntnx_api.prism. Moved multiple occurances of a dict lookup to a static function for improved code usability."
27+
"0.0.5", "10/12/2020", "Added smtp get/set/update/delete to ntnx_api.prism"
28+
"0.0.4", "10/09/2020", "Added pulse get/set/update to ntnx_api.prism"
29+
"0.0.3", "10/09/2020", "Added proxy get/add/delete/set to ntnx_api.cluster. Added ui_color, ui_text, ui_banner, ui_2048_game, ui_animation get/set to ntnx_api.prism"
30+
"0.0.2", "10/08/2020", "Added ntp & dns get/add/delete/set to ntnx_api.cluster"
31+
"0.0.1", "10/03/2020", "Initial Version"

ntnx_api/prism.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import time
5151
from random import random
5252
import threading
53+
import paramiko
5354

5455
__metaclass__ = type
5556

@@ -2154,6 +2155,37 @@ def set_proxy(self, address, port, clusteruuid=None, name='proxy', username='',
21542155

21552156
return result
21562157

2158+
def accept_elua(self, name, title, company, clusteruuid=None):
2159+
"""Accept the Nutanix ELUA
2160+
2161+
:param name: Your name
2162+
:type name: str
2163+
:param title: Your job title
2164+
:type title: str
2165+
:param company: Name of your company
2166+
:type company: str
2167+
:param clusteruuid: A cluster UUID to define the specific cluster to query. Only required to be used when the :class:`ntnx.client.ApiClient`
2168+
`connection_type` is set to `pc`.
2169+
:type clusteruuid: str, optional
2170+
"""
2171+
logger = logging.getLogger('ntnx_api.prism.Config._get_group_search_type')
2172+
params = {}
2173+
if clusteruuid:
2174+
params['proxyClusterUuid'] = clusteruuid
2175+
2176+
uri = '/eulas/accept'
2177+
method = 'POST'
2178+
payload = {
2179+
"username": name,
2180+
"companyName": company,
2181+
"jobTitle": title
2182+
}
2183+
2184+
if clusteruuid:
2185+
params['proxyClusterUuid'] = clusteruuid
2186+
2187+
self.api_client.request(uri=uri, api_version='v1', payload=payload, params=params, method=method)
2188+
21572189

21582190
class Cluster(object):
21592191
"""A class to represent a Nutanix Cluster

0 commit comments

Comments
 (0)