Skip to content

Commit

Permalink
feat(workflows): switch to nautobot native idempotent IDs
Browse files Browse the repository at this point in the history
Nautobot has integrated the idempotent IDs feature so switch to that
instead of using our custom piece.
  • Loading branch information
cardoe committed Jan 7, 2025
1 parent 2a3b536 commit 23713d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions python/understack-workflows/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,5 @@ def nautobot(requests_mock, nautobot_url: str, tenant_data: dict) -> Nautobot:
)
requests_mock.get(tenant_data["url"], json=tenant_data)
requests_mock.delete(tenant_data["url"])
requests_mock.post(
f"{nautobot_url}/api/plugins/uuid-api-endpoints/tenant/", json=tenant_data
)
requests_mock.post(f"{nautobot_url}/api/tenant/", json=tenant_data)
return Nautobot(nautobot_url, "blah")
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def handle_project_create(conn: Connection, nautobot: Nautobot, project_id: uuid
logger.info(f"got request to create tenant {project_id!s}")
project = conn.identity.get_project(project_id.hex) # type: ignore
ten_api = nautobot.session.tenancy.tenants
ten_api.url = f"{ten_api.base_url}/plugins/uuid-api-endpoints/tenant"
ten = ten_api.create(
id=str(project_id), name=project.name, description=project.description
)
Expand Down

0 comments on commit 23713d0

Please sign in to comment.