Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/650#discussion_r30687013
  
    --- Diff: 
locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java 
---
    @@ -836,6 +910,52 @@ protected JcloudsSshMachineLocation 
obtainOnce(ConfigBag setup) throws NoMachine
             }
         }
     
    +    private void waitForWinRmAvailable(final NodeMetadata node, final 
LoginCredentials expectedCredentials, ConfigBag setup) {
    +        // TODO: Reduce / remove duplication between this and 
waitForReachable
    +        String waitForWinRmAvailable = setup.get(WAIT_FOR_WINRM_AVAILABLE);
    +        checkArgument(!"false".equalsIgnoreCase(waitForWinRmAvailable), 
"waitForWinRmAvailable called despite waitForWinRmAvailable=%s", 
waitForWinRmAvailable);
    +
    +        long delayMs = -1;
    +        try {
    +            delayMs = Time.parseTimeString(""+waitForWinRmAvailable);
    +        } catch (Exception e) {
    +            // normal if 'true'; just fall back to default
    +        }
    +        if (delayMs<0)
    +            delayMs = 
Time.parseTimeString(WAIT_FOR_WINRM_AVAILABLE.getDefaultValue());
    +
    +        // FIXME: remove this
    +        LOG.info("Address: " + 
node.getPublicAddresses().iterator().next());
    +        LOG.info("User: " + expectedCredentials.getUser());
    +        LOG.info("Password: " + 
expectedCredentials.getOptionalPassword().get());
    +        final Session session = 
WinRMFactory.INSTANCE.createSession(node.getPublicAddresses().iterator().next(),
    +                expectedCredentials.getUser(), 
expectedCredentials.getOptionalPassword().get());
    --- End diff --
    
    Previously you have used `getOptionalPassword().orNull()` - can we assume 
it will exist here?


---
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.
---

Reply via email to