mirror of https://github.com/apache/jclouds.git
Merge branch 'master' of github.com:jclouds/jclouds into 1.5.x
* 'master' of github.com:jclouds/jclouds: better name
This commit is contained in:
commit
1511ddf248
|
@ -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<MachineInData
|
|||
@Override
|
||||
public boolean apply(String input) {
|
||||
// TODO make this more efficient
|
||||
for (MetadataKeys key : MetadataKeys.values())
|
||||
for (Metadata key : Metadata.values())
|
||||
if (key.key().equals(input))
|
||||
return false;
|
||||
return true;
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import org.jclouds.domain.JsonBall;
|
||||
import org.jclouds.joyent.sdc.v6_5.reference.MetadataKeys;
|
||||
import org.jclouds.joyent.sdc.v6_5.reference.Metadata;
|
||||
import org.jclouds.json.Json;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
|
@ -248,7 +248,7 @@ public class Machine implements Comparable<Machine> {
|
|||
* 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<String, String> getMetadataAsJsonLiterals() {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue