Skip to content

Commit f7d2f35

Browse files
authored
Merge pull request #226 from cisco-en-programmability/develop
Develop
2 parents 502ddef + 2f6ef45 commit f7d2f35

16 files changed

Lines changed: 524 additions & 158 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ dmypy.json
129129
# Custom
130130
test.py
131131
sdkdiffgeneratorforreview.py
132+
verify_function_and_alias.py
132133

133134
# Code
134135
.vscode/

CHANGELOG.md

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,95 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.10.4] - 2025-07-30
10+
### Added
11+
- **Ansible Compatibility Aliases (v3.1.3.0)**: Added 46 backward compatibility alias functions to support Ansible modules and legacy code. These aliases map old function names to their current implementations:
12+
- **application_policy.py** (4 alias):
13+
- `create_application_sets_v2``create_application_sets`
14+
- `create_applications_v2``create_applications`
15+
- `edit_applications_v2``edit_applications`
16+
- `get_application_count_v2``get_application_count`
17+
- **site_design.py** (19 alias):
18+
- `add_planned_access_points_positions_v2``add_planned_access_points_positions`
19+
- `assign_planned_access_points_to_operations_ones_v2``assign_planned_access_points_to_operations_ones`
20+
- `creates_a_building_v2``creates_a_building`
21+
- `creates_a_floor_v2``creates_a_floor`
22+
- `delete_planned_access_points_position_v2``delete_planned_access_points_position`
23+
- `deletes_a_building_v2``deletes_a_building`
24+
- `deletes_a_floor_v2``deletes_a_floor`
25+
- `edit_planned_access_points_positions_v2``edit_planned_access_points_positions`
26+
- `edit_the_access_points_positions_v2``edit_the_access_points_positions`
27+
- `get_access_points_positions_count_v2``get_access_points_positions_count`
28+
- `get_access_points_positions_v2``get_access_points_positions`
29+
- `get_floor_settings_v2``get_floor_settings`
30+
- `get_planned_access_points_positions_count_v2``get_planned_access_points_positions_count`
31+
- `get_planned_access_points_positions_v2``get_planned_access_points_positions`
32+
- `gets_a_building_v2``gets_a_building`
33+
- `gets_a_floor_v2``gets_a_floor`
34+
- `updates_a_building_v2``updates_a_building`
35+
- `updates_a_floor_v2``updates_a_floor`
36+
- `uploads_floor_image_v2``uploads_floor_image`
37+
- **discovery.py** (3 alias):
38+
- `create_global_credentials_v2``create_global_credentials`
39+
- `get_all_global_credentials_v2``get_all_global_credentials`
40+
- `delete_global_credential_v2``delete_global_credential`
41+
- **devices.py** (4 alias):
42+
- `get_device_interface_stats_info_v2``get_device_interface_stats_info`
43+
- `the_total_interfaces_count_across_the_network_devices``get_total_interfaces_count_across_the_network_devices`
44+
- `the_trend_analytcis_data_for_the_interfaces_in_the_specified_time_range``get_trend_analytics_data_for_the_interfaces_in_the_specified_time_range`
45+
- `the_trend_analytics_data_for_the_network_device_in_the_specified_time_range``get_trend_analytics_data_for_the_network_device_in_the_specified_time_range`
46+
- **configuration_templates.py** (1 alias):
47+
- `get_projects_details_v2``get_projects_details`
48+
- **sda.py** (3 alias):
49+
- `the_trend_analytics_data_for_a_fabric_site_in_the_specified_time_range``get_trend_analytics_data_for_a_fabric_site_in_the_specified_time_range`
50+
- `the_trend_analytics_data_for_a_transit_network_in_the_specified_time_range``get_trend_analytics_data_for_a_transit_network_in_the_specified_time_range`
51+
- `the_trend_analytics_data_for_a_virtual_network_in_the_specified_time_range``get_trend_analytics_data_for_a_virtual_network_in_the_specified_time_range`
52+
- **industrial_configuration.py** (11 alias):
53+
- `configure_a_r_e_p_ring_on_f_a_b_r_i_c_deployment``configure_rep_ring_on_fabric_deployment`
54+
- `configure_a_r_e_p_ring_on_n_o_n_f_a_b_r_i_c_deployment``configure_rep_ring_on_non_fabric_deployment`
55+
- `delete_r_e_p_ring_configured_in_the_f_a_b_r_i_c_deployment``delete_rep_ring_configured_in_the_fabric_deployment`
56+
- `delete_r_e_p_ring_configured_in_the_n_o_n_f_a_b_r_i_c_deployment``delete_rep_ring_configured_in_the_non_fabric_deployment`
57+
- `get_the_r_e_p_ring_based_on_the_ring_id``get_the_rep_ring_based_on_the_ring_id`
58+
- `retrieves_the_count_of_m_r_p_ring_members``retrieves_the_count_of_mrp_ring_members`
59+
- `retrieves_the_count_of_r_e_p_rings``retrieves_the_count_of_rep_rings`
60+
- `retrieves_the_list_of_m_r_p_rings``retrieves_the_list_of_mrp_rings`
61+
- `retrieves_the_list_of_network_devices_part_of_m_r_p_ring``retrieves_the_list_of_network_devices_part_of_mrp_ring`
62+
- `retrieves_the_list_of_r_e_p_rings``retrieves_the_list_of_rep_rings`
63+
- **device_onboarding_pnp.py** (1 alias):
64+
- `un_claim_device``unclaim_device`
65+
- **applications.py** (1 alias):
66+
- `the_trend_analytics_data_for_thousand_eyes_test_results_in_the_specified_time_range``get_trend_analytics_data_for_thousand_eyes_test_results_in_the_specified_time_range`
67+
68+
### Fixed
69+
- **Function Name Corrections (v3.1.3.0)**: Fixed multiple incorrectly named functions across several API modules to follow proper Python naming conventions and match their actual functionality:
70+
- **industrial_configuration.py**: Corrected REP (Resilient Ethernet Protocol) ring function names:
71+
- `configure_are_p_ring_on_fabric_deployment``configure_rep_ring_on_fabric_deployment`
72+
- `configure_are_p_ring_on_non_fabric_deployment``configure_rep_ring_on_non_fabric_deployment`
73+
- `delete_are_p_ring_configured_in_the_fabric_deployment``delete_rep_ring_configured_in_the_fabric_deployment`
74+
- `delete_are_p_ring_configured_in_the_non_fabric_deployment``delete_rep_ring_configured_in_the_non_fabric_deployment`
75+
- `retrieves_the_list_of_are_p_rings``retrieves_the_list_of_rep_rings`
76+
- `retrieves_the_count_of_are_p_rings``retrieves_the_count_of_rep_rings`
77+
- `get_the_are_p_ring_based_on_the_ring_id``get_the_rep_ring_based_on_the_ring_id`
78+
- **user_and_roles.py**: Corrected class name:
79+
- `UserandRoles``UserAndRoles` (improved word separation)
80+
- **device_onboarding_pnp.py**: Fixed function naming:
81+
- `un_claim_device``unclaim_device` (removed unnecessary underscore)
82+
- **sda.py**: Corrected trend analytics function names:
83+
- `the_trend_analytics_data_for_a_fabric_site_in_the_specified_time_range``get_trend_analytics_data_for_a_fabric_site_in_the_specified_time_range`
84+
- `the_trend_analytics_data_for_a_transit_network_in_the_specified_time_range``get_trend_analytics_data_for_a_transit_network_in_the_specified_time_range`
85+
- `the_trend_analytics_data_for_a_virtual_network_in_the_specified_time_range``get_trend_analytics_data_for_a_virtual_network_in_the_specified_time_range`
86+
- **devices.py**: Fixed trend analytics and interface functions:
87+
- `the_total_interfaces_count_across_the_network_devices``get_total_interfaces_count_across_the_network_devices`
88+
- `the_trend_analytcis_data_for_the_interfaces_in_the_specified_time_range``get_trend_analytics_data_for_the_interfaces_in_the_specified_time_range` (also fixed typo "analytcis" → "analytics")
89+
- `the_trend_analytics_data_for_the_network_device_in_the_specified_time_range``get_trend_analytics_data_for_the_network_device_in_the_specified_time_range`
90+
- **applications.py**: Fixed trend analytics function:
91+
- `the_trend_analytics_data_for_thousand_eyes_test_results_in_the_specified_time_range``get_trend_analytics_data_for_thousand_eyes_test_results_in_the_specified_time_range`
92+
93+
### Changed
94+
- **Backward Compatibility**: Added alias functions for all corrected function and class names to maintain backward compatibility. Existing code using the old function names will continue to work without modification.
95+
- **Naming Conventions**: All corrected functions now follow proper Python naming conventions with clear, descriptive names that better reflect their functionality.
96+
- **Documentation Consistency**: Function names now properly align with their respective API documentation and operation IDs.
97+
998
## [2.10.3] - 2025-07-29
1099
### Fixed
11100
- Fixed `download_masked_device_configuration` function in both v2.3.7.9 and v3.1.3.0 by adding `stream=True` parameter and additional download parameters (`dirpath`, `save_file`, `filename`) to properly handle file downloads, prevent JSONDecodeError, and maintain consistency with other download functions in the SDK
@@ -723,4 +812,5 @@ respond with a binary.
723812
[2.10.1]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.10.0...v2.10.1
724813
[2.10.2]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.10.1...v2.10.2
725814
[2.10.3]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.10.2...v2.10.3
726-
[Unreleased]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.10.3...develop
815+
[2.10.4]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.10.3...v2.10.4
816+
[Unreleased]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.10.4...develop

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Compatibility Matrix
175175
* - 2.3.7.9
176176
- 2.8.14
177177
* - 3.1.3.0
178-
- 2.10.3
178+
- 2.10.4
179179

180180
Documentation
181181
-------------

dnacentersdk/api/v3_1_3_0/application_policy.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,3 +2636,8 @@ def delete_application_v2(self, id, headers=None, **request_parameters):
26362636

26372637

26382638
# Alias Functions
2639+
# Aliases for v2 functions that were renamed without v2 suffix when v1 doesn't exist Ansible
2640+
ApplicationPolicy.create_application_sets_v2 = ApplicationPolicy.create_application_sets
2641+
ApplicationPolicy.create_applications_v2 = ApplicationPolicy.create_applications
2642+
ApplicationPolicy.edit_applications_v2 = ApplicationPolicy.edit_applications
2643+
ApplicationPolicy.get_application_count_v2 = ApplicationPolicy.get_application_count

dnacentersdk/api/v3_1_3_0/applications.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def retrieves_the_total_count_of_thousand_eyes_test_results(
849849
"bpm_ef366ca484355d15937dd851a67c88e3_v3_1_3_0", json_data
850850
)
851851

852-
def the_trend_analytics_data_for_thousand_eyes_test_results_in_the_specified_time_range(
852+
def get_trend_analytics_data_for_thousand_eyes_test_results_in_the_specified_time_range(
853853
self,
854854
agent_id=None,
855855
end_time=None,
@@ -1078,3 +1078,5 @@ def applications(
10781078

10791079

10801080
# Alias Functions
1081+
# Alias for backward compatibility with incorrect function name
1082+
Applications.the_trend_analytics_data_for_thousand_eyes_test_results_in_the_specified_time_range = Applications.get_trend_analytics_data_for_thousand_eyes_test_results_in_the_specified_time_range

dnacentersdk/api/v3_1_3_0/configuration_templates.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3127,3 +3127,5 @@ def deploy_template_v2(
31273127

31283128

31293129
# Alias Functions
3130+
# Aliases for v2 functions that were renamed without v2 suffix when v1 doesn't exist Ansible
3131+
ConfigurationTemplates.get_projects_details_v2 = ConfigurationTemplates.get_projects_details

dnacentersdk/api/v3_1_3_0/device_onboarding_pnp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ def preview_config(
10261026
"bpm_fc416739f3c655ed911884aec0130e83_v3_1_3_0", json_data
10271027
)
10281028

1029-
def un_claim_device(
1029+
def unclaim_device(
10301030
self,
10311031
deviceIdList=None,
10321032
headers=None,
@@ -2421,3 +2421,5 @@ def update_workflow(
24212421

24222422

24232423
# Alias Functions
2424+
# Alias for backward compatibility with incorrect function name
2425+
DeviceOnboardingPnp.un_claim_device = DeviceOnboardingPnp.unclaim_device

dnacentersdk/api/v3_1_3_0/devices.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4461,7 +4461,7 @@ def gets_the_list_of_interfaces_across_the_network_devices_based_on_the_provided
44614461
"bpm_f667322836d5527482ad2100bec7feb4_v3_1_3_0", json_data
44624462
)
44634463

4464-
def the_total_interfaces_count_across_the_network_devices(
4464+
def get_total_interfaces_count_across_the_network_devices(
44654465
self,
44664466
aggregateAttributes=None,
44674467
attributes=None,
@@ -4656,7 +4656,7 @@ def get_the_interface_data_for_the_given_interface_idinstance_uuid_along_with_th
46564656
"bpm_adcdf890505770af113b18b30c1b5f_v3_1_3_0", json_data
46574657
)
46584658

4659-
def the_trend_analytcis_data_for_the_interfaces_in_the_specified_time_range(
4659+
def get_trend_analytics_data_for_the_interfaces_in_the_specified_time_range(
46604660
self,
46614661
id,
46624662
aggregateAttributes=None,
@@ -5771,7 +5771,7 @@ def get_the_device_data_for_the_given_device_id_uuid(
57715771
"bpm_f89c7ee84a615469b754add8feeabb5a_v3_1_3_0", json_data
57725772
)
57735773

5774-
def the_trend_analytics_data_for_the_network_device_in_the_specified_time_range(
5774+
def get_trend_analytics_data_for_the_network_device_in_the_specified_time_range(
57755775
self,
57765776
id,
57775777
aggregateAttributes=None,
@@ -13663,3 +13663,11 @@ def gets_interfaces_along_with_statistics_data_from_all_network_devices(
1366313663
headers=headers,
1366413664
**request_parameters
1366513665
)
13666+
13667+
13668+
# Aliases for backward compatibility with incorrect function names
13669+
Devices.the_total_interfaces_count_across_the_network_devices = Devices.get_total_interfaces_count_across_the_network_devices
13670+
Devices.the_trend_analytcis_data_for_the_interfaces_in_the_specified_time_range = Devices.get_trend_analytics_data_for_the_interfaces_in_the_specified_time_range
13671+
Devices.the_trend_analytics_data_for_the_network_device_in_the_specified_time_range = Devices.get_trend_analytics_data_for_the_network_device_in_the_specified_time_range
13672+
# Ansible
13673+
Devices.get_device_interface_stats_info_v2 = Devices.get_device_interface_stats_info

dnacentersdk/api/v3_1_3_0/discovery.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,3 +3001,7 @@ def delete_global_credential(self, id, headers=None, **request_parameters):
30013001

30023002

30033003
# Alias Functions
3004+
# Aliases for v2 functions that were renamed without v2 suffix when v1 doesn't exist Ansible
3005+
Discovery.create_global_credentials_v2 = Discovery.create_global_credentials
3006+
Discovery.get_all_global_credentials_v2 = Discovery.get_all_global_credentials
3007+
Discovery.delete_global_credential_v2 = Discovery.delete_global_credential

dnacentersdk/api/v3_1_3_0/industrial_configuration.py

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self, session, object_factory, request_validator):
6464
self._object_factory = object_factory
6565
self._request_validator = request_validator
6666

67-
def configure_are_p_ring_on_fabric_deployment(
67+
def configure_rep_ring_on_fabric_deployment(
6868
self,
6969
deploymentMode=None,
7070
ringName=None,
@@ -161,7 +161,7 @@ def configure_are_p_ring_on_fabric_deployment(
161161
"bpm_f200dc9a10d25beab1243a5b29f99c7d_v3_1_3_0", json_data
162162
)
163163

164-
def delete_are_p_ring_configured_in_the_fabric_deployment(
164+
def delete_rep_ring_configured_in_the_fabric_deployment(
165165
self, id, headers=None, **request_parameters
166166
):
167167
"""This API deletes the REP ring configured in the FABRIC deployment for the given id. The id of configured REP
@@ -507,7 +507,7 @@ def retrieves_the_count_of_mrp_ring_members(
507507
"bpm_bc1b3345f259e9859ac21a1ec694fe_v3_1_3_0", json_data
508508
)
509509

510-
def configure_are_p_ring_on_non_fabric_deployment(
510+
def configure_rep_ring_on_non_fabric_deployment(
511511
self,
512512
deploymentMode=None,
513513
ringName=None,
@@ -604,7 +604,7 @@ def configure_are_p_ring_on_non_fabric_deployment(
604604
"bpm_bbc4dab8193c546ab116e19863dff621_v3_1_3_0", json_data
605605
)
606606

607-
def delete_are_p_ring_configured_in_the_non_fabric_deployment(
607+
def delete_rep_ring_configured_in_the_non_fabric_deployment(
608608
self, id, headers=None, **request_parameters
609609
):
610610
"""This API deletes the REP ring configured in the NON-FABRIC deployment for the given id. The id of configured REP
@@ -663,7 +663,7 @@ def delete_are_p_ring_configured_in_the_non_fabric_deployment(
663663
"bpm_dcf9b8fecdd57f0bb7a33d358e6be37_v3_1_3_0", json_data
664664
)
665665

666-
def retrieves_the_list_of_are_p_rings(
666+
def retrieves_the_list_of_rep_rings(
667667
self,
668668
deploymentMode=None,
669669
limit=None,
@@ -757,7 +757,7 @@ def retrieves_the_list_of_are_p_rings(
757757
"bpm_fa2127b55124a3a00b2991b77db6_v3_1_3_0", json_data
758758
)
759759

760-
def retrieves_the_count_of_are_p_rings(
760+
def retrieves_the_count_of_rep_rings(
761761
self,
762762
deploymentMode=None,
763763
networkDeviceId=None,
@@ -842,7 +842,7 @@ def retrieves_the_count_of_are_p_rings(
842842
"bpm_d9f276a532e5eeb86bb591f8537fcc7_v3_1_3_0", json_data
843843
)
844844

845-
def get_the_are_p_ring_based_on_the_ring_id(
845+
def get_the_rep_ring_based_on_the_ring_id(
846846
self, id, headers=None, **request_parameters
847847
):
848848
"""This API returns REP ring for the given id (The id of configured REP ring can be retrieved using the API
@@ -903,3 +903,23 @@ def get_the_are_p_ring_based_on_the_ring_id(
903903

904904

905905
# Alias Functions
906+
# Aliases for backward compatibility with incorrect function names
907+
IndustrialConfiguration.configure_are_p_ring_on_fabric_deployment = IndustrialConfiguration.configure_rep_ring_on_fabric_deployment
908+
IndustrialConfiguration.delete_are_p_ring_configured_in_the_fabric_deployment = IndustrialConfiguration.delete_rep_ring_configured_in_the_fabric_deployment
909+
IndustrialConfiguration.configure_are_p_ring_on_non_fabric_deployment = IndustrialConfiguration.configure_rep_ring_on_non_fabric_deployment
910+
IndustrialConfiguration.delete_are_p_ring_configured_in_the_non_fabric_deployment = IndustrialConfiguration.delete_rep_ring_configured_in_the_non_fabric_deployment
911+
IndustrialConfiguration.retrieves_the_list_of_are_p_rings = IndustrialConfiguration.retrieves_the_list_of_rep_rings
912+
IndustrialConfiguration.retrieves_the_count_of_are_p_rings = IndustrialConfiguration.retrieves_the_count_of_rep_rings
913+
IndustrialConfiguration.get_the_are_p_ring_based_on_the_ring_id = IndustrialConfiguration.get_the_rep_ring_based_on_the_ring_id
914+
915+
# Additional aliases for missing_list variants Ansible
916+
IndustrialConfiguration.configure_a_r_e_p_ring_on_f_a_b_r_i_c_deployment = IndustrialConfiguration.configure_rep_ring_on_fabric_deployment
917+
IndustrialConfiguration.configure_a_r_e_p_ring_on_n_o_n_f_a_b_r_i_c_deployment = IndustrialConfiguration.configure_rep_ring_on_non_fabric_deployment
918+
IndustrialConfiguration.delete_r_e_p_ring_configured_in_the_f_a_b_r_i_c_deployment = IndustrialConfiguration.delete_rep_ring_configured_in_the_fabric_deployment
919+
IndustrialConfiguration.delete_r_e_p_ring_configured_in_the_n_o_n_f_a_b_r_i_c_deployment = IndustrialConfiguration.delete_rep_ring_configured_in_the_non_fabric_deployment
920+
IndustrialConfiguration.retrieves_the_list_of_r_e_p_rings = IndustrialConfiguration.retrieves_the_list_of_rep_rings
921+
IndustrialConfiguration.retrieves_the_count_of_r_e_p_rings = IndustrialConfiguration.retrieves_the_count_of_rep_rings
922+
IndustrialConfiguration.get_the_r_e_p_ring_based_on_the_ring_id = IndustrialConfiguration.get_the_rep_ring_based_on_the_ring_id
923+
IndustrialConfiguration.retrieves_the_list_of_m_r_p_rings = IndustrialConfiguration.retrieves_the_list_of_mrp_rings
924+
IndustrialConfiguration.retrieves_the_count_of_m_r_p_ring_members = IndustrialConfiguration.retrieves_the_count_of_mrp_ring_members
925+
IndustrialConfiguration.retrieves_the_list_of_network_devices_part_of_m_r_p_ring = IndustrialConfiguration.retrieves_the_list_of_network_devices_part_of_mrp_ring

0 commit comments

Comments
 (0)