Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add location_id #122

Open
urskog84 opened this issue Jan 6, 2025 · 1 comment
Open

add location_id #122

urskog84 opened this issue Jan 6, 2025 · 1 comment
Labels
accepted This issue can reproduced and was accepted enhancement New feature or request help wanted Extra attention is needed

Comments

@urskog84
Copy link

urskog84 commented Jan 6, 2025

lmost every object in the phpIPAM database have the option to set a "location" that's correspond to the ID of the location.

would be nice to have that available int the modules.

address
device
subnet

Example

- name: "Create device"
  codeaffen.phpipam.device:
    username: "admin"
    password: "s3cr3t"
    server_url: "https://ipam.example.com"
    hostname: "leaf-example-01"
    ipaddress: "192.0.2.222"
    location_id: 53          <--- New
    sections:
      - Example Inc.
      - DEVOPS department
    state: present
@urskog84 urskog84 added the enhancement New feature or request label Jan 6, 2025
@cmeissner cmeissner added help wanted Extra attention is needed accepted This issue can reproduced and was accepted labels Jan 8, 2025
@cmeissner
Copy link
Member

@urskog84 thank you for rephrasing your feature request. We accept it, but we can't promise to implement it soon. So we also label it with help wanted.

Regarding the implementation, we prefer location as an extra field in the mentioned entity types. The module resolves the name to an ID, which will used to save it to the entity accordingly.

- name: "Create device"
  codeaffen.phpipam.device:
    username: "admin"
    password: "s3cr3t"
    server_url: "https://ipam.example.com"
    hostname: "leaf-example-01"
    ipaddress: "192.0.2.222"
    location: 'my location'          <--- New
    sections:
      - Example Inc.
      - DEVOPS department
    state: present

For anyone who is keen to implement this feature, the logic for resolving names to its IDs exists for various keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This issue can reproduced and was accepted enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants