-
Notifications
You must be signed in to change notification settings - Fork 34
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
plugin module fails to create nautobot-device-lifecycle-mgmt hardware entries #306
plugin module fails to create nautobot-device-lifecycle-mgmt hardware entries #306
Comments
Can you try changing this: identifiers:
device_type: "{{ hardware_notice['device'] }}"
attrs:
device_type:
model: "{{ hardware_notice['device'] }}" To this: identifiers:
device_type:
model: "{{ hardware_notice['device'] }}"
attrs:
device_type:
model: "{{ hardware_notice['device'] }}" |
The error is still the same: failed: [localhost] (item={'device': 'UCS-FI-6332-16UP', 'release_date': '2016-11-01', 'end_of_sale': '2023-10-30', 'end_of_support': '2028-10-31', 'end_of_sw_releases': '2028-10-31', 'end_of_security_patches': '2028-10-31', 'documentation_url': 'https://www.cisco.com/c/en/us/products/collateral/servers-unified-computing/ucs-fabric-interconnect-f1-6332-16up-eol.html'}) => {
"ansible_loop_var": "hardware_notice",
"changed": false,
"hardware_notice": {
"device": "UCS-FI-6332-16UP",
"documentation_url": "https://www.cisco.com/c/en/us/products/collateral/servers-unified-computing/ucs-fabric-interconnect-f1-6332-16up-eol.html",
"end_of_sale": "2023-10-30",
"end_of_security_patches": "2028-10-31",
"end_of_support": "2028-10-31",
"end_of_sw_releases": "2028-10-31",
"release_date": "2016-11-01"
},
"invocation": {
"module_args": {
"api_version": null,
"attrs": {
"device_type": {
"model": "UCS-FI-6332-16UP"
},
"documentation_url": "https://www.cisco.com/c/en/us/products/collateral/servers-unified-computing/ucs-fabric-interconnect-f1-6332-16up-eol.html",
"end_of_sale": "2023-10-30",
"end_of_security_patches": "2028-10-31",
"end_of_support": "2028-10-31",
"end_of_sw_releases": "2028-10-31",
"release_date": "2016-11-01"
},
"endpoint": "hardware",
"identifiers": {
"device_type": {
"model": "UCS-FI-6332-16UP"
}
},
"plugin": "nautobot-device-lifecycle-mgmt",
"query_params": null,
"state": "present",
"token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"url": "https://nautobot.domain.tld",
"validate_certs": false
}
},
"msg": "{\"device_type\":[\"Select a valid choice. 4f6c1d14-2571-42f1-83d6-24e870d4ef80 is not one of the available choices.\"]}"
} what I don't understand is why sometimes the UUID is used and sometimes the name string. |
I'll check that. |
We use I can create it with
But unfortunately only on first creation, idempotently it fails.
That would need changes in the API in I tested that locally by building local test env with lcm branch where I changed api filter. And it works fine:
I will submit this branch as a pull request, but that will require new major release of lcm app as this is a backwards breaking change. |
ISSUE TYPE
SOFTWARE VERSIONS
pynautobot
2.0.2
Ansible:
2.16.2
Nautobot:
2.1.1
Collection:
5.1.0
SUMMARY
creating new hardware EoL entries will fail
STEPS TO REPRODUCE
Run the following task
the used variable looks like this
EXPECTED RESULTS
Hardware notice is created or at least reported as not changed
ACTUAL RESULTS
When I change the identifiers to:
The error is changed to
What I don't understand is, why there is one time the error message with the correct ID and one time with the model name.
The text was updated successfully, but these errors were encountered: