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 missing N/A fallback on DIMM memory #129

Merged
merged 1 commit into from
Jun 9, 2020

Conversation

cyrinux
Copy link
Collaborator

@cyrinux cyrinux commented Jun 8, 2020

Fix

DEBUG:urllib3.connectionpool:https://netbox:443 "GET /api/dcim/manufacturers/?name=HP HTTP/1.1" 200 155
{'description': 'DIMM DDR3 Synchronous Registered (Buffered) 1333 MHz (0.8 ns)',
 'id': 'bank:0',
 'product': None,
 'serial': 'N/A',
 'size': 8.0,
 'slot': 'PROC  1 DIMM  1',
 'vendor': 'HP'}
DEBUG:urllib3.connectionpool:https://netbox:443 "POST /api/dcim/inventory-items/ HTTP/1.1" 400 43
Traceback (most recent call last):
  File "/usr/bin/netbox_agent", line 11, in <module>
    load_entry_point('netbox-agent==0.6.0', 'console_scripts', 'netbox_agent')()
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/netbox_agent/cli.py", line 44, in main
    return run(config)
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/netbox_agent/cli.py", line 39, in run
    server.netbox_create_or_update(config)
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/netbox_agent/server.py", line 272, in netbox_create_or_update
    self.inventory.create_or_update()
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/netbox_agent/inventory.py", line 447, in create_or_update
    self.do_netbox_memories()
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/netbox_agent/inventory.py", line 441, in do_netbox_memories
    self.create_netbox_memory(memory)
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/netbox_agent/inventory.py", line 414, in create_netbox_memory
    description=memory['description'],
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/pynetbox/core/endpoint.py", line 287, in create
    ).post(args[0] if args else kwargs)
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/pynetbox/core/query.py", line 381, in post
    return self._make_call(verb="post", data=data)
  File "/opt/venvs/netbox-agent/lib/python3.6/site-packages/pynetbox/core/query.py", line 274, in _make_call
    raise RequestError(req)
pynetbox.core.query.RequestError: The request failed with code 400 Bad Request: {'part_id': ['This field may not be null.']}

@cyrinux
Copy link
Collaborator Author

cyrinux commented Jun 8, 2020

Travis seems stuck

@cyrinux
Copy link
Collaborator Author

cyrinux commented Jun 9, 2020

@Solvik @ramnes travis is stuck, i dont know how to wake it up without pushing an useless commit, any idea?

@Solvik
Copy link
Owner

Solvik commented Jun 9, 2020

it all passed, but it seems there's a problem with the status reported to github

@Solvik Solvik merged commit 41f0b04 into Solvik:master Jun 9, 2020
devopstales pushed a commit to devopstales/netbox-agent2 that referenced this pull request Jun 24, 2022
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

Successfully merging this pull request may close these issues.

2 participants