default properties or something

This commit is contained in:
Andrew Donald Kennedy 2012-02-20 13:18:11 +00:00
parent e7416e8709
commit 29f26df137
5 changed files with 18 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/**
/*
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -54,4 +54,10 @@ public class VCloudDirectorConstants {
/** TODO javadoc */
public static final String PROPERTY_VCLOUD_XML_SCHEMA = "jclouds.vcloud.xml.schema";
/** TODO javadoc */
public static final String PROPERTY_VCLOUD_DNS_NAME_LEN_MIN = "jclouds.dns_name_length_min";
/** TODO javadoc */
public static final String PROPERTY_VCLOUD_DNS_NAME_LEN_MAX = "jclouds.dns_name_length_max";
}

View File

@ -1,4 +1,4 @@
/**
/*
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -42,14 +42,18 @@ public class VCloudDirectorPropertiesBuilder extends PropertiesBuilder {
properties.setProperty(PROPERTY_VCLOUD_XML_NAMESPACE,
String.format("http://www.vmware.com/vcloud/v${%s}", PROPERTY_VCLOUD_VERSION_SCHEMA));
properties.setProperty(PROPERTY_SESSION_INTERVAL, Integer.toString(8 * 60));
properties.setProperty(PROPERTY_VCLOUD_XML_SCHEMA, "https://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd");
properties.setProperty("jclouds.dns_name_length_min", "1");
properties.setProperty("jclouds.dns_name_length_max", "80");
properties.setProperty(PROPERTY_VCLOUD_XML_SCHEMA, PROPERTY_ENDPOINT + "/v1.5/schema/master.xsd");
properties.setProperty(PROPERTY_VCLOUD_DNS_NAME_LEN_MIN, "1");
properties.setProperty(PROPERTY_VCLOUD_DNS_NAME_LEN_MAX, "80");
// TODO integrate these with the {@link ComputeTimeouts} instead of having a single timeout for everything.
properties.setProperty(PROPERTY_VCLOUD_TIMEOUT_TASK_COMPLETED, Long.toString(1200l * 1000l));
properties.setProperty(PROPERTY_SESSION_INTERVAL, Integer.toString(300));
properties.setProperty(PROPERTY_VCLOUD_DEFAULT_CATALOG, "Public");
properties.setProperty(PROPERTY_VCLOUD_DEFAULT_VDC, "FIXME");
properties.setProperty(PROPERTY_VCLOUD_DEFAULT_NETWORK, "FIXME");
return properties;
}

View File

@ -1,4 +1,4 @@
/**
/*
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information

View File

@ -79,6 +79,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
@Test(testName = "GET /catalog/{id}")
public void testGetCatalog() {
// TODO use property from default property set
CatalogReferences catalogReferences = queryClient.catalogReferencesQuery(String.format("name==%s", catalogName));
assertEquals(Iterables.size(catalogReferences.getReferences()), 1, String.format(MUST_EXIST_FMT, catalogName, "Catalog"));
catalogRef = Iterables.getOnlyElement(catalogReferences.getReferences());

View File

@ -59,7 +59,7 @@ public class BaseVCloudDirectorClientLiveTest extends BaseVersionedServiceLiveTe
Properties overrides = setupProperties();
context = new RestContextFactory().createContext(provider, identity, credential,
ImmutableSet.<Module> of(new Log4JLoggingModule(), new SshjSshClientModule()), overrides);
successTester = new TaskSuccess(context, 1000L); // NOTE is this required?
// successTester = new TaskSuccess(context, 1000L); // NOTE is this required?
}
protected void tearDown() {