Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application of the changes made in pull request #207 #210

Merged
merged 38 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
919589f
bug fix: Create a Global Pool with ip_address_space is 'ipv4' or 'IPV4'
Kandarimegha Nov 14, 2024
efca0e6
bug fix: Create a Global Pool with ip_address_space is 'ipv4' or 'IPV4'
Kandarimegha Nov 14, 2024
5c8a401
bug fix: Create a Global Pool with ip_address_space is 'ipv4' or 'IPV4'
Kandarimegha Nov 14, 2024
a1a10b5
Modifications for deletion changes
Nov 14, 2024
c287ed0
Modifications for deletion changes
Nov 14, 2024
3d2efed
Modifications for update and deletion bugs
Nov 15, 2024
d919260
Modifications for update and deletion bugs along with comments
Nov 18, 2024
0fcbbec
sanity fix
Kandarimegha Nov 18, 2024
a1cc939
sanity fix
Kandarimegha Nov 18, 2024
0c5163a
Modifications for update and deletion bugs along with comments
Nov 18, 2024
1c935f6
sanity fix
Kandarimegha Nov 18, 2024
16e1c05
sanity fix
Kandarimegha Nov 18, 2024
305add0
sanity fix
Kandarimegha Nov 18, 2024
7fd190b
sanity fix
Kandarimegha Nov 18, 2024
ddc9103
sanity check
Kandarimegha Nov 18, 2024
63a2be8
sanity check
Kandarimegha Nov 18, 2024
6911b67
sanity check
Kandarimegha Nov 18, 2024
9c71afa
sanity check
Kandarimegha Nov 18, 2024
e625978
sanity check
Kandarimegha Nov 18, 2024
0e64e3b
sanity check
Kandarimegha Nov 18, 2024
845ee19
converted yaml syntax errors to warning
rukapse Nov 18, 2024
5f78eeb
sanity check
Kandarimegha Nov 18, 2024
47aa32a
Modifications for update and deletion bugs along with comments
Nov 19, 2024
d515fc6
updated sanity tests to ignore yamllinting on plugins folder
rukapse Nov 19, 2024
ec9cd44
Sanity check
Kandarimegha Nov 19, 2024
cfdb977
Changes not applied
madhansansel Nov 19, 2024
c33ceed
Changes done for bugs
Nov 19, 2024
9f7419c
Modifications for params bugs
Nov 19, 2024
0dc1e06
Modifications for rf_model bug along with comments
Nov 19, 2024
5b517ff
Site workflow module (#33)
madhansansel Nov 19, 2024
2c63226
sanity_test_devel
rukapse Nov 19, 2024
58b0228
Changes not applied
rukapse Nov 20, 2024
6af6ad7
testing the sanity test cases
rukapse Nov 20, 2024
48d0e30
Changes not applied
madhansansel Nov 20, 2024
4ed023b
testing the sanity test cases
rukapse Nov 20, 2024
c8df318
Changes not applied
madhansansel Nov 20, 2024
b6e6c2f
testing the sanity test cases (#35)
madhansansel Nov 20, 2024
089bc04
application of the changes made in pull request #207
madhansansel Nov 20, 2024
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
Prev Previous commit
Next Next commit
Modifications for params bugs
  • Loading branch information
skesali authored and JosePabloOcampo1212 committed Dec 4, 2024
commit 9f7419ce20857c956affae2956780505240a21d4
11 changes: 7 additions & 4 deletions plugins/modules/site_workflow_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ def get_want(self, config):
self.log("Desired State (want): {0}".format(self.want), "INFO")
return self

def validate_site_input_data(self, config):
def validate_site_input_data(self, config, state):
"""
Validates site-related data from the playbook configuration to ensure it meets
the required standards for site creation or modification in Cisco Catalyst Center.
Expand Down Expand Up @@ -1194,6 +1194,9 @@ def validate_site_input_data(self, config):
self.log("Missing 'parent_name' field in entry.", "ERROR")
errormsg.append("parent_name should not be None or empty")

if state == "deleted":
continue

if site_type:
if site_type not in ("area", "building", "floor"):
errormsg.append("site_type: Invalid value '{0}' for site_type in playbook. Must be one of: area, building, or Floor.".format(site_type))
Expand Down Expand Up @@ -1232,8 +1235,8 @@ def validate_site_input_data(self, config):
self.log("Missing required latitude and longitude for building.", "ERROR")

country = site.get(site_type, {}).get("country")
self.log("Validating 'country' field: " + country, "DEBUG")
if country:
self.log("Validating 'country' field: " + country, "DEBUG")
param_spec = dict(type="str", length_max=100)
validate_str(country, param_spec, "country", errormsg)
else:
Expand All @@ -1253,8 +1256,8 @@ def validate_site_input_data(self, config):
errormsg.append("Floor number should not be None or empty")

rf_model = site.get(site_type, {}).get("rf_model")
self.log("Validating 'rf_model': " + rf_model, "DEBUG")
if rf_model:
self.log("Validating 'rf_model': " + rf_model, "DEBUG")
rf_model_list = [
"Free Space",
"Outdoor Open Space",
Expand Down Expand Up @@ -2438,7 +2441,7 @@ def main():

ccc_site.validate_input().check_return_status()
config_verify = ccc_site.params.get("config_verify")
ccc_site.validate_site_input_data(ccc_site.validated_config).check_return_status()
ccc_site.validate_site_input_data(ccc_site.validated_config, state).check_return_status()

if ccc_site.compare_dnac_versions(ccc_site.get_ccc_version(), "2.3.7.6") >= 0:
ccc_site.reset_values()
Expand Down