Project

General

Profile

Feature #2932

Add find by fullname for Operatingsystem

Added by Joseph Magen over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

request for API to support CLI

Associated revisions

Revision b1f4f883 (diff)
Added by Joseph Magen over 9 years ago

fixes #2932 - add find_by_fullname for Operatingsystem

History

#1 Updated by Tomáš Strachota over 9 years ago

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?

#2 Updated by Joseph Magen over 9 years ago

  • Status changed from Assigned to Ready For Testing

#3 Updated by Joseph Magen over 9 years ago

  • 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

#4 Updated by Dominic Cleal over 9 years ago

  • Target version set to 1.3.0

#5 Updated by Joseph Magen over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF