Repository: brooklyn-server
Updated Branches:
  refs/heads/master d7b8b0cc0 -> ad5d43eb9


Improve javadoc of JcloudsLocation.registerMachine

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/49543d09
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/49543d09
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/49543d09

Branch: refs/heads/master
Commit: 49543d09286ab72fc2d12afda8aa293011e32c53
Parents: 4105fd4
Author: Aled Sage <[email protected]>
Authored: Tue May 30 11:47:11 2017 +0100
Committer: Aled Sage <[email protected]>
Committed: Tue May 30 16:32:48 2017 +0100

----------------------------------------------------------------------
 .../location/jclouds/JcloudsLocation.java       | 22 +++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/49543d09/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
----------------------------------------------------------------------
diff --git 
a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 
b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
index 05bac2a..0293c94 100644
--- 
a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
+++ 
b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
@@ -1784,12 +1784,24 @@ public class JcloudsLocation extends 
AbstractCloudMachineProvisioningLocation im
     /**
      * Brings an existing machine with the given details under management.
      * <p>
-     * Required fields are:
-     * <ul>
-     *   <li>id: the jclouds VM id, e.g. "eu-west-1/i-5504f21d" (NB this is 
{@see JcloudsMachineLocation#getJcloudsId()} not #getId())
-     *   <li>hostname: the public hostname or IP of the machine, e.g. 
"ec2-176-34-93-58.eu-west-1.compute.amazonaws.com"
-     *   <li>userName: the username for sshing into the machine (for use if it 
is not a Windows system)
+     * The args passed in are used to match against an existing machine. The 
machines are listed
+     * (see @link #listMachines()}), and each is compared against the given 
args. There should
+     * be exactly one matching machine.
+     * <p>
+     * Arguments that can be used for matching are:
      * <ul>
+     *   <li>{@code id}: the cloud provider's VM id, e.g. 
"eu-west-1/i-5504f21d" (NB this is 
+     *       {@see JcloudsMachineLocation#getJcloudsId()} not #getId())
+     *   <li>{@code hostname}: the public hostname or IP of the machine, 
+     *       e.g. "ec2-176-34-93-58.eu-west-1.compute.amazonaws.com"
+     * </ul>
+     * 
+     * Other config options can also be passed in, for subsequent usage of the 
machine. For example,
+     * {@code user} will deterine the username subsequently used for ssh or 
WinRM. See the standard
+     * config options of {@link JcloudsLocation}, {@link SshMachineLocation} 
and 
+     * {@link WinRmMachineLocation}.
+     * 
+     * @throws IllegalArgumentException if there is not exactly one match
      */
     public JcloudsMachineLocation registerMachine(ConfigBag flags) throws 
NoMachinesAvailableException {
         ConfigBag setup = ConfigBag.newInstanceExtending(config().getBag(), 
flags.getAllConfig());

Reply via email to