Two API round trips just to show user by name (osc_lib find_resource method)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
Won't Fix
|
Undecided
|
Unassigned | ||
python-openstackclient (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I noticed quite a few errors about non existing users (and other resources) in the logs and dug a little deeper.
When issuing a "show user" via: "openstack user show myuser",
so using the user's name, there are two API calls:
```
Output (/var/log/
127.0.0.1 - - [28/Mar/
127.0.0.1 - - [28/Mar/
```
compared to when using the id via: openstack user show 295ddc1534a9422
```
Output (/var/log/
GET /v3/users/
```
Apparently it's the find_resource helper method from osc_lib (https:/
Is there really no way to determine if the string received from the command line is an ID or some other string (~ a name) and then do "the right" call to save a round trip?
Likely this issue applies to other resources as well as find_resource is also used elsewhere.
I'll add upstream openstackclient since this doesn't appear to be a package specific bug for Ubuntu.