Skip to content

Commit

Permalink
Merge pull request #165 from cisco-en-programmability/develop
Browse files Browse the repository at this point in the history
- Update User-Agent header in RestSession
  • Loading branch information
bvargasre authored Aug 9, 2024
2 parents 8ef25be + cb7045f commit a4be1b2
Show file tree
Hide file tree
Showing 13 changed files with 424 additions and 373 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.7.2] - 2024-08-09
- Update User-Agent header in RestSession
- Update requirements:
+ python = "^3.8"
+ requests = "^2.32.0"
+ readthedocs-sphinx-search = "^0.3.2"
### Fixed
- Fix function names in 2.3.7.6 `user_and_roles`
+ From add_role_ap_i to add_role_api
+ From get_a_a_a_attribute_ap_i to get_aaa_attribute_api
+ From get_permissions_ap_i to get_permissions_api
+ From delete_role_ap_i to delete_role_api
+ From get_roles_ap_i to get_roles_api
+ From get_users_ap_i to get_users_api
+ From add_user_ap_i to add_user_api
+ From update_user_ap_i to update_user_api
+ From delete_user_ap_i to delete_user_api
+ From get_external_authentication_setting_ap_i to get_external_authentication_setting_api
+ From manage_external_authentication_setting_ap_i to manage_external_authentication_setting_api
+ From get_external_authentication_servers_ap_i to get_external_authentication_servers_api
+ From add_and_update_a_a_a_attribute_ap_i to add_and_update_aaa_attribute_api
+ From delete_a_a_a_attribute_ap_i to delete_aaa_attribute_api
+ From get_a_a_a_attribute_ap_i to get_aaa_attribute_api


## [2.7.1] - 2024-05-31
### Fixed
Expand Down Expand Up @@ -493,4 +514,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[2.6.11]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.6.10...v2.6.11
[2.7.0]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.6.11...v2.7.0
[2.7.1]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.7.0...v2.7.1
[Unreleased]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.7.1...develop
[2.7.2]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.7.1...v2.7.2
[Unreleased]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.7.2...develop
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ The following table shows the supported versions.
* - 2.3.5.3
- 2.6.11
* - 2.3.7.6
- 2.7.1
- 2.7.2



Expand Down
30 changes: 15 additions & 15 deletions dnacentersdk/api/v2_3_7_6/user_and_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, session, object_factory, request_validator):
self._object_factory = object_factory
self._request_validator = request_validator

def add_role_ap_i(self,
def add_role_api(self,
description=None,
resourceTypes=None,
role=None,
Expand Down Expand Up @@ -145,7 +145,7 @@ def add_role_ap_i(self,

return self._object_factory('bpm_a88c7510a15578b8eb2df183a92d5d_v2_3_7_6', json_data)

def update_role_ap_i(self,
def update_role_api(self,
description=None,
resourceTypes=None,
roleId=None,
Expand Down Expand Up @@ -223,7 +223,7 @@ def update_role_ap_i(self,

return self._object_factory('bpm_ff5bf5a67c6c5c0aa9e7ba84c088e1a6_v2_3_7_6', json_data)

def get_permissions_ap_i(self,
def get_permissions_api(self,
headers=None,
**request_parameters):
"""Get permissions for a role from Cisco DNA Center System. .
Expand Down Expand Up @@ -273,7 +273,7 @@ def get_permissions_ap_i(self,

return self._object_factory('bpm_ec0b30eca9d540a845848cffd7c602a_v2_3_7_6', json_data)

def delete_role_ap_i(self,
def delete_role_api(self,
role_id,
headers=None,
**request_parameters):
Expand Down Expand Up @@ -328,7 +328,7 @@ def delete_role_ap_i(self,

return self._object_factory('bpm_da9e850c44d353f78ab002a640e5604f_v2_3_7_6', json_data)

def get_roles_ap_i(self,
def get_roles_api(self,
headers=None,
**request_parameters):
"""Get all roles for the Cisco DNA Center System. .
Expand Down Expand Up @@ -381,7 +381,7 @@ def get_roles_ap_i(self,

return self._object_factory('bpm_bef02e8f6f8354dc99e375826a87c88c_v2_3_7_6', json_data)

def get_users_ap_i(self,
def get_users_api(self,
invoke_source,
auth_source=None,
headers=None,
Expand Down Expand Up @@ -445,7 +445,7 @@ def get_users_ap_i(self,

return self._object_factory('bpm_fa405b6d1be56739f2dfeea63212015_v2_3_7_6', json_data)

def add_user_ap_i(self,
def add_user_api(self,
email=None,
firstName=None,
lastName=None,
Expand Down Expand Up @@ -535,7 +535,7 @@ def add_user_ap_i(self,

return self._object_factory('bpm_d82755e5e03510daf0951c1f42c2702_v2_3_7_6', json_data)

def update_user_ap_i(self,
def update_user_api(self,
email=None,
firstName=None,
lastName=None,
Expand Down Expand Up @@ -625,7 +625,7 @@ def update_user_ap_i(self,

return self._object_factory('bpm_d2bd5f05bd535a89ebadb30e2ede9e_v2_3_7_6', json_data)

def delete_user_ap_i(self,
def delete_user_api(self,
user_id,
headers=None,
**request_parameters):
Expand Down Expand Up @@ -680,7 +680,7 @@ def delete_user_ap_i(self,

return self._object_factory('bpm_c65c6cc65f068766cbb8a42ad387_v2_3_7_6', json_data)

def get_external_authentication_setting_ap_i(self,
def get_external_authentication_setting_api(self,
headers=None,
**request_parameters):
"""Get the External Authentication setting. .
Expand Down Expand Up @@ -730,7 +730,7 @@ def get_external_authentication_setting_ap_i(self,

return self._object_factory('bpm_ac03ba045f60925fd7843bf9e279_v2_3_7_6', json_data)

def manage_external_authentication_setting_ap_i(self,
def manage_external_authentication_setting_api(self,
enable=None,
headers=None,
payload=None,
Expand Down Expand Up @@ -803,7 +803,7 @@ def manage_external_authentication_setting_ap_i(self,

return self._object_factory('bpm_e4f57e8f06856ee9a7e490d01f7f692_v2_3_7_6', json_data)

def get_external_authentication_servers_ap_i(self,
def get_external_authentication_servers_api(self,
invoke_source,
headers=None,
**request_parameters):
Expand Down Expand Up @@ -860,7 +860,7 @@ def get_external_authentication_servers_ap_i(self,

return self._object_factory('bpm_def9045d4d9c96bcd42172a79c_v2_3_7_6', json_data)

def add_and_update_a_a_a_attribute_ap_i(self,
def add_and_update_aaa_attribute_api(self,
attributeName=None,
headers=None,
payload=None,
Expand Down Expand Up @@ -936,7 +936,7 @@ def add_and_update_a_a_a_attribute_ap_i(self,

return self._object_factory('bpm_f5bfccc7e30550baa7046f74daa1ef2_v2_3_7_6', json_data)

def delete_a_a_a_attribute_ap_i(self,
def delete_aaa_attribute_api(self,
headers=None,
**request_parameters):
"""Delete the custom AAA attribute that was added. Note that by deleting the AAA attribute, a default AAA attribute
Expand Down Expand Up @@ -988,7 +988,7 @@ def delete_a_a_a_attribute_ap_i(self,

return self._object_factory('bpm_f20c99b436bd5be8bdb9094db3a47f01_v2_3_7_6', json_data)

def get_a_a_a_attribute_ap_i(self,
def get_aaa_attribute_api(self,
headers=None,
**request_parameters):
"""Get the current value of the custom AAA attribute. .
Expand Down
3 changes: 2 additions & 1 deletion dnacentersdk/restsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ def __init__(self, get_access_token, access_token, base_url,

# Update the headers of the `requests` session
self.update_headers({'X-Auth-Token': access_token,
'Content-type': 'application/json;charset=utf-8'})
'Content-type': 'application/json;charset=utf-8',
'User-Agent': f'python-cisco-dnacsdk/{version}'})

@property
def version(self):
Expand Down
Loading

0 comments on commit a4be1b2

Please sign in to comment.