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

    https://github.com/apache/incubator-brooklyn/pull/1087#discussion_r48627987
  
    --- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
    @@ -1608,7 +1608,36 @@ protected SshMachineLocation 
createTemporarySshMachineLocation(HostAndPort hostA
             }
         }
     
    -    
    +    /**
    +     * Creates a temporary WinRM machine location (i.e. will not be 
persisted), which uses the given credentials.
    +     * It ignores any credentials (e.g. password, key-phrase, etc) that 
are supplied in the config.
    +     */
    +    protected WinRmMachineLocation 
createTemporaryWinRmMachineLocation(HostAndPort hostAndPort, LoginCredentials 
creds, ConfigBag config) {
    +        String initialUser = creds.getUser();
    +        Optional<String> initialPassword = creds.getOptionalPassword();
    +        Optional<String> initialPrivateKey = creds.getOptionalPrivateKey();
    +
    +        Map<String,Object> winrmProps = 
Maps.newLinkedHashMap(config.getAllConfig());
    +        winrmProps.put("user", initialUser);
    +        winrmProps.put("address", hostAndPort.getHostText());
    +        winrmProps.put("port", hostAndPort.getPort());
    +        winrmProps.put(AbstractLocation.TEMPORARY_LOCATION.getName(), 
true);
    +        winrmProps.put(LocalLocationManager.CREATE_UNMANAGED.getName(), 
true);
    --- End diff --
    
    I see you flagged it as unmanaged but unfortunately this setting was 
overridden in 
    
https://github.com/apache/incubator-brooklyn/blob/master/brooklyn-server/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalLocationManager.java#L95
    @ahgittin What is the motivation behind  LocalLocationManager.java#L95 ?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to