mirror of https://github.com/apache/jclouds.git
strip out proxying
This commit is contained in:
parent
c57a267dd9
commit
f7c35b7e61
|
@ -18,14 +18,11 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.features;
|
||||
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorLiveTestConstants.*;
|
||||
import static org.jclouds.vcloud.director.v1_5.domain.Checks.*;
|
||||
import static org.testng.Assert.*;
|
||||
import static org.jclouds.vcloud.director.v1_5.domain.Checks.checkTask;
|
||||
import static org.testng.Assert.assertFalse;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.MetadataEntry;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgList;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
|
@ -55,11 +52,11 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
|
||||
@Test(testName = "GET /tasksList/{id}")
|
||||
public void testGetTaskList() {
|
||||
orgList = getOrgList();
|
||||
orgList = context.getApi().getOrgClient().getOrgList();
|
||||
orgRef = Iterables.getFirst(orgList.getOrgs(), null);
|
||||
|
||||
// Call the method being tested
|
||||
taskList = getTaskList(orgRef);
|
||||
taskList = context.getApi().getTaskClient().getTaskList(orgRef);
|
||||
|
||||
// NOTE The environment MUST have ...
|
||||
|
||||
|
@ -76,7 +73,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
taskUri = Iterables.getFirst(taskList.getTasks(), null).getHref();
|
||||
|
||||
// Call the method being tested
|
||||
task = getTask(taskUri);
|
||||
task = context.getApi().getTaskClient().getTask(taskUri);
|
||||
|
||||
// Check required elements and attributes
|
||||
checkTask(task);
|
||||
|
@ -85,6 +82,6 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
@Test(testName = "GET /task/{id}/metadata/", dependsOnMethods = { "testGetTask" })
|
||||
public void testCancelTask() {
|
||||
// Call the method being tested
|
||||
cancelTask(taskUri);
|
||||
context.getApi().getTaskClient().cancelTask(taskUri);
|
||||
}
|
||||
}
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.internal;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.compute.BaseVersionedServiceLiveTest;
|
||||
|
@ -28,15 +27,6 @@ import org.jclouds.rest.RestContextFactory;
|
|||
import org.jclouds.sshj.config.SshjSshClientModule;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.MetadataEntry;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Org;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgList;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ReferenceType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.TasksList;
|
||||
import org.jclouds.vcloud.director.v1_5.features.OrgClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.TaskClient;
|
||||
import org.testng.annotations.AfterGroups;
|
||||
import org.testng.annotations.BeforeGroups;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -50,7 +40,7 @@ import com.google.inject.Module;
|
|||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live")
|
||||
public class BaseVCloudDirectorClientLiveTest extends BaseVersionedServiceLiveTest implements OrgClient, TaskClient {
|
||||
public class BaseVCloudDirectorClientLiveTest extends BaseVersionedServiceLiveTest {
|
||||
public BaseVCloudDirectorClientLiveTest() {
|
||||
provider = "vcloud-director";
|
||||
}
|
||||
|
@ -71,57 +61,4 @@ public class BaseVCloudDirectorClientLiveTest extends BaseVersionedServiceLiveTe
|
|||
context.close();
|
||||
}
|
||||
|
||||
|
||||
private final OrgClient orgClient = context.getApi().getOrgClient();
|
||||
private final TaskClient taskClient = context.getApi().getTaskClient();
|
||||
|
||||
/*
|
||||
* Proxying implementations of OrgClient.
|
||||
*/
|
||||
|
||||
/** @see OrgClient#getOrgList() */
|
||||
@Override
|
||||
public OrgList getOrgList() {
|
||||
return orgClient.getOrgList();
|
||||
}
|
||||
|
||||
/** @see OrgClient#getOrg(ReferenceType) */
|
||||
@Override
|
||||
public Org getOrg(ReferenceType<?> orgRef) {
|
||||
return orgClient.getOrg(orgRef);
|
||||
}
|
||||
|
||||
/** @see OrgClient#getOrgMetadata(ReferenceType) */
|
||||
@Override
|
||||
public Metadata getOrgMetadata(ReferenceType<?> orgRef) {
|
||||
return orgClient.getOrgMetadata(orgRef);
|
||||
}
|
||||
|
||||
/** @see OrgClient#getOrgMetadataEntry(ReferenceType, String) */
|
||||
@Override
|
||||
public MetadataEntry getOrgMetadataEntry(ReferenceType<?> orgRef, String key) {
|
||||
return orgClient.getOrgMetadataEntry(orgRef, key);
|
||||
}
|
||||
|
||||
/*
|
||||
* Proxying implementations of TaskClient.
|
||||
*/
|
||||
|
||||
/** @see TaskClient#getTaskList(ReferenceType) */
|
||||
@Override
|
||||
public TasksList getTaskList(ReferenceType<?> orgRef) {
|
||||
return taskClient.getTaskList(orgRef);
|
||||
}
|
||||
|
||||
/** @see TaskClient#getTask(URI) */
|
||||
@Override
|
||||
public Task getTask(URI taskUri) {
|
||||
return taskClient.getTask(taskUri);
|
||||
}
|
||||
|
||||
/** @see TaskClient#cancelTask(URI */
|
||||
@Override
|
||||
public void cancelTask(URI taskUri) {
|
||||
taskClient.cancelTask(taskUri);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue