Github user neykov commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/763#discussion_r35312658
--- Diff:
locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
---
@@ -1008,6 +1011,24 @@ protected MachineLocation obtainOnce(ConfigBag
setup) throws NoMachinesAvailable
}
}
+ // ------------- suspend and resume
------------------------------------
+
+ /**
+ * Suspends the given location.
+ * <p>
+ * Note that this method does <b>not</b> call the lifecycle methods of
any
+ * {@link #getCustomizers(ConfigBag) customizers} attached to this
location.
+ */
+ @Override
+ public void suspendMachine(MachineLocation rawLocation) {
+ String instanceId = vmInstanceIds.remove(rawLocation);
+ if (instanceId == null) {
+ LOG.info("Attempt to suspend unknown machine " + rawLocation +
" in " + this);
+ throw new IllegalArgumentException("Unknown machine " +
rawLocation);
+ }
+ getComputeService().suspendNode(instanceId);
--- End diff --
Why skip `removeChild(location)`? Shouldn't the location be unmanaged?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---