Skip to content

Commit 4ec5eb2

Browse files
committed
External ip for byon - add ssh support
1 parent f0c9dd6 commit 4ec5eb2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

core/src/main/java/org/apache/brooklyn/location/byon/ByonLocationResolver.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,14 @@ protected LocationSpec<? extends MachineLocation> parseMachine(Map<String, ?> va
152152
Map<String, Object> machineConfig = MutableMap.copyOf(vals);
153153

154154
String osFamily = (String) machineConfig.remove(OS_FAMILY.getName());
155-
String ssh = (String) machineConfig.remove("ssh");
156-
if (machineConfig.containsKey("winrm") && !(machineConfig.get("winrm") instanceof String)) {
155+
if (machineConfig.containsKey("ssh") && !(machineConfig.get("ssh") instanceof String)) {
156+
machineConfig.put("address", machineConfig.get("ssh"));
157+
machineConfig.remove("ssh");
158+
} else if (machineConfig.containsKey("winrm") && !(machineConfig.get("winrm") instanceof String)) {
157159
machineConfig.put("address", machineConfig.get("winrm"));
160+
machineConfig.remove("winrm");
158161
} else {
162+
String ssh = (String) machineConfig.remove("ssh");
159163
String winrm = (String) machineConfig.remove("winrm");
160164

161165
Map<Integer, String> tcpPortMappings = (Map<Integer, String>) machineConfig.get("tcpPortMappings");

0 commit comments

Comments
 (0)