From 64a52c0420b5e53516617711935659c1defe27d6 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Thu, 2 Sep 2010 01:36:43 -0700 Subject: [PATCH] updated to allow aggregate client commands --- .../java/org/jclouds/chef/ChefService.java | 11 ++- .../chef/internal/BaseChefService.java | 56 ++++++++--- .../chef/strategy/DeleteAllClientsInList.java | 36 +++++++ .../jclouds/chef/strategy/ListClients.java | 41 ++++++++ .../{GetNodes.java => ListNodes.java} | 6 +- .../CleanupStaleNodesAndClientsImpl.java | 24 +++-- .../internal/DeleteAllClientsInListImpl.java | 81 ++++++++++++++++ .../internal/DeleteAllNodesInListImpl.java | 2 +- .../strategy/internal/ListClientsImpl.java | 94 +++++++++++++++++++ .../{GetNodesImpl.java => ListNodesImpl.java} | 6 +- .../internal/GetNodesImplLiveTest.java | 4 +- 11 files changed, 329 insertions(+), 32 deletions(-) create mode 100644 chef/core/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java create mode 100644 chef/core/src/main/java/org/jclouds/chef/strategy/ListClients.java rename chef/core/src/main/java/org/jclouds/chef/strategy/{GetNodes.java => ListNodes.java} (90%) create mode 100644 chef/core/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java create mode 100644 chef/core/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java rename chef/core/src/main/java/org/jclouds/chef/strategy/internal/{GetNodesImpl.java => ListNodesImpl.java} (92%) diff --git a/chef/core/src/main/java/org/jclouds/chef/ChefService.java b/chef/core/src/main/java/org/jclouds/chef/ChefService.java index 6ad1bb8247..d457e7d4f8 100644 --- a/chef/core/src/main/java/org/jclouds/chef/ChefService.java +++ b/chef/core/src/main/java/org/jclouds/chef/ChefService.java @@ -22,6 +22,7 @@ package org.jclouds.chef; import java.io.IOException; import java.io.InputStream; +import org.jclouds.chef.domain.Client; import org.jclouds.chef.domain.Node; import org.jclouds.chef.internal.BaseChefService; @@ -61,7 +62,15 @@ public interface ChefService { Iterable listNodesDetailsMatching(Predicate nodeNameSelector); - Iterable getNodesNamed(Iterable names); + Iterable listNodesNamed(Iterable names); + + void deleteAllClientsInList(Iterable names); + + Iterable listClientsDetails(); + + Iterable listClientsDetailsMatching(Predicate clientNameSelector); + + Iterable listClientsNamed(Iterable names); void updateAutomaticAttributesOnNode(String nodeName); } diff --git a/chef/core/src/main/java/org/jclouds/chef/internal/BaseChefService.java b/chef/core/src/main/java/org/jclouds/chef/internal/BaseChefService.java index db211cc16f..d2c4e6621b 100644 --- a/chef/core/src/main/java/org/jclouds/chef/internal/BaseChefService.java +++ b/chef/core/src/main/java/org/jclouds/chef/internal/BaseChefService.java @@ -33,12 +33,15 @@ import javax.inject.Singleton; import org.jclouds.chef.ChefContext; import org.jclouds.chef.ChefService; +import org.jclouds.chef.domain.Client; import org.jclouds.chef.domain.Node; import org.jclouds.chef.reference.ChefConstants; import org.jclouds.chef.strategy.CleanupStaleNodesAndClients; import org.jclouds.chef.strategy.CreateNodeAndPopulateAutomaticAttributes; +import org.jclouds.chef.strategy.DeleteAllClientsInList; import org.jclouds.chef.strategy.DeleteAllNodesInList; -import org.jclouds.chef.strategy.GetNodes; +import org.jclouds.chef.strategy.ListClients; +import org.jclouds.chef.strategy.ListNodes; import org.jclouds.chef.strategy.UpdateAutomaticAttributesOnNode; import org.jclouds.io.Payloads; import org.jclouds.io.payloads.RSADecryptingPayload; @@ -64,23 +67,28 @@ public class BaseChefService implements ChefService { private final CleanupStaleNodesAndClients cleanupStaleNodesAndClients; private final CreateNodeAndPopulateAutomaticAttributes createNodeAndPopulateAutomaticAttributes; private final DeleteAllNodesInList deleteAllNodesInList; - private final GetNodes getNodes; + private final ListNodes listNodes; + private final DeleteAllClientsInList deleteAllClientsInList; + private final ListClients listClients; private final UpdateAutomaticAttributesOnNode updateAutomaticAttributesOnNode; private final Provider privateKey; @Inject protected BaseChefService(ChefContext chefContext, CleanupStaleNodesAndClients cleanupStaleNodesAndClients, - CreateNodeAndPopulateAutomaticAttributes createNodeAndPopulateAutomaticAttributes, - DeleteAllNodesInList deleteAllNodesInList, GetNodes getNodes, - UpdateAutomaticAttributesOnNode updateAutomaticAttributesOnNode, Provider privateKey) { + CreateNodeAndPopulateAutomaticAttributes createNodeAndPopulateAutomaticAttributes, + DeleteAllNodesInList deleteAllNodesInList, ListNodes listNodes, + DeleteAllClientsInList deleteAllClientsInList, ListClients listClients, + UpdateAutomaticAttributesOnNode updateAutomaticAttributesOnNode, Provider privateKey) { this.chefContext = checkNotNull(chefContext, "chefContext"); this.cleanupStaleNodesAndClients = checkNotNull(cleanupStaleNodesAndClients, "cleanupStaleNodesAndClients"); this.createNodeAndPopulateAutomaticAttributes = checkNotNull(createNodeAndPopulateAutomaticAttributes, - "createNodeAndPopulateAutomaticAttributes"); + "createNodeAndPopulateAutomaticAttributes"); this.deleteAllNodesInList = checkNotNull(deleteAllNodesInList, "deleteAllNodesInList"); - this.getNodes = checkNotNull(getNodes, "getNodes"); + this.listNodes = checkNotNull(listNodes, "listNodes"); + this.deleteAllClientsInList = checkNotNull(deleteAllClientsInList, "deleteAllClientsInList"); + this.listClients = checkNotNull(listClients, "listClients"); this.updateAutomaticAttributesOnNode = checkNotNull(updateAutomaticAttributesOnNode, - "updateAutomaticAttributesOnNode"); + "updateAutomaticAttributesOnNode"); this.privateKey = checkNotNull(privateKey, "privateKey"); } @@ -101,17 +109,37 @@ public class BaseChefService implements ChefService { @Override public Iterable listNodesDetails() { - return getNodes.execute(); + return listNodes.execute(); } @Override public Iterable listNodesDetailsMatching(Predicate nodeNameSelector) { - return getNodes.execute(nodeNameSelector); + return listNodes.execute(nodeNameSelector); } @Override - public Iterable getNodesNamed(Iterable names) { - return getNodes.execute(names); + public Iterable listNodesNamed(Iterable names) { + return listNodes.execute(names); + } + + @Override + public void deleteAllClientsInList(Iterable names) { + deleteAllClientsInList.execute(names); + } + + @Override + public Iterable listClientsDetails() { + return listClients.execute(); + } + + @Override + public Iterable listClientsDetailsMatching(Predicate clientNameSelector) { + return listClients.execute(clientNameSelector); + } + + @Override + public Iterable listClientsNamed(Iterable names) { + return listClients.execute(names); } @Override @@ -127,13 +155,13 @@ public class BaseChefService implements ChefService { @Override public byte[] decrypt(InputSupplier supplier) throws IOException { return ByteStreams.toByteArray(new RSADecryptingPayload(Payloads.newPayload(supplier.getInput()), privateKey - .get())); + .get())); } @Override public byte[] encrypt(InputSupplier supplier) throws IOException { return ByteStreams.toByteArray(new RSAEncryptingPayload(Payloads.newPayload(supplier.getInput()), privateKey - .get())); + .get())); } } \ No newline at end of file diff --git a/chef/core/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java b/chef/core/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java new file mode 100644 index 0000000000..68a1ad21d1 --- /dev/null +++ b/chef/core/src/main/java/org/jclouds/chef/strategy/DeleteAllClientsInList.java @@ -0,0 +1,36 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.chef.strategy; + +import org.jclouds.chef.strategy.internal.DeleteAllClientsInListImpl; + +import com.google.inject.ImplementedBy; + +/** + * + * + * @author Adrian Cole + */ +@ImplementedBy(DeleteAllClientsInListImpl.class) +public interface DeleteAllClientsInList { + + public void execute(Iterable names); + +} \ No newline at end of file diff --git a/chef/core/src/main/java/org/jclouds/chef/strategy/ListClients.java b/chef/core/src/main/java/org/jclouds/chef/strategy/ListClients.java new file mode 100644 index 0000000000..eef05e2636 --- /dev/null +++ b/chef/core/src/main/java/org/jclouds/chef/strategy/ListClients.java @@ -0,0 +1,41 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.chef.strategy; + +import org.jclouds.chef.domain.Client; +import org.jclouds.chef.strategy.internal.ListClientsImpl; + +import com.google.common.base.Predicate; +import com.google.inject.ImplementedBy; + +/** + * + * + * @author Adrian Cole + */ +@ImplementedBy(ListClientsImpl.class) +public interface ListClients { + + Iterable execute(); + + Iterable execute(Predicate clientNameSelector); + + Iterable execute(Iterable toGet); +} \ No newline at end of file diff --git a/chef/core/src/main/java/org/jclouds/chef/strategy/GetNodes.java b/chef/core/src/main/java/org/jclouds/chef/strategy/ListNodes.java similarity index 90% rename from chef/core/src/main/java/org/jclouds/chef/strategy/GetNodes.java rename to chef/core/src/main/java/org/jclouds/chef/strategy/ListNodes.java index 02c88153e5..d807783173 100644 --- a/chef/core/src/main/java/org/jclouds/chef/strategy/GetNodes.java +++ b/chef/core/src/main/java/org/jclouds/chef/strategy/ListNodes.java @@ -20,7 +20,7 @@ package org.jclouds.chef.strategy; import org.jclouds.chef.domain.Node; -import org.jclouds.chef.strategy.internal.GetNodesImpl; +import org.jclouds.chef.strategy.internal.ListNodesImpl; import com.google.common.base.Predicate; import com.google.inject.ImplementedBy; @@ -30,8 +30,8 @@ import com.google.inject.ImplementedBy; * * @author Adrian Cole */ -@ImplementedBy(GetNodesImpl.class) -public interface GetNodes { +@ImplementedBy(ListNodesImpl.class) +public interface ListNodes { Iterable execute(); diff --git a/chef/core/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java index ba5aa4130f..b5f19a91ab 100644 --- a/chef/core/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java +++ b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/CleanupStaleNodesAndClientsImpl.java @@ -37,6 +37,9 @@ import javax.inject.Singleton; import org.jclouds.chef.domain.Node; import org.jclouds.chef.reference.ChefConstants; import org.jclouds.chef.strategy.CleanupStaleNodesAndClients; +import org.jclouds.chef.strategy.DeleteAllClientsInList; +import org.jclouds.chef.strategy.DeleteAllNodesInList; +import org.jclouds.chef.strategy.ListNodes; import org.jclouds.domain.JsonBall; import org.jclouds.logging.Logger; @@ -55,13 +58,16 @@ public class CleanupStaleNodesAndClientsImpl implements CleanupStaleNodesAndClie @Named(ChefConstants.CHEF_LOGGER) protected Logger logger = Logger.NULL; - private final GetNodesImpl getAllNodes; - private final DeleteAllNodesInListImpl deleter; + private final ListNodes nodeLister; + private final DeleteAllNodesInList nodeDeleter; + private final DeleteAllClientsInList clientDeleter; @Inject - public CleanupStaleNodesAndClientsImpl(DeleteAllNodesInListImpl deleter, GetNodesImpl getAllNodes) { - this.getAllNodes = checkNotNull(getAllNodes, "getAllNodes"); - this.deleter = checkNotNull(deleter, "deleter"); + public CleanupStaleNodesAndClientsImpl(DeleteAllNodesInList nodeDeleter, DeleteAllClientsInList clientDeleter, + ListNodes nodeLister) { + this.nodeLister = checkNotNull(nodeLister, "nodeLister"); + this.nodeDeleter = checkNotNull(nodeDeleter, "nodeDeleter"); + this.clientDeleter = checkNotNull(clientDeleter, "clientDeleter"); } @Override @@ -69,7 +75,7 @@ public class CleanupStaleNodesAndClientsImpl implements CleanupStaleNodesAndClie final Calendar expired = Calendar.getInstance(); expired.setTime(new Date()); expired.add(Calendar.SECOND, -secondsStale); - Iterable staleNodes = filter(getAllNodes.execute(new Predicate() { + Iterable staleNodes = filter(nodeLister.execute(new Predicate() { @Override public boolean apply(String input) { @@ -88,13 +94,15 @@ public class CleanupStaleNodesAndClientsImpl implements CleanupStaleNodesAndClie } })); - deleter.execute(transform(staleNodes, new Function() { + Iterable nodeNames = transform(staleNodes, new Function() { @Override public String apply(Node from) { return from.getName(); } - })); + }); + nodeDeleter.execute(nodeNames); + clientDeleter.execute(nodeNames); } } \ No newline at end of file diff --git a/chef/core/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java new file mode 100644 index 0000000000..de771383dc --- /dev/null +++ b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllClientsInListImpl.java @@ -0,0 +1,81 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.chef.strategy.internal; + +import static com.google.common.collect.Maps.newHashMap; +import static org.jclouds.concurrent.FutureIterables.awaitCompletion; + +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; + +import javax.annotation.Resource; +import javax.inject.Named; +import javax.inject.Singleton; + +import org.jclouds.Constants; +import org.jclouds.chef.ChefAsyncClient; +import org.jclouds.chef.ChefClient; +import org.jclouds.chef.reference.ChefConstants; +import org.jclouds.chef.strategy.DeleteAllClientsInList; +import org.jclouds.logging.Logger; + +import com.google.inject.Inject; + +/** + * + * + * @author Adrian Cole + */ +@Singleton +public class DeleteAllClientsInListImpl implements DeleteAllClientsInList { + + protected final ChefClient chefClient; + protected final ChefAsyncClient chefAsyncClient; + protected final ExecutorService userExecutor; + @Resource + @Named(ChefConstants.CHEF_LOGGER) + protected Logger logger = Logger.NULL; + + @Inject(optional = true) + @Named(Constants.PROPERTY_REQUEST_TIMEOUT) + protected Long maxTime; + + @Inject + DeleteAllClientsInListImpl(@Named(Constants.PROPERTY_USER_THREADS) ExecutorService userExecutor, + ChefClient getAllClient, ChefAsyncClient ablobstore) { + this.userExecutor = userExecutor; + this.chefAsyncClient = ablobstore; + this.chefClient = getAllClient; + } + + @Override + public void execute(Iterable names) { + Map exceptions = newHashMap(); + Map> responses = newHashMap(); + for (String name : names) { + responses.put(name, chefAsyncClient.deleteClient(name)); + } + exceptions = awaitCompletion(responses, userExecutor, maxTime, logger, String.format( + "deleting clients: %s", names)); + if (exceptions.size() > 0) + throw new RuntimeException(String.format("errors deleting clients: %s: %s", names, exceptions)); + } +} \ No newline at end of file diff --git a/chef/core/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java index 8529ae55ea..1de4f361f1 100644 --- a/chef/core/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java +++ b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/DeleteAllNodesInListImpl.java @@ -74,7 +74,7 @@ public class DeleteAllNodesInListImpl implements DeleteAllNodesInList { responses.put(name, chefAsyncClient.deleteNode(name)); } exceptions = awaitCompletion(responses, userExecutor, maxTime, logger, String.format( - "getting deleting nodes: %s", names)); + "deleting nodes: %s", names)); if (exceptions.size() > 0) throw new RuntimeException(String.format("errors deleting nodes: %s: %s", names, exceptions)); } diff --git a/chef/core/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java new file mode 100644 index 0000000000..80bf87fe56 --- /dev/null +++ b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/ListClientsImpl.java @@ -0,0 +1,94 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.chef.strategy.internal; + +import static com.google.common.collect.Iterables.filter; +import static org.jclouds.concurrent.FutureIterables.transformParallel; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; + +import javax.annotation.Resource; +import javax.inject.Named; +import javax.inject.Singleton; + +import org.jclouds.Constants; +import org.jclouds.chef.ChefAsyncClient; +import org.jclouds.chef.ChefClient; +import org.jclouds.chef.domain.Client; +import org.jclouds.chef.reference.ChefConstants; +import org.jclouds.chef.strategy.ListClients; +import org.jclouds.logging.Logger; + +import com.google.common.base.Function; +import com.google.common.base.Predicate; +import com.google.inject.Inject; + +/** + * + * + * @author Adrian Cole + */ +@Singleton +public class ListClientsImpl implements ListClients { + + protected final ChefClient chefClient; + protected final ChefAsyncClient chefAsyncClient; + protected final ExecutorService userExecutor; + @Resource + @Named(ChefConstants.CHEF_LOGGER) + protected Logger logger = Logger.NULL; + + @Inject(optional = true) + @Named(Constants.PROPERTY_REQUEST_TIMEOUT) + protected Long maxTime; + + @Inject + ListClientsImpl(@Named(Constants.PROPERTY_USER_THREADS) ExecutorService userExecutor, ChefClient getAllClient, + ChefAsyncClient ablobstore) { + this.userExecutor = userExecutor; + this.chefAsyncClient = ablobstore; + this.chefClient = getAllClient; + } + + @Override + public Iterable execute() { + return execute(chefClient.listClients()); + } + + @Override + public Iterable execute(Predicate clientNameSelector) { + return execute(filter(chefClient.listClients(), clientNameSelector)); + } + + @Override + public Iterable execute(Iterable toGet) { + return transformParallel(toGet, new Function>() { + + @Override + public Future apply(String from) { + return chefAsyncClient.getClient(from); + } + + }, userExecutor, maxTime, logger, "getting clients"); + + } + +} \ No newline at end of file diff --git a/chef/core/src/main/java/org/jclouds/chef/strategy/internal/GetNodesImpl.java b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java similarity index 92% rename from chef/core/src/main/java/org/jclouds/chef/strategy/internal/GetNodesImpl.java rename to chef/core/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java index 477945396b..be3399e7ed 100644 --- a/chef/core/src/main/java/org/jclouds/chef/strategy/internal/GetNodesImpl.java +++ b/chef/core/src/main/java/org/jclouds/chef/strategy/internal/ListNodesImpl.java @@ -34,7 +34,7 @@ import org.jclouds.chef.ChefAsyncClient; import org.jclouds.chef.ChefClient; import org.jclouds.chef.domain.Node; import org.jclouds.chef.reference.ChefConstants; -import org.jclouds.chef.strategy.GetNodes; +import org.jclouds.chef.strategy.ListNodes; import org.jclouds.logging.Logger; import com.google.common.base.Function; @@ -47,7 +47,7 @@ import com.google.inject.Inject; * @author Adrian Cole */ @Singleton -public class GetNodesImpl implements GetNodes { +public class ListNodesImpl implements ListNodes { protected final ChefClient chefClient; protected final ChefAsyncClient chefAsyncClient; @@ -61,7 +61,7 @@ public class GetNodesImpl implements GetNodes { protected Long maxTime; @Inject - GetNodesImpl(@Named(Constants.PROPERTY_USER_THREADS) ExecutorService userExecutor, ChefClient getAllNode, + ListNodesImpl(@Named(Constants.PROPERTY_USER_THREADS) ExecutorService userExecutor, ChefClient getAllNode, ChefAsyncClient ablobstore) { this.userExecutor = userExecutor; this.chefAsyncClient = ablobstore; diff --git a/chef/core/src/test/java/org/jclouds/chef/strategy/internal/GetNodesImplLiveTest.java b/chef/core/src/test/java/org/jclouds/chef/strategy/internal/GetNodesImplLiveTest.java index 444f3bd324..22ea900a1f 100644 --- a/chef/core/src/test/java/org/jclouds/chef/strategy/internal/GetNodesImplLiveTest.java +++ b/chef/core/src/test/java/org/jclouds/chef/strategy/internal/GetNodesImplLiveTest.java @@ -39,14 +39,14 @@ import com.google.common.collect.ImmutableSet; */ @Test(groups = "live", testName = "chef.GetNodesImplLiveTest") public class GetNodesImplLiveTest extends BaseChefStrategyLiveTest { - private GetNodesImpl strategy; + private ListNodesImpl strategy; private CreateNodeAndPopulateAutomaticAttributesImpl creater; private ChefClient chef; @BeforeTest(groups = "live", dependsOnMethods = "setupClient") void setupStrategy() { this.creater = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class); - this.strategy = injector.getInstance(GetNodesImpl.class); + this.strategy = injector.getInstance(ListNodesImpl.class); this.chef = injector.getInstance(ChefClient.class); }