mirror of https://github.com/apache/jclouds.git
remove not-needed properties + vars
This commit is contained in:
parent
7d4f81a46c
commit
d91a8efe70
|
@ -112,11 +112,7 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
|
||||||
protected RestContext<VCloudDirectorClient, VCloudDirectorAsyncClient> context;
|
protected RestContext<VCloudDirectorClient, VCloudDirectorAsyncClient> context;
|
||||||
protected Session session;
|
protected Session session;
|
||||||
|
|
||||||
protected String catalogName;
|
|
||||||
protected String catalogId;
|
protected String catalogId;
|
||||||
protected String networkName;
|
|
||||||
protected String userName;
|
|
||||||
|
|
||||||
protected URI vAppTemplateURI;
|
protected URI vAppTemplateURI;
|
||||||
protected URI mediaURI;
|
protected URI mediaURI;
|
||||||
protected URI networkURI;
|
protected URI networkURI;
|
||||||
|
@ -165,11 +161,8 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO change properties to URI, not id
|
// TODO change properties to URI, not id
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected void initTestParametersFromPropertiesOrLazyDiscover() {
|
protected void initTestParametersFromPropertiesOrLazyDiscover() {
|
||||||
catalogName = Strings.emptyToNull(System.getProperty("test." + provider + ".catalog-name"));
|
|
||||||
catalogId = Strings.emptyToNull(System.getProperty("test." + provider + ".catalog-id"));
|
catalogId = Strings.emptyToNull(System.getProperty("test." + provider + ".catalog-id"));
|
||||||
networkName = Strings.emptyToNull(System.getProperty("test." + provider + ".network-name"));
|
|
||||||
|
|
||||||
String vAppTemplateId = Strings.emptyToNull(System.getProperty("test." + provider + ".vapptemplate-id"));
|
String vAppTemplateId = Strings.emptyToNull(System.getProperty("test." + provider + ".vapptemplate-id"));
|
||||||
if (vAppTemplateId != null)
|
if (vAppTemplateId != null)
|
||||||
|
@ -191,11 +184,19 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
|
||||||
if (userId != null)
|
if (userId != null)
|
||||||
userURI = URI.create(endpoint + "/admin/user/" + userId);
|
userURI = URI.create(endpoint + "/admin/user/" + userId);
|
||||||
|
|
||||||
if (Iterables.any(Lists.newArrayList(catalogName, vAppTemplateURI, networkURI, vdcURI), Predicates.isNull())) {
|
if (Iterables.any(Lists.newArrayList(vAppTemplateURI, networkURI, vdcURI), Predicates.isNull())) {
|
||||||
Org thisOrg = context.getApi().getOrgClient().getOrg(
|
Org thisOrg = context.getApi().getOrgClient().getOrg(
|
||||||
Iterables.find(context.getApi().getOrgClient().getOrgList().getOrgs(),
|
Iterables.find(context.getApi().getOrgClient().getOrgList().getOrgs(),
|
||||||
ReferenceTypePredicates.<Reference> nameEquals(session.getOrg())).getHref());
|
ReferenceTypePredicates.<Reference> nameEquals(session.getOrg())).getHref());
|
||||||
|
|
||||||
|
//TODO: can we create new objects via (admin) operations instead of looking things up?
|
||||||
|
//TODO: lookup mediaURI, userURI
|
||||||
|
|
||||||
|
// FIXME: lookup vAppTemplate
|
||||||
|
// if (vAppTemplateURI == null)
|
||||||
|
// vAppTemplateURI = Iterables.find(context.getApi().getQueryClient().vAppTemplatesReferenceQueryAll(),
|
||||||
|
// ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.VDC)).getHref();
|
||||||
|
|
||||||
if (vdcURI == null)
|
if (vdcURI == null)
|
||||||
vdcURI = Iterables.find(thisOrg.getLinks(),
|
vdcURI = Iterables.find(thisOrg.getLinks(),
|
||||||
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.VDC)).getHref();
|
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.VDC)).getHref();
|
||||||
|
@ -204,14 +205,6 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
|
||||||
networkURI = Iterables.find(thisOrg.getLinks(),
|
networkURI = Iterables.find(thisOrg.getLinks(),
|
||||||
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.ORG_NETWORK)).getHref();
|
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.ORG_NETWORK)).getHref();
|
||||||
|
|
||||||
if (Strings.isNullOrEmpty(networkName))
|
|
||||||
networkName = Iterables.find(thisOrg.getLinks(),
|
|
||||||
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.ORG_NETWORK)).getName();
|
|
||||||
|
|
||||||
if (Strings.isNullOrEmpty(catalogName))
|
|
||||||
catalogName = Iterables.find(thisOrg.getLinks(),
|
|
||||||
ReferenceTypePredicates.<Link> typeEquals(VCloudDirectorMediaType.CATALOG)).getName();
|
|
||||||
|
|
||||||
// FIXME the URI should be opaque
|
// FIXME the URI should be opaque
|
||||||
if (Strings.isNullOrEmpty(catalogId)) {
|
if (Strings.isNullOrEmpty(catalogId)) {
|
||||||
String uri = Iterables.find(thisOrg.getLinks(),
|
String uri = Iterables.find(thisOrg.getLinks(),
|
||||||
|
|
Loading…
Reference in New Issue