* 'master' of https://github.com/kedardave/jclouds:
  override getorg for savvis because it doesnt show desired behavior for accept headers
  removed unnecessary code
This commit is contained in:
Adrian Cole 2011-01-19 10:03:33 -08:00
commit ec6d03ca37
3 changed files with 22 additions and 8 deletions

0
git Normal file
View File

View File

@ -19,9 +19,22 @@
package org.jclouds.savvis;
import javax.annotation.Nullable;
import javax.ws.rs.GET;
import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.ExceptionParser;
import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.rest.annotations.XMLResponseParser;
import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;
import org.jclouds.vcloud.CommonVCloudClient;
import org.jclouds.vcloud.VCloudExpressAsyncClient;
import org.jclouds.vcloud.domain.Org;
import org.jclouds.vcloud.filters.SetVCloudTokenCookie;
import org.jclouds.vcloud.functions.OrgNameToEndpoint;
import org.jclouds.vcloud.xml.OrgHandler;
import com.google.common.util.concurrent.ListenableFuture;
/**
* Provides access to Symphony VPDC resources via their REST API.
@ -32,5 +45,12 @@ import org.jclouds.vcloud.filters.SetVCloudTokenCookie;
*/
@RequestFilters(SetVCloudTokenCookie.class)
public interface SymphonyVPDCAsyncClient extends VCloudExpressAsyncClient {
/**
* @see CommonVCloudClient#getOrgNamed
*/
@GET
@XMLResponseParser(OrgHandler.class)
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
ListenableFuture<? extends Org> findOrgNamed(
@Nullable @EndpointParam(parser = OrgNameToEndpoint.class) String orgName);
}

View File

@ -49,17 +49,11 @@ public class SymphonyVPDCClientLiveTest extends VCloudExpressClientLiveTest {
restProperties.setProperty("savvis-symphony-vpdc.propertiesbuilder",
"org.jclouds.savvis.SymphonyVPDCPropertiesBuilder");
context = new ComputeServiceContextFactory(restProperties).createContext(provider, "kedar.dave", "gravSavvis1!",
context = new ComputeServiceContextFactory(restProperties).createContext(provider,
ImmutableSet.<Module> of(new Log4JLoggingModule()), overrides).getProviderSpecificContext();
System.out.println(context);
/*Properties overrides1 = new Properties();
ComputeServiceContext context1 =
new ComputeServiceContextFactory(restProperties).createContext(provider,"kedar.dave" ,"gravSavvis1!",ImmutableSet.<Module> of(new JschSshClientModule()), overrides1);
System.out.println(context1.getComputeService().listImages());
System.out.println(context1.getComputeService().listHardwareProfiles());*/
connection = context.getApi();
System.out.println(connection);
}