Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/650#discussion_r30683449
--- Diff:
locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
---
@@ -622,6 +624,14 @@ protected JcloudsSshMachineLocation
obtainOnce(ConfigBag setup) throws NoMachine
if (node == null)
throw new IllegalStateException("No nodes returned by
jclouds create-nodes in " + setup.getDescription());
+ boolean windows =
node.getOperatingSystem().getFamily().equals(OsFamily.WINDOWS);
+
+ if (windows) {
+ // FIXME: Tidy this up and allow for user-specified
credentials
+ setup.put(USER, node.getCredentials().getUser());
+ setup.put(PASSWORD,
node.getCredentials().getOptionalPassword().orNull());
+ }
+
// Setup port-forwarding, if required
Optional<HostAndPort> sshHostAndPortOverride;
--- End diff --
We should generalise `sshHostAndPortOverride`, perhaps to
`connectionHostAndPortOverride`. And we should ensure it is setup for WinRM
port in the windows case.
Can do that in separate PR.
---
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.
---