A network engineer is onboarding 12 new branch sites into Catalyst Center with Python so the fabric design can be built later. Each site needs an area, a building with coordinates and a floor with its dimensions, and the script must confirm each site exists before the next stage runs. Using the Create Site calls that take parentName, which Site API sequence should the script follow?
Select an answer to reveal the explanation.
Short Explanation
You’ll want to create the area, building, and floor in order, use parentName where required, and poll each task before moving on. Then confirm the full hierarchy with a GET by name; using parent UUIDs or checking only the area or building won’t verify the complete site. Hierarchy matters here.
Full Explanation
Create the area, building, and floor from parent to child, using parentName where required, and poll each asynchronous task to completion before submitting the next dependent request. Then use a GET by the full name hierarchy to verify that the site exists. A successful POST may mean only that the task was accepted, not that the resource is ready for the next stage. Supplying a returned parent UUID may suit APIs that link resources by ID, but it does not follow the stated Site API requirement to use parentName where required and may fail validation or associate the child incorrectly. Getting the area by name confirms only the top-level resource; it does not verify that the building and floor were created. Getting the building by its area/name hierarchy confirms the area and building, but leaves the floor and its dimensions unchecked. Exam caveat: polling a task to success is not a substitute for verifying the created resources with GET. Practical check: for each site, query the full area/building/floor name hierarchy and confirm the parent-child relationships and floor properties before proceeding.