Support filtering amphora list by image ID
This adds a --image-id parameter to the amphora list command so that one can filter based on image. This can be useful when doing rotations and only listing those running the old image. Change-Id: I30fb59ecbe4411b4d4eec3085ba393b2e48c3c6a
This commit is contained in:
parent
51ed4353e0
commit
e719b30c02
|
@ -62,6 +62,12 @@ class ListAmphora(lister.Lister):
|
|||
help="Filter by amphora provisioning status."
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--image-id',
|
||||
metavar='<image-id>',
|
||||
help="Filter by image ID.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--long',
|
||||
action='store_true',
|
||||
|
|
|
@ -578,6 +578,7 @@ def get_amphora_attrs(client_manager, parsed_args):
|
|||
'compute_id': ('compute_id', str),
|
||||
'role': ('role', str),
|
||||
'status': ('status', str),
|
||||
'image_id': ('image_id', str),
|
||||
}
|
||||
|
||||
return _map_attrs(vars(parsed_args), attr_map)
|
||||
|
|
Loading…
Reference in New Issue