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 an API endpoint for module information #2517

Closed
lunkwill42 opened this issue Nov 28, 2022 · 2 comments · Fixed by #2520
Closed

Add an API endpoint for module information #2517

lunkwill42 opened this issue Nov 28, 2022 · 2 comments · Fixed by #2520
Assignees
Labels
CNaaS Related to the CNaaS activity enhancement

Comments

@lunkwill42
Copy link
Member

Is your feature request related to a problem? Please describe.

Getting information about serial numbers that NAV has observed in chassis and modules is crucial for integration and synchronization between NAV and various inventory management applications.

The API endpoint /netbox provides sufficient information about the chassis (singular or plurar) in an IP device, but there seems to be no endpoint that provides the same for field-replacable modules, so we are unable to cross check these devices with our inventory systems.

Describe the solution you'd like

A new /module endpoint in the API, which provides read-only information about modules that NAV has discovered (i.e. the Module ORM model). The endpoint must include:

  • Inline information about the related Device record: This is where information about the serial number and hw/sw/fw-revisions is kept.
  • Ability to filter by at least netbox (analogous to other endpoints, such as /interface).
  • Ability to search by serial number.

The endpoint should not inline a complete Netbox relation, but the associated Netbox' id and sysname attributes should be included.

Describe alternatives you've considered

A generic /entity endpoint, as an interface to the NetboxEntity model. However, this requirement may pop up as a separate one.

@lunkwill42 lunkwill42 added enhancement CNaaS Related to the CNaaS activity labels Nov 28, 2022
@stveit
Copy link
Contributor

stveit commented Nov 28, 2022

by "search by serial number", does this mean supporting a api/module/?search=searchstring parameter? or do you just mean a api/module/?serialnumber=someserialnumber? I guess this is the difference of Searching and Filtering in the docs.

@lunkwill42
Copy link
Member Author

lunkwill42 commented Nov 29, 2022

by "search by serial number", does this mean supporting a api/module/?search=searchstring parameter? or do you just mean a api/module/?serialnumber=someserialnumber? I guess this is the difference of Searching and Filtering in the docs.

Ah, that old confusion. I think I mean filtering, as in ?serialnumber=someserialnumber - just that the serial number isn't a property of the module itself, but of device. So following previous examples, the filter might become something like ?device__serial=someserialnumber :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CNaaS Related to the CNaaS activity enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants