Skip to content

Commit 3049e72

Browse files
fix(understack-workflows): Nautobot requires a prefix or namespace when creating IPs.
1 parent faf61af commit 3049e72

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎python/understack-workflows/tests/test_nautobot_device_interface_sync.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ def test_create_and_assign_ip(self, mock_nautobot):
427427

428428
mock_nautobot.ipam.ip_addresses.create.assert_called_once_with(
429429
address=ip_address,
430+
namespace="Rackspace",
430431
status="Active",
431432
)
432433
mock_nautobot.ipam.ip_address_to_interface.create.assert_called_once()

‎python/understack-workflows/understack_workflows/oslo_event/nautobot_device_interface_sync.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def _assign_ip_to_interface(
159159
try:
160160
new_ip = nautobot_client.ipam.ip_addresses.create(
161161
address=ip_address,
162+
namespace="Rackspace",
162163
status="Active",
163164
)
164165
ip_id = getattr(new_ip, "id", None)

0 commit comments

Comments
 (0)