Actions
Feature #2932
closedAdd find by fullname for Operatingsystem
Description
request for API to support CLI
Actions
Added by Joseph Magen over 12 years ago. Updated over 12 years ago.
Description
request for API to support CLI
What we want to achieve in the end is to be able to translate from names to ids in cli. This will allow us to use names instead of ids for associating resources.
# Eg. $ hammer installation_media update --id=1 --operatingsystems="RedHat 6.2,RedHat 6.3" # vs $ hammer installation_media update --id=1 --operatingsystem-ids="3,4"
One way to do it is allow finding by name everywhere and ask on ids in separate requests.
Another solution is to add support for names to APIs for resource creation and update. Then the POST/PUT's body would look like
{
medium: {
name: some_medium_name,
operatingsystem_names: ["RedHat 6.2","RedHat 6.3"]
}
}
Which one do you find better?
Applied in changeset b1f4f883d0fc0254626c69dc3e043d50e009f4e1.