Skip to content

bug: Identifier is not stored when using Number Pools #7036

Description

@minitriga

Component

API Server / GraphQL

Infrahub version

v1.3.4

Current Behavior

Currently on demo.infrahub.app If I have a number pool and want to assign a number pool using an identifier so that new numbers are identifiable when specifying the "Identifier" it is then blank in the UI and API.

Expected Behavior

I would expect the identifier to be maintained as it is with IP Address and Prefix pools so that the same number can be retrieved.

Steps to Reproduce

  1. Login to demo.infrahub.app
  2. Create a number pool for InfraVlan and the vlan_id field
  3. Create a new vlan using the pool
mutation MyMutation {
  InfraVLANCreate(
    data: {name: {value: "test"}, vlan_id: {from_pool: {id: "185b9728-1b76-dda7-d13d-106529b1bcd9", identifier: "test-identifier"}}, role: {value: "user"}, status: {value: "active"}}
  ) {
    ok
    object {
      id
    }
  }
}
  1. Query resource pool
query MyQuery($resource_id: String = "") {
  InfrahubResourcePoolAllocated(
    pool_id: "185b9728-1b76-dda7-d13d-106529b1bcd9"
    resource_id: $resource_id
  ) {
    count
    edges {
      node {
        branch
        display_label
        id
        identifier
        kind
      }
    }
  }
}
  1. Response has identifier blank
{
  "data": {
    "InfrahubResourcePoolAllocated": {
      "count": 1,
      "edges": [
        {
          "node": {
            "branch": "test",
            "display_label": "100",
            "id": "185b972f-4c29-7b92-d13d-1065bc2cab68",
            "identifier": null,
            "kind": "InfraVLAN"
          }
        }
      ]
    }
  }
}

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/2This issue stalls work on the project or its dependents, it's a blocker for a releasetype/bugSomething isn't working as expected

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions