You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sj...@apache.org on 2017/03/02 17:57:21 UTC

[1/2] brooklyn-server git commit: Set the username for Windows locations correctly

Repository: brooklyn-server
Updated Branches:
  refs/heads/master 3a6a2ee83 -> 1aa222a97


Set the username for Windows locations correctly

The username when deploying to a winrm target is always empty. Fix it by following the same approach the SSH branch takes to populate the username.


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

Branch: refs/heads/master
Commit: 90d9137acf640d4bf53bc46a6f86898894d45a3d
Parents: b3397aa
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Thu Mar 2 18:53:36 2017 +0200
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Thu Mar 2 18:53:36 2017 +0200

----------------------------------------------------------------------
 .../apache/brooklyn/location/jclouds/JcloudsLocation.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/90d9137a/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 8e25d64..600a710 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
@@ -2051,6 +2051,9 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
         String address = winrmHostAndPort.getHostText();
         String displayName = getPublicHostnameGeneric(node, setup, Optional.of(address));
 
+        final Object password = winrmConfig.get(WinRmMachineLocation.PASSWORD.getName()) != null
+                ? winrmConfig.get(WinRmMachineLocation.PASSWORD.getName())
+                : userCredentials.getOptionalPassword().orNull();
         if (isManaged()) {
             final LocationSpec<JcloudsWinRmMachineLocation> spec = LocationSpec.create(JcloudsWinRmMachineLocation.class)
                     .configure(winrmConfig)
@@ -2058,11 +2061,8 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
                     .configure("displayName", displayName)
                     .configure("address", address)
                     .configure(WinRmMachineLocation.WINRM_CONFIG_PORT, winrmHostAndPort.getPort())
-                    .configure("user", getUser(setup))
-                    .configure(WinRmMachineLocation.USER, setup.get(USER))
-                    .configure(SshMachineLocation.PASSWORD.getName(), winrmConfig.get(WinRmMachineLocation.PASSWORD.getName()) != null ?
-                            winrmConfig.get(WinRmMachineLocation.PASSWORD.getName()) :
-                            userCredentials.getOptionalPassword().orNull())
+                    .configure(WinRmMachineLocation.USER.getName(), userCredentials.getUser())
+                    .configure(WinRmMachineLocation.PASSWORD.getName(), password)
                     .configure("node", node)
                     .configureIfNotNull(CLOUD_AVAILABILITY_ZONE_ID, nodeAvailabilityZone)
                     .configureIfNotNull(CLOUD_REGION_ID, nodeRegion)


[2/2] brooklyn-server git commit: This closes #580

Posted by sj...@apache.org.
This closes #580

Set the username for Windows locations correctly


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

Branch: refs/heads/master
Commit: 1aa222a97279418993e36af0f8e4efa802abbd5e
Parents: 3a6a2ee 90d9137
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Thu Mar 2 17:43:18 2017 +0000
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Mar 2 17:43:18 2017 +0000

----------------------------------------------------------------------
 .../apache/brooklyn/location/jclouds/JcloudsLocation.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------