brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #194: Prevents premature resolving of external ...
Date Fri, 10 Jun 2016 15:03:37 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/194#discussion_r66628716
  
    --- Diff: locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
---
    @@ -2422,7 +2437,7 @@ protected JcloudsWinRmMachineLocation createWinRmMachineLocation(ComputeService
                         .configure(WinRmMachineLocation.WINRM_CONFIG_PORT, sshHostAndPort.isPresent()
? sshHostAndPort.get().getPort() : node.getLoginPort())
                         .configure("user", getUser(setup))
                         .configure(WinRmMachineLocation.USER, setup.get(USER))
    -                    .configure(WinRmMachineLocation.PASSWORD, setup.get(PASSWORD))
    +                    .configure(ConfigBag.newInstance().copyRaw(setup, PASSWORD, WinRmMachineLocation.PASSWORD).getAllConfigRaw())
    --- End diff --
    
    this changes the spec configuration to set `password` as a flag instead of a config key,
and it feels ugly
    
    as @nakomis noted to me offline the WinRM impl doesn't create a user so this field is
probably actually being ignored, and even if not the flag/config change should result in the
same WinRM machine location configuration
    
    but if we do start doing this more (which seems likely if we want to prevent resolution)
we probably want to introduce something cleaner such as
    
        configureCopyKey(ConfigBag, ConfigKey<?>)
        configureCopyKeys(ConfigBag, ConfigKey<?>, ConfigKey<?>, ...ConfigKey<?>)
        configureCopyKeyAs(ConfigBag, ConfigKey<?> sourceName, ConfigKey<?> targetName)



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

Mime
View raw message