Skip to content

API Error Handling for Invalid Parent Name in Area or Building Creation for Site Workflow Module #191

@sonalideepthi777

Description

@sonalideepthi777

Prerequisites

  • [Yes ] Have you tested the operation in the API directly?
  • [Yes ] Do you have the latest SDK version?
  • [ Yes] Review the compatibility matrix before opening an issue.

Describe the bug
This issue encountered when attempting to create areas with invalid parent names, specifically when the parent does not exist in the playbook or Catalyst Center. Currently, the error message returned is:

"One or more groups are invalid. Hence none of the groups are getting created. Retry with correcting the import file."

For instance, when attempting to create the second area (e.g., "Uttar Pradesh") under the non-existent parent "Global/India7", the system doesn't provide a clear and specific error. Ideally, the error should state that the parent "Global/India7" does not exist in either the playbook or Catalyst Center, such as:

"Error: Global/India7 does not exist in either the playbook or Catalyst Center."

Additionally, it is difficult to identify the error if there are a large number of sites to create, making troubleshooting more complex.

Here’s an example configuration to replicate the issue:
config:

  • site:
    area:
    name: India5
    parent_name: Global
    site_type: area
  • site:
    area:
    name: Uttar Pradesh
    parent_name: Global/India7
    site_type: area
  • site:
    area:
    name: Andhra Pradesh
    parent_name: Global/India5/Uttar Pradesh
    site_type: area

This issue occurs while creating bulk sites for areas or buildings using the API:
https://172.23.241.186/dna/intent/api/v1/sites/bulk

Expected behavior
Global/India7 does not exist in either the playbook or Catalyst Center."

Environment (please complete the following information):

  • Cisco DNA Center Version and patch:
  • Python version:3.9
  • SDK version:2.9.4
  • OS Version:

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

api-improvementDNA Center API should include this as improvement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions