From 39e21ad6528b2f156698934ac6690c1b234b5e8e Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sat, 16 Jun 2012 19:05:27 -0400 Subject: [PATCH] better name --- .../compute/functions/MachineInDatacenterToNodeMetadata.java | 4 ++-- .../main/java/org/jclouds/joyent/sdc/v6_5/domain/Machine.java | 4 ++-- .../sdc/v6_5/reference/{MetadataKeys.java => Metadata.java} | 4 ++-- .../joyent/sdc/v6_5/features/MachineClientLiveTest.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/reference/{MetadataKeys.java => Metadata.java} (96%) diff --git a/labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/compute/functions/MachineInDatacenterToNodeMetadata.java b/labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/compute/functions/MachineInDatacenterToNodeMetadata.java index d7aedde4d3..7d3482c49b 100644 --- a/labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/compute/functions/MachineInDatacenterToNodeMetadata.java +++ b/labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/compute/functions/MachineInDatacenterToNodeMetadata.java @@ -47,7 +47,7 @@ import org.jclouds.joyent.sdc.v6_5.domain.Machine; import org.jclouds.joyent.sdc.v6_5.domain.datacenterscoped.DatacenterAndId; import org.jclouds.joyent.sdc.v6_5.domain.datacenterscoped.DatacenterAndName; import org.jclouds.joyent.sdc.v6_5.domain.datacenterscoped.MachineInDatacenter; -import org.jclouds.joyent.sdc.v6_5.reference.MetadataKeys; +import org.jclouds.joyent.sdc.v6_5.reference.Metadata; import org.jclouds.logging.Logger; import org.jclouds.util.InetAddresses2; @@ -101,7 +101,7 @@ public class MachineInDatacenterToNodeMetadata implements Function { * If the value is a string, it will be quoted, as that's how json strings are represented. * * @return key to a json literal of the value - * @see MetadataKeys#valueType + * @see Metadata#valueType * @see Json#fromJson */ public Map getMetadataAsJsonLiterals() { diff --git a/labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/reference/MetadataKeys.java b/labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/reference/Metadata.java similarity index 96% rename from labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/reference/MetadataKeys.java rename to labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/reference/Metadata.java index 1d3a6577cf..8ad338c13b 100644 --- a/labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/reference/MetadataKeys.java +++ b/labs/joyent-sdc/src/main/java/org/jclouds/joyent/sdc/v6_5/reference/Metadata.java @@ -29,7 +29,7 @@ import com.google.common.reflect.TypeToken; * * @author Adrian Cole */ -public enum MetadataKeys { +public enum Metadata { ROOT_AUTHORIZED_KEYS(TypeToken.of(String.class).getType()), /** * If the dataset you create a machine from is set to generate passwords for @@ -49,7 +49,7 @@ public enum MetadataKeys { private final Type valueType; - MetadataKeys(Type valueType) { + Metadata(Type valueType) { this.valueType = valueType; } diff --git a/labs/joyent-sdc/src/test/java/org/jclouds/joyent/sdc/v6_5/features/MachineClientLiveTest.java b/labs/joyent-sdc/src/test/java/org/jclouds/joyent/sdc/v6_5/features/MachineClientLiveTest.java index 25477e150b..677860db53 100644 --- a/labs/joyent-sdc/src/test/java/org/jclouds/joyent/sdc/v6_5/features/MachineClientLiveTest.java +++ b/labs/joyent-sdc/src/test/java/org/jclouds/joyent/sdc/v6_5/features/MachineClientLiveTest.java @@ -33,7 +33,7 @@ import org.jclouds.joyent.sdc.v6_5.domain.Key; import org.jclouds.joyent.sdc.v6_5.domain.Machine; import org.jclouds.joyent.sdc.v6_5.internal.BaseSDCClientLiveTest; import org.jclouds.joyent.sdc.v6_5.options.CreateMachineOptions; -import org.jclouds.joyent.sdc.v6_5.reference.MetadataKeys; +import org.jclouds.joyent.sdc.v6_5.reference.Metadata; import org.jclouds.predicates.InetSocketAddressConnect; import org.jclouds.predicates.RetryablePredicate; import org.jclouds.ssh.SshClient; @@ -123,7 +123,7 @@ public class MachineClientLiveTest extends BaseSDCClientLiveTest { assertEquals(newMachine.getMetadata().get("foo").toString(), "bar"); assertTrue( - newMachine.getMetadata().get(MetadataKeys.ROOT_AUTHORIZED_KEYS.key()).indexOf(key.get("public")) != -1, + newMachine.getMetadata().get(Metadata.ROOT_AUTHORIZED_KEYS.key()).indexOf(key.get("public")) != -1, newMachine + "; key: " + key.get("public")); assertTrue(machineRunning.apply(newMachine), newMachine.toString());