diff --git a/infrahub_sdk/client.py b/infrahub_sdk/client.py index dc1f539fd..5c2067e5a 100644 --- a/infrahub_sdk/client.py +++ b/infrahub_sdk/client.py @@ -250,7 +250,7 @@ def _build_ip_address_allocation_query( return Mutation( name="AllocateIPAddress", - mutation="IPAddressPoolGetResource", + mutation="InfrahubIPAddressPoolGetResource", query={"ok": None, "node": {"id": None, "kind": None, "identifier": None, "display_label": None}}, input_data={"data": input_data}, ) @@ -281,7 +281,7 @@ def _build_ip_prefix_allocation_query( return Mutation( name="AllocateIPPrefix", - mutation="IPPrefixPoolGetResource", + mutation="InfrahubIPPrefixPoolGetResource", query={"ok": None, "node": {"id": None, "kind": None, "identifier": None, "display_label": None}}, input_data={"data": input_data}, ) @@ -1301,7 +1301,7 @@ async def allocate_next_ip_address( raise ValueError("resource_pool is not an IP address pool") branch = branch or self.default_branch - mutation_name = "IPAddressPoolGetResource" + mutation_name = "InfrahubIPAddressPoolGetResource" query = self._build_ip_address_allocation_query( resource_pool_id=resource_pool.id, @@ -1453,7 +1453,7 @@ async def allocate_next_ip_prefix( raise ValueError("resource_pool is not an IP prefix pool") branch = branch or self.default_branch - mutation_name = "IPPrefixPoolGetResource" + mutation_name = "InfrahubIPPrefixPoolGetResource" query = self._build_ip_prefix_allocation_query( resource_pool_id=resource_pool.id, @@ -2439,7 +2439,7 @@ def allocate_next_ip_address( raise ValueError("resource_pool is not an IP address pool") branch = branch or self.default_branch - mutation_name = "IPAddressPoolGetResource" + mutation_name = "InfrahubIPAddressPoolGetResource" query = self._build_ip_address_allocation_query( resource_pool_id=resource_pool.id, @@ -2587,7 +2587,7 @@ def allocate_next_ip_prefix( raise ValueError("resource_pool is not an IP prefix pool") branch = branch or self.default_branch - mutation_name = "IPPrefixPoolGetResource" + mutation_name = "InfrahubIPPrefixPoolGetResource" query = self._build_ip_prefix_allocation_query( resource_pool_id=resource_pool.id, diff --git a/tests/unit/sdk/test_client.py b/tests/unit/sdk/test_client.py index 31c38294a..5f38c1204 100644 --- a/tests/unit/sdk/test_client.py +++ b/tests/unit/sdk/test_client.py @@ -519,7 +519,7 @@ async def test_allocate_next_ip_address( method="POST", json={ "data": { - "IPAddressPoolGetResource": { + "InfrahubIPAddressPoolGetResource": { "ok": True, "node": { "id": "17da1246-54f1-a9c0-2784-179f0ec5b128", @@ -620,7 +620,7 @@ async def test_allocate_next_ip_prefix( method="POST", json={ "data": { - "IPPrefixPoolGetResource": { + "InfrahubIPPrefixPoolGetResource": { "ok": True, "node": { "id": "7d9bd8d-8fc2-70b0-278a-179f425e25cb",