Skip to content

Commit

Permalink
Added capability to filter images by project (fixes #190)
Browse files Browse the repository at this point in the history
  • Loading branch information
vania-pooh committed Dec 10, 2016
1 parent f94b922 commit 7f96b52
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public void showInstances(
@CliOption(key = "flavor", help = "Flavor name") String flavor,
@CliOption(key = "image", help = "Image name") String image,
@CliOption(key = "state", help = "Instance state") String state,
@CliOption(key = "cloud", help = "Cloud type") String cloud,
@CliOption(key = "project", help = "Project names") String project
@CliOption(key = "project", help = "Project names") String project,
@CliOption(key = "cloud", help = "Cloud type") String cloud
) {
FindInstancesRequest findInstancesRequest = requestProvider.get(FindInstancesRequest.class)
.withIds(id)
Expand Down Expand Up @@ -191,13 +191,15 @@ public void showImages(
@CliOption(key = "name", help = "Image name") String name,
@CliOption(key = "", help = "Image name") String inlineName,
@CliOption(key = "state", help = "Image state") String state,
@CliOption(key = "project", help = "Project name") String project,
@CliOption(key = "cloud", help = "Cloud type") String cloud
) {
FindImagesRequest findImagesRequest = requestProvider.get(FindImagesRequest.class)
.withIds(id)
.withNames(inlineName != null ? inlineName : name)
.withStates(state)
.withClouds(cloud);
.withClouds(cloud)
.withProjects(project);
validateExecuteShowResult(
findImagesRequest,
new String[]{"Name", "Projects", "State", "Last modified"},
Expand Down

0 comments on commit 7f96b52

Please sign in to comment.