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

Possible missed mapping for PowerPorts model (unused PowerPorts model) #535

Closed
nautics889 opened this issue Mar 20, 2023 · 0 comments
Closed

Comments

@nautics889
Copy link
Contributor

nautics889 commented Mar 20, 2023

I've noticed there is an unused import of PowerPorts model in pynetbox/models/mapper.py module:

image

However there's an item in the mapper-dict named "dcim.consoleport". Perharps there should be PowerPorts, but there is ConsolePorts instead.
Also ConsolePorts is mapped with "dcim.consoleports" key.

So currently we map two different keys to ConsolePorts model: "dcim.consoleport" and "dcim.powerport".

Is that logic correct?

nautics889 added a commit to nautics889/pynetbox that referenced this issue Mar 21, 2023
Updated models/mapper.py: set `PowerPorts` for "dcim.powerport" in the
map-dict.
@nautics889 nautics889 changed the title Possible missed mapping for PowerPorts model Possible missed mapping for PowerPorts model (unused PowerPorts model) Mar 21, 2023
nautics889 added a commit to nautics889/pynetbox that referenced this issue Mar 21, 2023
Updated models/mapper.py: set `PowerPorts` for "dcim.powerport" in the
map-dict.
abhi1693 added a commit that referenced this issue Aug 25, 2023
Fix unused `PowerPorts` model (#535)
arthanson pushed a commit that referenced this issue Aug 25, 2023
* Fix unused `PowerPorts` model (#535)

Updated models/mapper.py: set `PowerPorts` for "dcim.powerport" in the
map-dict.

* migrate from pkg_resources to importlib

* adds core app

* adds endpoints added in 3.5

* adds support for 3.5

* lint fixes

* updates openapi tests

* adds testing for 3.4 and 3.5

* updates pytest.skip

* updates docker tags for testing

* fixes superuser account creation for testing

* fixed requirements

* updates the docstring for render-config endpoint

* removes extra semicolon from content type value

* migrate from pkg_resources to importlib

* adds core app

* adds endpoints added in 3.5

* adds support for 3.5

* lint fixes

* updates openapi tests

* adds testing for 3.4 and 3.5

* updates pytest.skip

* updates docker tags for testing

* fixes superuser account creation for testing

* fixed requirements

* updates the docstring for render-config endpoint

* removes extra semicolon from content type value

---------

Co-authored-by: nautics889 <cyberukr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants