Comment 7 for bug 1726955

Revision history for this message
Ian Kumlien (pomac) wrote :

Something like this actually makes it tolerable, the assumption is that the amount of images in the project is not that unique... And this is just a quick hack that I hope inspires a proper solution - it's most likely not in the proper location etc etc etc

time openstack server list

real 0m2.853s
user 0m1.756s
sys 0m0.195s

git stash
Saved working directory and index state WIP on master: 4e9b9298 Allow setting gateway when creating a router

time openstack server list

real 0m20.254s
user 0m4.216s
sys 0m0.240s

git diff
diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py
index a18ce810..dd4c6957 100644
--- a/openstackclient/compute/v2/server.py
+++ b/openstackclient/compute/v2/server.py
@@ -2441,6 +2441,9 @@ class ListServer(command.Lister):
             marker=marker_id,
             limit=parsed_args.limit)

+ if not parsed_args.all_projects:
+ parsed_args.name_lookup_one_by_one = True
+
         images = {}
         flavors = {}
         if data and not parsed_args.no_name_lookup: