Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/852#discussion_r37509157
--- Diff:
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
---
@@ -1861,16 +1891,41 @@ protected UserCreation
createUserStatements(@Nullable Image image, ConfigBag con
}
- // ----------------- rebinding to existing machine
------------------------
+ // ----------------- registering existing machines
------------------------
+ /**
+ * @deprecated since 0.8.0 use {@link #registerMachine(NodeMetadata)}
instead.
+ */
+ @Deprecated
public JcloudsSshMachineLocation rebindMachine(NodeMetadata metadata)
throws NoMachinesAvailableException {
- return rebindMachine(MutableMap.of(), metadata);
+ return (JcloudsSshMachineLocation) registerMachine(metadata);
}
+
+ protected MachineLocation registerMachine(NodeMetadata metadata)
throws NoMachinesAvailableException {
+ return registerMachine(MutableMap.of(), metadata);
+ }
+
+ /**
+ * @deprecated since 0.8.0 use {@link #registerMachine(Map,
NodeMetadata)} instead.
--- End diff --
Good idea. It doesn't throw a `ClassCastException`, it throws an
`IllegalStateException` in `JcloudsUtil#getFirstReachableAddress`.
---
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.
---