Feature #2932
closed
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?
- Status changed from Assigned to Ready For Testing
- Subject changed from Add find by name for Operatingsystem and other objects where currently only find by id to Add find by fullname for Operatingsystem
- Target version set to 1.3.0
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF