From ffb4df41ebf844f7ac4df20838e9bc8f7ce6586d Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Thu, 16 Jan 2014 23:28:23 +0000 Subject: [PATCH] JCLOUDS-426. Update Elasticstack vnc password key --- .../org/jclouds/elasticstack/functions/MapToServerInfo.java | 2 +- .../org/jclouds/elasticstack/functions/ServerToMap.java | 2 +- .../org/jclouds/elasticstack/functions/ServerToMapTest.java | 6 +++--- apis/elasticstack/src/test/resources/create_server.txt | 2 +- apis/elasticstack/src/test/resources/new_server.txt | 2 +- apis/elasticstack/src/test/resources/new_server2.txt | 2 +- apis/elasticstack/src/test/resources/server2.txt | 4 ++-- apis/elasticstack/src/test/resources/servers.txt | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/functions/MapToServerInfo.java b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/functions/MapToServerInfo.java index 9cf5e34c9e..790d76be0b 100644 --- a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/functions/MapToServerInfo.java +++ b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/functions/MapToServerInfo.java @@ -81,7 +81,7 @@ public class MapToServerInfo implements Function, ServerInfo builder.bootDeviceIds(Splitter.on(' ').split(from.get("boot"))); - builder.vnc(new VNC(from.get("vnc:ip") == null ? "auto" : from.get("vnc:ip"), from.get("vnc:password"), from.containsKey("vnc:tls") + builder.vnc(new VNC(from.get("vnc:ip") == null ? "auto" : from.get("vnc:ip"), from.get("password"), from.containsKey("vnc:tls") && Boolean.valueOf(from.get("vnc:tls")))); diff --git a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/functions/ServerToMap.java b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/functions/ServerToMap.java index 724a56f6cc..490b0c40de 100644 --- a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/functions/ServerToMap.java +++ b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/functions/ServerToMap.java @@ -89,7 +89,7 @@ public class ServerToMap implements Function> { } if (from.getVnc().getPassword() != null) - builder.put("vnc:password", from.getVnc().getPassword()); + builder.put("password", from.getVnc().getPassword()); if (from.getVnc().isTls()) builder.put("vnc:tls", "on"); if (from.getTags().size() != 0) diff --git a/apis/elasticstack/src/test/java/org/jclouds/elasticstack/functions/ServerToMapTest.java b/apis/elasticstack/src/test/java/org/jclouds/elasticstack/functions/ServerToMapTest.java index a27eb3b397..ed73cd7f30 100644 --- a/apis/elasticstack/src/test/java/org/jclouds/elasticstack/functions/ServerToMapTest.java +++ b/apis/elasticstack/src/test/java/org/jclouds/elasticstack/functions/ServerToMapTest.java @@ -58,7 +58,7 @@ public class ServerToMapTest { "08c92dd5-70a0-4f51-83d2-835919d254df")) .putAll( ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc:ip", "auto", - "vnc:password", "XXXXXXXX")).build()); + "password", "XXXXXXXX")).build()); } public void testWeDontSetMac() { @@ -82,7 +82,7 @@ public class ServerToMapTest { "08c92dd5-70a0-4f51-83d2-835919d254df")) .putAll( ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc:ip", "auto", - "vnc:password", "XXXXXXXX")).build()); + "password", "XXXXXXXX")).build()); } public void testBasicsV2() { @@ -105,7 +105,7 @@ public class ServerToMapTest { "08c92dd5-70a0-4f51-83d2-835919d254df")) .putAll( ImmutableMap.of("ide:0:0:media", "disk", "nic:0:model", "e1000", "vnc", "auto", - "vnc:password", "XXXXXXXX")).build()); + "password", "XXXXXXXX")).build()); } } diff --git a/apis/elasticstack/src/test/resources/create_server.txt b/apis/elasticstack/src/test/resources/create_server.txt index 474d4d7ce1..e92e1380a6 100644 --- a/apis/elasticstack/src/test/resources/create_server.txt +++ b/apis/elasticstack/src/test/resources/create_server.txt @@ -8,4 +8,4 @@ ide:0:0 08c92dd5-70a0-4f51-83d2-835919d254df ide:0:0:media disk nic:0:model e1000 vnc:ip auto -vnc:password XXXXXXXX \ No newline at end of file +password XXXXXXXX \ No newline at end of file diff --git a/apis/elasticstack/src/test/resources/new_server.txt b/apis/elasticstack/src/test/resources/new_server.txt index 1dfbad99eb..35de6fda2c 100644 --- a/apis/elasticstack/src/test/resources/new_server.txt +++ b/apis/elasticstack/src/test/resources/new_server.txt @@ -1,6 +1,6 @@ ide:0:0:write:requests 0 boot ide:0:0 -vnc:password XXXXXXXX +password XXXXXXXX ide:0:0 403c9a86-0aab-4e47-aa95-e9768021c4c1 ide:0:0:read:requests 0 ide:0:0:read:bytes 0 diff --git a/apis/elasticstack/src/test/resources/new_server2.txt b/apis/elasticstack/src/test/resources/new_server2.txt index 5f2aabdd87..2fa1c21d66 100644 --- a/apis/elasticstack/src/test/resources/new_server2.txt +++ b/apis/elasticstack/src/test/resources/new_server2.txt @@ -1,6 +1,6 @@ ide:0:0:write:requests 0 boot ide:0:0 -vnc:password XXXXXXXX +password XXXXXXXX ide:0:0 403c9a86-0aab-4e47-aa95-e9768021c4c1 ide:0:0:read:requests 0 ide:0:0:read:bytes 0 diff --git a/apis/elasticstack/src/test/resources/server2.txt b/apis/elasticstack/src/test/resources/server2.txt index b3e91784f8..f290da41b6 100644 --- a/apis/elasticstack/src/test/resources/server2.txt +++ b/apis/elasticstack/src/test/resources/server2.txt @@ -1,6 +1,6 @@ ide:0:0:write:requests 3698 boot ide:0:0 -vnc:password HfHzVmLT +password HfHzVmLT ide:0:0 4af85ed3-0caa-4736-8a26-a33d7de0a122 ide:0:0:read:requests 11154 ide:0:0:read:bytes 45686784 @@ -28,7 +28,7 @@ status stopped name Demo mem 1024 boot ide:0:0 -vnc:password HWbjvrg2 +password HWbjvrg2 persistent true server 0f962616-2071-4173-be79-7dd084271edf smp auto diff --git a/apis/elasticstack/src/test/resources/servers.txt b/apis/elasticstack/src/test/resources/servers.txt index a3d1ff1b46..e6f33b5002 100644 --- a/apis/elasticstack/src/test/resources/servers.txt +++ b/apis/elasticstack/src/test/resources/servers.txt @@ -1,6 +1,6 @@ ide:0:0:write:requests 3698 boot ide:0:0 -vnc:password HfHzVmLT +password HfHzVmLT ide:0:0 4af85ed3-0caa-4736-8a26-a33d7de0a122 ide:0:0:read:requests 11154 ide:0:0:read:bytes 45686784 @@ -27,7 +27,7 @@ status stopped name Demo mem 1024 boot ide:0:0 -vnc:password HWbjvrg2 +password HWbjvrg2 persistent true server 0f962616-2071-4173-be79-7dd084271edf smp auto