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

Unable to add PVE nodes to Netbox #157

Open
UntestedEngineer opened this issue Nov 13, 2023 · 2 comments
Open

Unable to add PVE nodes to Netbox #157

UntestedEngineer opened this issue Nov 13, 2023 · 2 comments
Assignees
Labels
bug Further discussion is needed to determine this issue's scope and/or implementation help wanted Extra attention is needed under review Further discussion is needed to determine this issue's scope and/or implementation

Comments

@UntestedEngineer
Copy link

I am using version 0.0.5 in a Netbox 3.6.5 container installed via pip. For some reason the pve devices fail to add to the DCIM section and I can't figure out why. I enabled logging as per the directions, however there isn't enough visibility into the actual POST action to see what is trying to be inserted:

Bad Request: /api/dcim/devices/
10.42.10.1 - - [13/Nov/2023:16:58:44 +0000] "POST /api/dcim/devices/ HTTP/1.1" 400 36 "-" "python-requests/2.31.0"
http://netbox-svc-tcp.production.svc.cluster.local:80 "POST /api/dcim/devices/ HTTP/1.1" 400 36
[proxbox_api.create.node] Creation of NODE failed.

@UntestedEngineer
Copy link
Author

UntestedEngineer commented Nov 14, 2023

Appears related to this under create > dcim.py

Currently this

def node(proxmox_node):
    ....
    node_json["device_role"] = extras.role(role_id = NETBOX_NODE_ROLE_ID).id

Should be this:

def node(proxmox_node):
    ....
    node_json["role"] = extras.role(role_id = NETBOX_NODE_ROLE_ID).id

As of Netbox 3.6 device_role is deprecated which is annoying because the netbox Swagger REST API still has device_role. I compiled this from the "main" branch and was able to successfully add the pve nodes.

@emersonfelipesp emersonfelipesp self-assigned this Nov 16, 2023
@emersonfelipesp emersonfelipesp added bug Further discussion is needed to determine this issue's scope and/or implementation help wanted Extra attention is needed under review Further discussion is needed to determine this issue's scope and/or implementation labels Nov 16, 2023
@fabriciopiccinin
Copy link

Bom Dia Consigo adicionar somente um pve por vez ele não deixar adicionar mais que um.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Further discussion is needed to determine this issue's scope and/or implementation help wanted Extra attention is needed under review Further discussion is needed to determine this issue's scope and/or implementation
Projects
None yet
Development

No branches or pull requests

3 participants