question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Posting without filed "device"

See original GitHub issue

Hello! I’m currently evaluating the tool and it looks really promising and would be a huge help for is, if we could use it. I have done a first successfull import with a HPE Gen10 server, if i try to import a Supermicro server inventory i get: NetBox returned body: {'device': ['This field is required.']}

This happens to every inventory item thats supposed to be pushed. The log with DEBUG2 on shows:

2022-09-28 16:14:07,029 - INFO: Creating new NetBox 'inventory item' object 'Power Supply Bay 1 (232V AC)' with data: {'tags': [{'name': 'NetBox-synced'}, {'name': 'Source: my-redfish-example'}], 'discovered': True, 'custom_fields': {'firmware': 'REV1.2', 'health': 'OK', 'inventory_type': 'Power Supply', 'inventory_size': None, 'inventory_speed': None}, 'name': 'Power Supply Bay 1 (232V AC)', 'description': 'Model: PWS-741P-1R', 'serial': 'XXXX'}
2022-09-28 16:14:07,030 - DEBUG2: Sending POST to 'https://netbox-stage.example.net/api/dcim/inventory-items/' with data 'b'{"tags": [{"name": "NetBox-synced"}, {"name": "Source: my-redfish-example"}], "discovered": true, "custom_fields": {"firmware": "REV1.2", "health": "OK", "inventory_type": "Power Supply", "inventory_size": null, "inventory_speed": null}, "name": "Power Supply Bay 1 (232V AC)", "description": "Model: PWS-741P-1R", "serial": "XXXX"}''.
2022-09-28 16:14:07,164 - DEBUG2: Received HTTP Status 400.
2022-09-28 16:14:07,164 - ERROR: NetBox returned: POST /api/dcim/inventory-items/ Bad Request
2022-09-28 16:14:07,165 - ERROR: NetBox returned body: {'device': ['This field is required.']}
2022-09-28 16:14:07,165 - ERROR: Request Failed for inventory item. Used data: {'tags': [{'name': 'NetBox-synced'}, {'name': 'Source: my-redfish-example'}], 'discovered': True, 'custom_fields': {'firmware': 'REV1.2', 'health': 'OK', 'inventory_type': 'Power Supply', 'inventory_size': None, 'inventory_speed': None}, 'name': 'Power Supply Bay 1 (232V AC)', 'description': 'Model: PWS-741P-1R', 'serial': 'P741PCI02BN4453'}

The inventory file has the correct netbox-id it it:

[...]
    "meta": {
        "data_retrieval_issues": {
            "firmware": [
                "No firmware data returned for API URL '/redfish/v1/UpdateService': got 'Base.v1_0_0.OemLicenseNotPassed/have no license to access the resource' for API path '/redfish/v1/UpdateService'",
                "URL '/redfish/v1/UpdateService/FirmwareInventory' unavailable. Unable to retrieve firmware information."
            ],
            "network_adapter": [
                "No network adapter or interface data returned for API URL '/redfish/v1/Systems/1/NetworkInterfaces'"
            ],
            "storage_controller": [
                "No storage_controller data returned for API URL '/redfish/v1/Systems/1/Storage': got 'Base.v1_0_0.OemLicenseNotPassed/have no license to access the resource' for API path '/redfish/v1/Systems/1/Storage'"
            ]
        },
        "duration_of_data_collection_in_seconds": 2.453505,
        "host_that_collected_inventory": "XXXXXX",
        "inventory_id": "2018",
        "inventory_layout_version": "1.4.0",
        "inventory_name": null,
        "script_version": "1.4.1",
        "start_of_data_collection": "2022-09-28T12:37:59+00:00"
    }

I have tried with the master branch version as well as development. Netbox is v3.2.7.

Help is much appreciated, I’d love to use this tool! Cheers and thank you!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Eldiabolo21commented, Oct 18, 2022
0reactions
Eldiabolo21commented, Oct 17, 2022

I have sent you an email! Thank you for your time!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Seeing the whole picture on avoidance devices
Section 801.90 of the HSR Rules states that parties cannot use a transaction structure for the purpose of avoiding or delaying their filing ......
Read more >
How to Post on Instagram From a Computer or Mobile Device
1. Go to Instagram's website in a desktop browser and log in if needed. · 2. Click the + (plus) symbol at the...
Read more >
Instagram Not Posted Yet Try Again Error? Fixes 2022
Are you experiencing the dreaded Instagram Not Posting Photo issue? To find out how to fix it, check out our guide and learn...
Read more >
Leaving your job? Take these steps before returning your ...
“The safest, most conservative thing to do is to go to your employer first and not take anything off of company-owned devices that...
Read more >
Upload and share files - Microsoft Support
Upload from my computer: Upload files from your device. Select a file > Open. If you'd like, add a message and @mention someone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found