Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3384b61
Accesspoint Location workflow - Initial Changes
md-rafeek Aug 21, 2025
ead3dae
Merge branch 'main' of https://github.com/cisco-en-programmability/ca…
md-rafeek Sep 1, 2025
9d02a57
Accesspoint Location workflow - Initial Changes
md-rafeek Sep 2, 2025
0e78cd3
Access point location workflow: Coverd 7 scenario
md-rafeek Sep 9, 2025
7e853cf
Accesspoint location Workflow - Added sanity
md-rafeek Sep 11, 2025
67796ac
Merge conflict on Network_profile file
md-rafeek Sep 16, 2025
445c8c8
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 16, 2025
ab06f22
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 16, 2025
538c536
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 16, 2025
e68c363
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 16, 2025
ba51b54
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 16, 2025
7795f62
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 16, 2025
e55ee38
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 16, 2025
f3d759f
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 16, 2025
a81a27c
Accespoint Location Workflow - Sanity fix
md-rafeek Sep 17, 2025
f971d91
Access Point Location Workflow - UT Added
md-rafeek Sep 17, 2025
93a35ce
Access Point Location Workflow - UT Added
md-rafeek Sep 17, 2025
e8d52a5
Access Point Location Workflow - UT Added
md-rafeek Sep 17, 2025
a441f22
Accespoint Location Workflow - IT cased added
md-rafeek Sep 17, 2025
44eae4c
Accespoint Location Workflow - sanity issue fixed
md-rafeek Sep 17, 2025
2a138bf
Accespoint Location Workflow - sanity issue fixed
md-rafeek Sep 17, 2025
6ac7db2
Merge branch 'main' of https://github.com/cisco-en-programmability/ca…
md-rafeek Sep 23, 2025
8748eb4
Accesspoint Location Workflow - Updated for unassign AP and covered UT
md-rafeek Sep 26, 2025
840fd4b
Accesspoint Location Workflow - Updated for unassign AP and covered UT
md-rafeek Sep 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions playbooks/accesspoint_location_workflow_manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# Playbook 1 Configure Access Point on planned location on Cisco Catalyst Center
- name: Configure Access Point on planned location on Cisco Catalyst Center
hosts: localhost
connection: local
vars_files:
- "credentials.yml"
tasks:
- name: Create access point location on Cisco Catalyst Center
cisco.dnac.accesspoint_location_workflow_manager:
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 }}"
dnac_log: true
dnac_log_level: DEBUG
config_verify: true
dnac_api_task_timeout: 1000
dnac_task_poll_interval: 1
state: merged # Options: merged, deleted
config: # Minimum 1; Maximum 100 config hierarchy
- floor_site_hierarchy: "Global/USA/California/SAN JOSE/BLD24/Floor3"
access_points:
- accesspoint_name: IAC-TB4-SJ-AP1
action: assign_planned # Optional assign_planned, delete_position
mac_address: 54:8a:ba:22:eb:c0 # Optional
accesspoint_model: CW9172H
position:
x_position: 30 # x-axis: from 0 to 100
y_position: 20 # y-axis: from 0 to 88
z_position: 8 # height: from 3.0 to 10
radios: # Minimum Items: 1; Maximum Items: 4
- bands: 2.4GHz # can be 5Ghz and 6GHz
channel: 10
tx_power: 5 # Decibel milliwatts (dBm)
antenna:
antenna_name: Internal-CW9172H-x-2.4GHz
azimuth: 20 # support upto 360
elevation: 30 # support -90 upto 90
- bands: 5GHz # can be 5Ghz and 6GHz
channel: 44
tx_power: 6 # Decibel milliwatts (dBm)
antenna:
antenna_name: Internal-CW9172H-x-5GHz
azimuth: 10 # support upto 360
elevation: 30 # support -90 upto 90

register: output_list
24 changes: 24 additions & 0 deletions plugins/module_utils/dnac.py
Original file line number Diff line number Diff line change
Expand Up @@ -2537,6 +2537,30 @@ def find_dict_by_key_value(self, data_list, key, value):
self.log(f"No matching item found for key '{key}' with value '{value}'.", "DEBUG")
return None

def find_duplicate_value(self, config_list, key_name):
"""
Identifies duplicate values for a given key in a list of dictionaries.

Parameters:
config_list (list of dict): A list where each dictionary contains key-value pairs.
key_name (str): The key whose values need to be checked for duplicates.

Returns:
list: A list of duplicate key_name values found in the input list.
"""
seen = set()
duplicates = set()

for item in config_list: # Ensure the item is a dictionary
value = item.get(key_name)
if value:
if value in seen:
duplicates.add(value)
else:
seen.add(value)

return list(duplicates)


def is_list_complex(x):
return isinstance(x[0], dict) or isinstance(x[0], list)
Expand Down
Loading
Loading