Skip to content

Commit

Permalink
Merge pull request #19 from cisco-en-programmability/main
Browse files Browse the repository at this point in the history
Commit changes from mailine,
  • Loading branch information
madhansansel authored Oct 2, 2023
2 parents d0d41a4 + 4b77674 commit 08c38e3
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following table shows the supported versions.
| 2.2.2.3 | 3.3.1 | 2.3.3 |
| 2.2.3.3 | 6.4.0 | 2.4.11 |
| 2.3.3.0 | 6.6.4 | 2.5.5 |
| 2.3.5.3 | 6.7.4 | 2.6.0 |
| 2.3.5.3 | 6.7.5 | 2.6.0 |

If your Ansible collection is older please consider updating it first.

Expand Down
11 changes: 10 additions & 1 deletion changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -703,4 +703,13 @@ releases:
changes:
release_summary: Updated sanity test.
minor_changes:
- Updated test/sanity and remove unnecessary
- Updated test/sanity and remove unnecessary
6.7.5:
release_date: "2023-09-25"
changes:
release_summary: Updated different function names.
bugfixes:
- Updated from get_permissions_ap_i to get_permissions_api
- Updated from get_roles_ap_i to get_roles_api
- Updated from get_users_ap_i to get_users_api
- Updated from get_external_authentication_servers_ap_i to get_external_authentication_servers_api
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: cisco
name: dnac
version: 6.7.4
version: 6.7.5
readme: README.md
authors:
- Rafael Campos <rcampos@altus.cr>
Expand Down
18 changes: 18 additions & 0 deletions playbooks/user_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- hosts: dnac_servers
vars_files:
- credentials.yml
gather_facts: false
connection: local
tasks:
- name: Get all User
cisco.dnac.user_info:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
#headers: "{{my_headers | from_json}}"
invokeSource: string
register: result
4 changes: 2 additions & 2 deletions plugins/action/role_permissions_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def run(self, tmp=None, task_vars=None):
dnac = DNACSDK(params=self._task.args)

response = dnac.exec(
family="userand_roles",
function='get_permissions_ap_i',
family="user_and_roles",
function='get_permissions_api',
params=self.get_object(self._task.args),
)
self._result.update(dict(dnac_response=response))
Expand Down
4 changes: 2 additions & 2 deletions plugins/action/roles_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def run(self, tmp=None, task_vars=None):
dnac = DNACSDK(params=self._task.args)

response = dnac.exec(
family="userand_roles",
function='get_roles_ap_i',
family="user_and_roles",
function='get_roles_api',
params=self.get_object(self._task.args),
)
self._result.update(dict(dnac_response=response))
Expand Down
12 changes: 6 additions & 6 deletions plugins/action/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def get_object_by_name(self, name):
# NOTE: Does not have a get by name method, using get all
try:
items = self.dnac.exec(
family="userand_roles",
function="get_users_ap_i",
family="user_and_roles",
function="get_users_api",
params=self.get_all_params(name=name),
)
if isinstance(items, dict):
Expand Down Expand Up @@ -148,8 +148,8 @@ def requires_update(self, current_obj):

def create(self):
result = self.dnac.exec(
family="userand_roles",
function="add_user_ap_i",
family="user_and_roles",
function="add_user_api",
params=self.create_params(),
op_modifies=True,
)
Expand All @@ -160,8 +160,8 @@ def update(self):
name = self.new_object.get("name")
result = None
result = self.dnac.exec(
family="userand_roles",
function="update_user_ap_i",
family="user_and_roles",
function="update_user_api",
params=self.update_all_params(),
op_modifies=True,
)
Expand Down
4 changes: 2 additions & 2 deletions plugins/action/user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def run(self, tmp=None, task_vars=None):
dnac = DNACSDK(params=self._task.args)

response = dnac.exec(
family="userand_roles",
function='get_users_ap_i',
family="user_and_roles",
function='get_users_api',
params=self.get_object(self._task.args),
)
self._result.update(dict(dnac_response=response))
Expand Down
4 changes: 2 additions & 2 deletions plugins/action/users_external_servers_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def run(self, tmp=None, task_vars=None):
dnac = DNACSDK(params=self._task.args)

response = dnac.exec(
family="userand_roles",
function='get_external_authentication_servers_ap_i',
family="user_and_roles",
function='get_external_authentication_servers_api',
params=self.get_object(self._task.args),
)
self._result.update(dict(dnac_response=response))
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/role_permissions_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
link: https://developer.cisco.com/docs/dna-center/#!get-permissions-api
notes:
- SDK Method used are
userand_roles.UserandRoles.get_permissions_ap_i,
user_and_roles.UserandRoles.get_permissions_ap_i,
- Paths used are
get /dna/system/api/v1/role/permissions,
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/roles_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
link: https://developer.cisco.com/docs/dna-center/#!get-roles-api
notes:
- SDK Method used are
userand_roles.UserandRoles.get_roles_ap_i,
user_and_roles.UserandRoles.get_roles_ap_i,
- Paths used are
get /dna/system/api/v1/roles,
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
link: https://developer.cisco.com/docs/dna-center/#!update-user-api
notes:
- SDK Method used are
userand_roles.UserandRoles.add_user_ap_i,
userand_roles.UserandRoles.update_user_ap_i,
user_and_roles.UserandRoles.add_user_ap_i,
user_and_roles.UserandRoles.update_user_ap_i,
- Paths used are
post /dna/system/api/v1/user,
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
link: https://developer.cisco.com/docs/dna-center/#!get-users-api
notes:
- SDK Method used are
userand_roles.UserandRoles.get_users_ap_i,
user_and_roles.UserandRoles.get_users_api,
- Paths used are
get /dna/system/api/v1/user,
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/users_external_servers_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
link: https://developer.cisco.com/docs/dna-center/#!get-external-authentication-servers-api
notes:
- SDK Method used are
userand_roles.UserandRoles.get_external_authentication_servers_ap_i,
user_and_roles.UserandRoles.get_external_authentication_servers_ap_i,
- Paths used are
get /dna/system/api/v1/users/external-servers,
Expand Down

0 comments on commit 08c38e3

Please sign in to comment.