Skip to content

Commit

Permalink
Add authentication_management module and get_templates_details function
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePabloOcampo1212 committed Nov 20, 2024
1 parent c6a354a commit d2b2b2b
Show file tree
Hide file tree
Showing 42 changed files with 3,147 additions and 2,240 deletions.
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
+ readthedocs-sphinx-search = "^0.3.2"


## [1.0.0] - 2024-10-30
## [2.3.7.6.0] - 2024-10-30
### Added
- Add support of Catalyst Center versions ('2.3.7.6')
- Adds modules for v2_3_7_6
- Adds modules for v2_3_7_6_1

## [1.0.1] - 2024-11-05
## [2.3.7.6.1] - 2024-11-05
### Added
- Documentation for alias functions has been added.
### Modifications
- Documentation has been corrected.
- Modification of documentation references in functions.
- The user_agent structure is modified.
- The user_agent structure is modified.

## [2.3.7.6.2] - 2024-11-20
### Added
- Add authentication_management module.
### Bug fix
- The get_templates_details function was added because it was named incorrectly.There was an "s" missing from the word templates.
20 changes: 10 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=============
==================
catalystcentersdk
=============
==================

*Work with the CatalystCenter APIs in native Python!*

Expand Down Expand Up @@ -35,7 +35,7 @@ catalystcentersdk
# Delete all of the demo tags
for tag in demo_tags:
catalyst.tag.delete_tag(tag.id)
# Create a new demo tag
demo_tag = catalyst.tag.create_tag(name='catalyst Demo')
task_demo_tag = catalyst.task.get_task_by_id(task_id=demo_tag.response.taskId)
Expand All @@ -45,17 +45,17 @@ catalystcentersdk
created_tag = catalyst.tag.get_tag(name='catalyst Demo')
# Update tag
update_tag = catalyst.tag.update_tag(id=created_tag.response[0].id,
update_tag = catalyst.tag.update_tag(id=created_tag.response[0].id,
name='Updated ' + created_tag.response[0].name,
description='DNA demo tag')
description='Catalyst demo tag')
print(catalyst.task.get_task_by_id(task_id=update_tag.response.taskId).response.progress)
# Retrieved updated
updated_tag = catalyst.tag.get_tag(name='Updated catalyst Demo')
print(updated_tag)
else:
# Get task error details
# Get task error details
print('Unfortunately ', task_demo_tag.response.progress)
print('Reason: ', task_demo_tag.response.failureReason)
Expand Down Expand Up @@ -150,9 +150,9 @@ The following table shows the supported versions.
* - Cisco CatalystCenter version
- Python "catalystcentersdk" version
* - 2.3.7.6
- 2.3.7.6.X
- 2.3.7.6.x




If your SDK is older please consider updating it first.

Expand Down
12 changes: 10 additions & 2 deletions catalystcentersdk/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
from .authentication import Authentication
from .v2_3_7_6_1.ai_endpoint_analytics import \
AIEndpointAnalytics as AIEndpointAnalytics_v2_3_7_6_1
from .v2_3_7_6_1.authentication_management import \
AuthenticationManagement as AuthenticationManagement_v2_3_7_6_1
from .v2_3_7_6_1.application_policy import \
ApplicationPolicy as ApplicationPolicy_v2_3_7_6_1
from .v2_3_7_6_1.applications import \
Expand Down Expand Up @@ -143,6 +145,7 @@ def __init__(self, username=None,
base_url=None,
single_request_timeout=None,
wait_on_rate_limit=None,
session=None,
verify=None,
version=None,
debug=None,
Expand Down Expand Up @@ -227,7 +230,7 @@ def __init__(self, username=None,
password = password or catalystcenter_environment.get_env_password()
encoded_auth = encoded_auth or catalystcenter_environment.get_env_encoded_auth()
base_url = base_url or catalystcenter_environment.get_env_base_url() or DEFAULT_BASE_URL
user_agent = catalystcenter_environment.get_env_user_agent()
user_agent = user_agent or catalystcenter_environment.get_env_user_agent()

if single_request_timeout is None:
single_request_timeout = catalystcenter_environment.get_env_single_request_timeout() or DEFAULT_SINGLE_REQUEST_TIMEOUT
Expand All @@ -242,7 +245,7 @@ def __init__(self, username=None,

if debug is None:
debug = catalystcenter_environment.get_env_debug() or DEFAULT_DEBUG

if user_agent is None:
user_agent = catalystcenter_environment.get_env_user_agent() or DEFAULT_VERIFY_USER_AGENT

Expand Down Expand Up @@ -303,6 +306,7 @@ def get_access_token():
base_url=base_url,
single_request_timeout=single_request_timeout,
wait_on_rate_limit=wait_on_rate_limit,
session= session,
verify=verify,
version=version,
debug=debug,
Expand All @@ -318,6 +322,10 @@ def get_access_token():
AIEndpointAnalytics_v2_3_7_6_1(
self._session, object_factory, _validator
)
self.authentication_management = \
AuthenticationManagement_v2_3_7_6_1(
self._session, object_factory, _validator
)
self.application_policy = \
ApplicationPolicy_v2_3_7_6_1(
self._session, object_factory, _validator
Expand Down
Loading

0 comments on commit d2b2b2b

Please sign in to comment.