Skip to content

Commit

Permalink
Merge pull request #75 from cisco-en-programmability/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bvargasre authored Nov 17, 2022
2 parents 495bffc + f1da9e1 commit 6504c82
Show file tree
Hide file tree
Showing 7 changed files with 281 additions and 118 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.5.5] - 2022-11-17

### Fixed
- Removed enum in `dnacentersdk.api.v2_3_3_0.sda.add_default_authentication_profile`:
+ authenticateTemplateName
- Added Dict_of_str function call in custom_caller headers

## [2.5.4] - 2022-08-11

### Added
Expand Down Expand Up @@ -352,4 +359,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[2.5.2]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.5.1...v2.5.2
[2.5.3]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.5.2...v2.5.3
[2.5.4]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.5.3...v2.5.4
[Unreleased]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.5.4...master
[2.5.5]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.5.4...v2.5.5
[Unreleased]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.5.5...master
28 changes: 27 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,34 @@ dnacentersdk
print(dnac.custom_caller.get_global_credentials('NETCONF'))
Introduction_
Introduction
------------
Check out the complete Introduction_

**dnacentersdk handles all of this for you:**

+ Reads your DNA Center credentials from environment variables.

+ Reads your DNA Center API version from environment variable DNA_CENTER_VERSION.

+ Controls whether to verify the server's TLS certificate or not according to the verify parameter.

+ Reads your DNA Center debug from environment variable DNA_CENTER_DEBUG. Boolean.

+ Wraps and represents all DNA Center API calls as a simple hierarchical tree of
native-Python methods

+ If your Python IDE supports **auto-completion** (like PyCharm_), you can
navigate the available methods and object attributes right within your IDE

+ Represents all returned JSON objects as native Python objects - you can
access all of the object's attributes using native *dot.syntax*

+ **Automatic Rate-Limit Handling** Sending a lot of requests to DNA Center?
Don't worry; we have you covered. DNA Center will respond with a rate-limit
response, which will automatically be caught and "handled" for you.

+ **Refresh token** Each time the token becomes invalid, the SDK will generate a new valid token for you.

Installation
------------
Expand Down
3 changes: 2 additions & 1 deletion dnacentersdk/api/custom_caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
extract_and_parse_json,
pprint_request_info,
pprint_response_info,
dict_of_str,
)

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -146,7 +147,7 @@ def call_api(self, method, resource_path, raise_exception=True,
headers = self._session.headers

if 'headers' in kwargs:
headers.update(kwargs.pop('headers'))
headers.update(dict_of_str(kwargs.pop('headers')))

verify = kwargs.pop("verify", self._session.verify)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ def __init__(self):
"items": {
"properties": {
"authenticateTemplateName": {
"enum": [
"No Authentication ",
"Open Authentication",
"Closed Authentication",
"Low Impact"
],
"type": "string"
},
"siteNameHierarchy": {
Expand Down
Loading

0 comments on commit 6504c82

Please sign in to comment.