From bed9df42bcc3c9d79cfe6665e782f132eae66000 Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Thu, 24 Nov 2016 21:07:55 +0300 Subject: [PATCH] Unified method name in FindInstancesRequest --- .../shell/common/request/FindInstancesRequest.java | 4 ++-- .../shell/interactive/commands/ModifyCommands.java | 4 ++-- .../perspective/shell/interactive/commands/ShowCommands.java | 2 +- .../wizard/common/step/AbstractMultipleInstancesStep.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/perspective-shell/src/main/java/org/meridor/perspective/shell/common/request/FindInstancesRequest.java b/perspective-shell/src/main/java/org/meridor/perspective/shell/common/request/FindInstancesRequest.java index 9afc959e..df3dd014 100644 --- a/perspective-shell/src/main/java/org/meridor/perspective/shell/common/request/FindInstancesRequest.java +++ b/perspective-shell/src/main/java/org/meridor/perspective/shell/common/request/FindInstancesRequest.java @@ -67,8 +67,8 @@ public FindInstancesRequest withClouds(String clouds) { this.cloud = parseEnumeration(clouds); return this; } - - public FindInstancesRequest withProjectNames(String projects) { + + public FindInstancesRequest withProjects(String projects) { this.project = parseEnumeration(projects); return this; } diff --git a/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/commands/ModifyCommands.java b/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/commands/ModifyCommands.java index 25a8bc00..65de3d2c 100644 --- a/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/commands/ModifyCommands.java +++ b/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/commands/ModifyCommands.java @@ -174,7 +174,7 @@ public void resizeInstances( ) { if (projectName != null && instanceNames != null && flavorName != null) { FindInstancesRequest findInstancesRequest = requestProvider.get(FindInstancesRequest.class) - .withProjectNames(projectName) + .withProjects(projectName) .withNames(instanceNames); FindFlavorsRequest findFlavorsRequest = requestProvider.get(FindFlavorsRequest.class) .withProjects(projectName) @@ -219,7 +219,7 @@ public void rebuildInstances( ) { if (projectName != null && instanceNames != null && imageName != null) { FindInstancesRequest findInstancesRequest = requestProvider.get(FindInstancesRequest.class) - .withProjectNames(projectName) + .withProjects(projectName) .withNames(instanceNames); FindImagesRequest findImagesRequest = requestProvider.get(FindImagesRequest.class) .withProjects(projectName) diff --git a/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/commands/ShowCommands.java b/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/commands/ShowCommands.java index dc4d247c..4ce42673 100644 --- a/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/commands/ShowCommands.java +++ b/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/commands/ShowCommands.java @@ -164,7 +164,7 @@ public void showInstances( .withImages(image) .withStates(state) .withClouds(cloud) - .withProjectNames(project); + .withProjects(project); validateExecuteShowResult( findInstancesRequest, new String[]{"Name", "Project", "Image", "Flavor", "Network", "State", "Last modified"}, diff --git a/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/wizard/common/step/AbstractMultipleInstancesStep.java b/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/wizard/common/step/AbstractMultipleInstancesStep.java index e1f51610..32a9a147 100644 --- a/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/wizard/common/step/AbstractMultipleInstancesStep.java +++ b/perspective-shell/src/main/java/org/meridor/perspective/shell/interactive/wizard/common/step/AbstractMultipleInstancesStep.java @@ -32,7 +32,7 @@ public abstract class AbstractMultipleInstancesStep extends MultipleChoicesStep< protected List getPossibleChoices(AnswersStorage previousAnswers) { return instancesRepository.findInstances( requestProvider.get(FindInstancesRequest.class) - .withProjectNames(getProjectName(previousAnswers)) + .withProjects(getProjectName(previousAnswers)) ); }