Skip to content

Commit

Permalink
Unified method name in FindInstancesRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
vania-pooh committed Dec 10, 2016
1 parent 7f96b52 commit 052bfce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public abstract class AbstractMultipleInstancesStep extends MultipleChoicesStep<
protected List<FindInstancesResult> getPossibleChoices(AnswersStorage previousAnswers) {
return instancesRepository.findInstances(
requestProvider.get(FindInstancesRequest.class)
.withProjectNames(getProjectName(getProjectStepClass(), previousAnswers))
);
.withProjects(getProjectName(getProjectStepClass(), previousAnswers))
);
}

protected Class<? extends AbstractProjectStep> getProjectStepClass() {
Expand Down

0 comments on commit 052bfce

Please sign in to comment.