corrected urls for savvis

This commit is contained in:
Adrian Cole 2012-03-05 16:36:37 -08:00
parent 076627d2bb
commit d50d70a397
52 changed files with 235 additions and 195 deletions

View File

@ -33,24 +33,10 @@
<description>jclouds components to access Savvis Symphony VPDC</description> <description>jclouds components to access Savvis Symphony VPDC</description>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<!-- bootstrapping: need to fetch the project POM -->
<repositories>
<repository>
<id>jclouds-sonatype-snapshots-nexus</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<properties> <properties>
<test.savvis-symphonyvpdc.endpoint>https://api.symphonyvpdc.savvis.net/vpdc</test.savvis-symphonyvpdc.endpoint> <test.savvis-symphonyvpdc.endpoint>https://api.savvis.net/vpdc</test.savvis-symphonyvpdc.endpoint>
<test.savvis-symphonyvpdc.api-version>1.0</test.savvis-symphonyvpdc.api-version> <test.savvis-symphonyvpdc.api-version>1.0</test.savvis-symphonyvpdc.api-version>
<test.savvis-symphonyvpdc.build-version></test.savvis-symphonyvpdc.build-version> <test.savvis-symphonyvpdc.build-version>2.3</test.savvis-symphonyvpdc.build-version>
<test.savvis-symphonyvpdc.identity>FIXME</test.savvis-symphonyvpdc.identity> <test.savvis-symphonyvpdc.identity>FIXME</test.savvis-symphonyvpdc.identity>
<test.savvis-symphonyvpdc.credential>FIXME</test.savvis-symphonyvpdc.credential> <test.savvis-symphonyvpdc.credential>FIXME</test.savvis-symphonyvpdc.credential>
<test.savvis-symphonyvpdc.image-id></test.savvis-symphonyvpdc.image-id> <test.savvis-symphonyvpdc.image-id></test.savvis-symphonyvpdc.image-id>

View File

@ -94,7 +94,7 @@ public class SavvisSymphonyVPDCProviderMetadata extends BaseProviderMetadata {
*/ */
@Override @Override
public URI getApiDocumentation() { public URI getApiDocumentation() {
return URI.create("https://api.symphonyvpdc.savvis.net/doc/spec/api/index.html"); return URI.create("https://api.savvis.net/doc/spec/api/index.html");
} }
/** /**

View File

@ -36,7 +36,7 @@ import com.google.inject.Provides;
* <p/> * <p/>
* *
* @see VPDCClient * @see VPDCClient
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/index.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/index.html" />
* @author Adrian Cole * @author Adrian Cole
*/ */
public interface VPDCAsyncClient { public interface VPDCAsyncClient {
@ -78,7 +78,7 @@ public interface VPDCAsyncClient {
* /savvis-symphonyvpdc/predefined_operatingsystems.json} * /savvis-symphonyvpdc/predefined_operatingsystems.json}
* *
* @return the operating systems that are predefined in the provider * @return the operating systems that are predefined in the provider
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/addSingleVM.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/addSingleVM.html" />
*/ */
@Provides @Provides
Set<CIMOperatingSystem> listPredefinedOperatingSystems(); Set<CIMOperatingSystem> listPredefinedOperatingSystems();

View File

@ -35,7 +35,7 @@ import org.jclouds.savvis.vpdc.features.VMClient;
* <p/> * <p/>
* *
* @see VPDCAsyncClient * @see VPDCAsyncClient
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/index.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/index.html" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) @Timeout(duration = 60, timeUnit = TimeUnit.SECONDS)
@ -76,7 +76,7 @@ public interface VPDCClient {
* /savvis-symphonyvpdc/predefined_operatingsystems.json} * /savvis-symphonyvpdc/predefined_operatingsystems.json}
* *
* @return the operating systems that are predefined in the provider * @return the operating systems that are predefined in the provider
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/addSingleVM.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/addSingleVM.html" />
*/ */
Set<CIMOperatingSystem> listPredefinedOperatingSystems(); Set<CIMOperatingSystem> listPredefinedOperatingSystems();
} }

View File

@ -19,6 +19,7 @@
package org.jclouds.savvis.vpdc; package org.jclouds.savvis.vpdc;
import static org.jclouds.Constants.PROPERTY_API_VERSION; import static org.jclouds.Constants.PROPERTY_API_VERSION;
import static org.jclouds.Constants.PROPERTY_BUILD_VERSION;
import static org.jclouds.Constants.PROPERTY_ENDPOINT; import static org.jclouds.Constants.PROPERTY_ENDPOINT;
import static org.jclouds.savvis.vpdc.reference.VPDCConstants.PROPERTY_VPDC_TIMEOUT_TASK_COMPLETED; import static org.jclouds.savvis.vpdc.reference.VPDCConstants.PROPERTY_VPDC_TIMEOUT_TASK_COMPLETED;
@ -36,7 +37,8 @@ public class VPDCPropertiesBuilder extends PropertiesBuilder {
protected Properties defaultProperties() { protected Properties defaultProperties() {
Properties properties = super.defaultProperties(); Properties properties = super.defaultProperties();
properties.setProperty(PROPERTY_API_VERSION, "1.0"); properties.setProperty(PROPERTY_API_VERSION, "1.0");
properties.setProperty(PROPERTY_ENDPOINT, "https://api.symphonyvpdc.savvis.net/vpdc"); properties.setProperty(PROPERTY_BUILD_VERSION, "2.3");
properties.setProperty(PROPERTY_ENDPOINT, "https://api.savvis.net/vpdc");
properties.setProperty(PROPERTY_VPDC_TIMEOUT_TASK_COMPLETED, 600l * 1000l + ""); properties.setProperty(PROPERTY_VPDC_TIMEOUT_TASK_COMPLETED, 600l * 1000l + "");
return properties; return properties;
} }

View File

@ -97,7 +97,7 @@ public class BindCaptureVAppTemplateToXmlPayload extends BindToStringPayload imp
protected XMLBuilder buildRoot() throws ParserConfigurationException, FactoryConfigurationError { protected XMLBuilder buildRoot() throws ParserConfigurationException, FactoryConfigurationError {
XMLBuilder rootBuilder = XMLBuilder.create("CaptureVAppParams") XMLBuilder rootBuilder = XMLBuilder.create("CaptureVAppParams")
.a("xmlns", "http://schemas.api.sandbox.symphonyVPDC.savvis.net/vpdci") .a("xmlns", "http://schemas.api.sandbox.savvis.net/vpdci")
.a("name", "CaptureTemplate"); .a("name", "CaptureTemplate");
return rootBuilder; return rootBuilder;
} }

View File

@ -106,7 +106,7 @@ public class BindCloneVMToXmlPayload extends BindToStringPayload implements MapB
.a("name", newVAppName) .a("name", newVAppName)
.a("deploy" , "true") .a("deploy" , "true")
.a("powerOn" , "true") .a("powerOn" , "true")
.a("xsi:schemaLocation", "http://www.vmware.com/vcloud/v0.8 https://api.symphonyvpdc.savvis.net/ns/vcloud.xsd"); .a("xsi:schemaLocation", "http://www.vmware.com/vcloud/v0.8 https://api.savvis.net/ns/vcloud.xsd");
return rootBuilder; return rootBuilder;
} }

View File

@ -110,7 +110,7 @@ public class BindFirewallRuleToXmlPayload extends BindToStringPayload implements
.a("xmlns:rasd", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData") .a("xmlns:rasd", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData")
.a("xmlns:vssd", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData") .a("xmlns:vssd", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData")
.a("xmlns:ovf", "http://schemas.dmtf.org/ovf/envelope/1") .a("xmlns:ovf", "http://schemas.dmtf.org/ovf/envelope/1")
.a("xmlns:svvs", "http://schemas.api.sandbox.symphonyVPDC.savvis.net/vpdci"); .a("xmlns:svvs", "http://schemas.api.sandbox.savvis.net/vpdci");
return rootBuilder; return rootBuilder;
} }

View File

@ -20,16 +20,14 @@ package org.jclouds.savvis.vpdc.config;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Throwables.propagate;
import static org.jclouds.Constants.PROPERTY_IDENTITY; import static org.jclouds.Constants.PROPERTY_IDENTITY;
import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL;
import static org.jclouds.rest.config.BinderUtils.bindClientAndAsyncClient;
import static org.jclouds.savvis.vpdc.reference.VPDCConstants.PROPERTY_VPDC_TIMEOUT_TASK_COMPLETED; import static org.jclouds.savvis.vpdc.reference.VPDCConstants.PROPERTY_VPDC_TIMEOUT_TASK_COMPLETED;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Singleton; import javax.inject.Singleton;
@ -43,13 +41,10 @@ import org.jclouds.json.Json;
import org.jclouds.location.Provider; import org.jclouds.location.Provider;
import org.jclouds.location.suppliers.ImplicitLocationSupplier; import org.jclouds.location.suppliers.ImplicitLocationSupplier;
import org.jclouds.predicates.RetryablePredicate; import org.jclouds.predicates.RetryablePredicate;
import org.jclouds.rest.AsyncClientFactory;
import org.jclouds.rest.AuthorizationException;
import org.jclouds.rest.config.RestClientModule; import org.jclouds.rest.config.RestClientModule;
import org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier; import org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier;
import org.jclouds.savvis.vpdc.VPDCAsyncClient; import org.jclouds.savvis.vpdc.VPDCAsyncClient;
import org.jclouds.savvis.vpdc.VPDCClient; import org.jclouds.savvis.vpdc.VPDCClient;
import org.jclouds.savvis.vpdc.domain.Resource;
import org.jclouds.savvis.vpdc.domain.internal.VCloudSession; import org.jclouds.savvis.vpdc.domain.internal.VCloudSession;
import org.jclouds.savvis.vpdc.features.BrowsingAsyncClient; import org.jclouds.savvis.vpdc.features.BrowsingAsyncClient;
import org.jclouds.savvis.vpdc.features.BrowsingClient; import org.jclouds.savvis.vpdc.features.BrowsingClient;
@ -61,13 +56,16 @@ import org.jclouds.savvis.vpdc.features.VMAsyncClient;
import org.jclouds.savvis.vpdc.features.VMClient; import org.jclouds.savvis.vpdc.features.VMClient;
import org.jclouds.savvis.vpdc.handlers.VPDCErrorHandler; import org.jclouds.savvis.vpdc.handlers.VPDCErrorHandler;
import org.jclouds.savvis.vpdc.internal.LoginAsyncClient; import org.jclouds.savvis.vpdc.internal.LoginAsyncClient;
import org.jclouds.savvis.vpdc.internal.LoginClient;
import org.jclouds.savvis.vpdc.internal.VCloudToken; import org.jclouds.savvis.vpdc.internal.VCloudToken;
import org.jclouds.savvis.vpdc.location.FirstNetwork; import org.jclouds.savvis.vpdc.location.FirstNetwork;
import org.jclouds.savvis.vpdc.predicates.TaskSuccess; import org.jclouds.savvis.vpdc.predicates.TaskSuccess;
import org.jclouds.util.Strings2; import org.jclouds.util.Strings2;
import com.google.common.base.Function;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.inject.Injector; import com.google.inject.Injector;
@ -81,36 +79,56 @@ import com.google.inject.TypeLiteral;
* *
*/ */
public class VPDCRestClientModule extends RestClientModule<VPDCClient, VPDCAsyncClient> { public class VPDCRestClientModule extends RestClientModule<VPDCClient, VPDCAsyncClient> {
@Provides @Override
@Singleton protected void configure() {
protected LoginAsyncClient provideVCloudVersions(AsyncClientFactory factory) { super.configure();
return factory.create(LoginAsyncClient.class); bindClientAndAsyncClient(binder(), LoginClient.class, LoginAsyncClient.class);
} }
@VCloudToken @VCloudToken
@Provides @Provides
String provideVCloudToken(Supplier<VCloudSession> cache) { @Singleton
return checkNotNull(cache.get().getVCloudToken(), "No token present in session"); protected Supplier<String> provideVCloudToken(Supplier<VCloudSession> cache) {
return Suppliers.compose(new Function<VCloudSession, String>() {
@Override
public String apply(VCloudSession input) {
return checkNotNull(input.getVCloudToken(), "No token present in session");
}
}, cache);
} }
@Provides @Provides
@org.jclouds.savvis.vpdc.internal.Org @org.jclouds.savvis.vpdc.internal.Org
@Singleton @Singleton
protected Set<org.jclouds.savvis.vpdc.domain.Resource> provideOrgs(Supplier<VCloudSession> cache, protected Supplier<Set<org.jclouds.savvis.vpdc.domain.Resource>> provideOrgs(Supplier<VCloudSession> cache,
@Named(PROPERTY_IDENTITY) String user) { @Named(PROPERTY_IDENTITY) final String user) {
VCloudSession discovery = cache.get(); return Suppliers.compose(new Function<VCloudSession, Set<org.jclouds.savvis.vpdc.domain.Resource>>() {
checkState(discovery.getOrgs().size() > 0, "No orgs present for user: " + user);
return discovery.getOrgs(); @Override
public Set<org.jclouds.savvis.vpdc.domain.Resource> apply(VCloudSession input) {
checkState(input.getOrgs().size() > 0, "No orgs present for user: " + user);
return input.getOrgs();
}
}, cache);
} }
@Provides @Provides
@org.jclouds.savvis.vpdc.internal.Org @org.jclouds.savvis.vpdc.internal.Org
@Singleton @Singleton
protected String provideDefaultOrgId(@org.jclouds.savvis.vpdc.internal.Org Set<Resource> orgs) { protected Supplier<String> provideDefaultOrgId(
return Iterables.get(orgs, 0).getId(); @org.jclouds.savvis.vpdc.internal.Org Supplier<Set<org.jclouds.savvis.vpdc.domain.Resource>> orgs) {
} return Suppliers.compose(new Function<Set<org.jclouds.savvis.vpdc.domain.Resource>, String>() {
protected AtomicReference<AuthorizationException> authException = new AtomicReference<AuthorizationException>(); @Override
public String apply(Set<org.jclouds.savvis.vpdc.domain.Resource> input) {
return Iterables.get(input, 0).getId();
}
}, orgs);
}
@Provides @Provides
@Singleton @Singleton
@ -142,19 +160,13 @@ public class VPDCRestClientModule extends RestClientModule<VPDCClient, VPDCAsync
@Provides @Provides
@Singleton @Singleton
protected Supplier<VCloudSession> provideVCloudTokenCache(@Named(PROPERTY_SESSION_INTERVAL) long seconds, protected Supplier<VCloudSession> provideVCloudTokenCache(@Named(PROPERTY_SESSION_INTERVAL) long seconds,
final LoginAsyncClient login) { final LoginClient login) {
return new MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier<VCloudSession>(authException, seconds, return new MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier<VCloudSession>(authException, seconds,
new Supplier<VCloudSession>() { new Supplier<VCloudSession>() {
@Override @Override
public VCloudSession get() { public VCloudSession get() {
try { return login.login();
return login.login().get();
} catch (Exception e) {
propagate(e);
assert false : e;
return null;
}
} }
}); });
@ -166,10 +178,11 @@ public class VPDCRestClientModule extends RestClientModule<VPDCClient, VPDCAsync
bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(VPDCErrorHandler.class); bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(VPDCErrorHandler.class);
bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(VPDCErrorHandler.class); bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(VPDCErrorHandler.class);
} }
@Override @Override
protected void installLocations() { protected void installLocations() {
super.installLocations(); super.installLocations();
bind(ImplicitLocationSupplier.class).to(FirstNetwork.class).in(Scopes.SINGLETON); bind(ImplicitLocationSupplier.class).to(FirstNetwork.class).in(Scopes.SINGLETON);
} }
} }

View File

@ -30,7 +30,7 @@ import org.jclouds.javax.annotation.Nullable;
* and returns its URL to the client. The client can use this URL in a subsequent GET request to * and returns its URL to the client. The client can use this URL in a subsequent GET request to
* obtain the current status of the task. * obtain the current status of the task.
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/getTask.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/getTask.html" />
*/ */
public class Task extends ResourceImpl { public class Task extends ResourceImpl {
public static Builder builder() { public static Builder builder() {

View File

@ -55,7 +55,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides access to Symphony VPDC resources via their REST API. * Provides access to Symphony VPDC resources via their REST API.
* <p/> * <p/>
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/index.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/index.html" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@RequestFilters(SetVCloudTokenCookie.class) @RequestFilters(SetVCloudTokenCookie.class)

View File

@ -36,7 +36,7 @@ import org.jclouds.savvis.vpdc.options.GetVMOptions;
* Provides access to Symphony VPDC resources via their REST API. * Provides access to Symphony VPDC resources via their REST API.
* <p/> * <p/>
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS)

View File

@ -44,7 +44,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides access to Symphony VPDC resources via their REST API. * Provides access to Symphony VPDC resources via their REST API.
* <p/> * <p/>
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/index.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/index.html" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@RequestFilters(SetVCloudTokenCookie.class) @RequestFilters(SetVCloudTokenCookie.class)

View File

@ -28,7 +28,7 @@ import org.jclouds.savvis.vpdc.domain.Task;
* Provides access to Symphony VPDC resources via their REST API. * Provides access to Symphony VPDC resources via their REST API.
* <p/> * <p/>
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS)

View File

@ -40,7 +40,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides access to Symphony VPDC resources via their REST API. * Provides access to Symphony VPDC resources via their REST API.
* <p/> * <p/>
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/index.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/index.html" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@RequestFilters(SetVCloudTokenCookie.class) @RequestFilters(SetVCloudTokenCookie.class)

View File

@ -28,7 +28,7 @@ import org.jclouds.savvis.vpdc.domain.Task;
* Provides access to Symphony VPDC resources via their REST API. * Provides access to Symphony VPDC resources via their REST API.
* <p/> * <p/>
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS)

View File

@ -53,7 +53,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides access to Symphony VPDC resources via their REST API. * Provides access to Symphony VPDC resources via their REST API.
* <p/> * <p/>
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/index.html" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/index.html" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@RequestFilters(SetVCloudTokenCookie.class) @RequestFilters(SetVCloudTokenCookie.class)

View File

@ -30,7 +30,7 @@ import org.jclouds.savvis.vpdc.domain.VMSpec;
* Provides access to Symphony VPDC resources via their REST API. * Provides access to Symphony VPDC resources via their REST API.
* <p/> * <p/>
* *
* @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/" /> * @see <a href="https://api.sandbox.savvis.net/doc/spec/api/" />
* @author Adrian Cole * @author Adrian Cole
*/ */
@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS)

View File

@ -19,7 +19,6 @@
package org.jclouds.savvis.vpdc.filters; package org.jclouds.savvis.vpdc.filters;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.HttpHeaders;
@ -29,6 +28,8 @@ import org.jclouds.http.HttpRequestFilter;
import org.jclouds.http.utils.ModifyRequest; import org.jclouds.http.utils.ModifyRequest;
import org.jclouds.savvis.vpdc.internal.VCloudToken; import org.jclouds.savvis.vpdc.internal.VCloudToken;
import com.google.common.base.Supplier;
/** /**
* Adds the VCloud Token to the request as a cookie * Adds the VCloud Token to the request as a cookie
* *
@ -37,10 +38,10 @@ import org.jclouds.savvis.vpdc.internal.VCloudToken;
*/ */
@Singleton @Singleton
public class SetVCloudTokenCookie implements HttpRequestFilter { public class SetVCloudTokenCookie implements HttpRequestFilter {
private Provider<String> vcloudTokenProvider; private Supplier<String> vcloudTokenProvider;
@Inject @Inject
public SetVCloudTokenCookie(@VCloudToken Provider<String> authTokenProvider) { public SetVCloudTokenCookie(@VCloudToken Supplier<String> authTokenProvider) {
this.vcloudTokenProvider = authTokenProvider; this.vcloudTokenProvider = authTokenProvider;
} }

View File

@ -21,11 +21,11 @@ package org.jclouds.savvis.vpdc.functions;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Provider;
import org.jclouds.savvis.vpdc.internal.Org; import org.jclouds.savvis.vpdc.internal.Org;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Supplier;
/** /**
* *
@ -33,10 +33,10 @@ import com.google.common.base.Function;
*/ */
public class DefaultOrgIfNull implements Function<Object, String> { public class DefaultOrgIfNull implements Function<Object, String> {
private Provider<String> defaultOrg; private final Supplier<String> defaultOrg;
@Inject @Inject
public DefaultOrgIfNull(@Org Provider<String> defaultOrg) { public DefaultOrgIfNull(@Org Supplier<String> defaultOrg) {
this.defaultOrg = checkNotNull(defaultOrg, "defaultOrg"); this.defaultOrg = checkNotNull(defaultOrg, "defaultOrg");
} }

View File

@ -0,0 +1,37 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.savvis.vpdc.internal;
import java.util.concurrent.TimeUnit;
import org.jclouds.concurrent.Timeout;
import org.jclouds.savvis.vpdc.domain.internal.VCloudSession;
/**
* @author Adrian Cole
*/
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
public interface LoginClient {
/**
* This request returns a token to use in subsequent requests. After 30 minutes of inactivity,
* the token expires and you have to request a new token with this call.
*/
VCloudSession login();
}

View File

@ -33,7 +33,7 @@ package org.jclouds.savvis.vpdc.options;
* <code> * <code>
* *
* @author Adrian Cole * @author Adrian Cole
* @see <a href= "https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/getVAppPowerState.html" * @see <a href= "https://api.sandbox.savvis.net/doc/spec/api/getVAppPowerState.html"
* /> * />
*/ */
public class GetVMOptions { public class GetVMOptions {

View File

@ -37,7 +37,7 @@ public class BindCaptureVAppTemplateToXmlPayloadTest {
public void test() throws IOException { public void test() throws IOException {
String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/capture-vapp-template-default.xml")); String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/capture-vapp-template-default.xml"));
URI vAppURI = URI.create("https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001"); URI vAppURI = URI.create("https://api.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001");
String xml = new BindCaptureVAppTemplateToXmlPayload().generateXml(vAppURI); String xml = new BindCaptureVAppTemplateToXmlPayload().generateXml(vAppURI);
System.out.println(xml); System.out.println(xml);

View File

@ -36,7 +36,7 @@ public class BindCloneVAppToXmlPayloadTest {
public void test() throws IOException { public void test() throws IOException {
String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/cloneVApp-default.xml")); String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/cloneVApp-default.xml"));
URI vAppURI = URI.create("https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001"); URI vAppURI = URI.create("https://api.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001");
String xml = new BindCloneVMToXmlPayload().generateXml(vAppURI, "clonedvm", "VM Tier01"); String xml = new BindCloneVMToXmlPayload().generateXml(vAppURI, "clonedvm", "VM Tier01");
System.out.println(xml); System.out.println(xml);

View File

@ -40,7 +40,7 @@ import org.jclouds.savvis.vpdc.domain.Resource;
import org.jclouds.savvis.vpdc.domain.ResourceImpl; import org.jclouds.savvis.vpdc.domain.ResourceImpl;
import org.jclouds.savvis.vpdc.domain.internal.VCloudSession; import org.jclouds.savvis.vpdc.domain.internal.VCloudSession;
import org.jclouds.savvis.vpdc.filters.SetVCloudTokenCookie; import org.jclouds.savvis.vpdc.filters.SetVCloudTokenCookie;
import org.jclouds.savvis.vpdc.internal.LoginAsyncClient; import org.jclouds.savvis.vpdc.internal.LoginClient;
import org.jclouds.savvis.vpdc.reference.VCloudMediaType; import org.jclouds.savvis.vpdc.reference.VCloudMediaType;
import org.jclouds.savvis.vpdc.reference.VPDCConstants; import org.jclouds.savvis.vpdc.reference.VPDCConstants;
@ -77,13 +77,13 @@ public abstract class BaseVPDCAsyncClientTest<T> extends RestClientTest<T> {
@Override @Override
protected Supplier<VCloudSession> provideVCloudTokenCache(@Named(PROPERTY_SESSION_INTERVAL) long seconds, protected Supplier<VCloudSession> provideVCloudTokenCache(@Named(PROPERTY_SESSION_INTERVAL) long seconds,
final LoginAsyncClient login) { final LoginClient login) {
return Suppliers.<VCloudSession> ofInstance(new VCloudSession() { return Suppliers.<VCloudSession> ofInstance(new VCloudSession() {
@Override @Override
public Set<Resource> getOrgs() { public Set<Resource> getOrgs() {
return ImmutableSet.<Resource> of(new ResourceImpl("1", "org", VCloudMediaType.ORG_XML, URI return ImmutableSet.<Resource> of(new ResourceImpl("1", "org", VCloudMediaType.ORG_XML, URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/1"))); .create("https://api.savvis.net/rest/api/v0.8/org/1")));
} }
@Override @Override

View File

@ -49,7 +49,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
Method method = BrowsingAsyncClient.class.getMethod("getOrg", String.class); Method method = BrowsingAsyncClient.class.getMethod("getOrg", String.class);
HttpRequest request = processor.createRequest(method, "11"); HttpRequest request = processor.createRequest(method, "11");
assertRequestLineEquals(request, "GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11 HTTP/1.1"); assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/11 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -64,7 +64,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
Method method = BrowsingAsyncClient.class.getMethod("getOrg", String.class); Method method = BrowsingAsyncClient.class.getMethod("getOrg", String.class);
HttpRequest request = processor.createRequest(method, (String) null); HttpRequest request = processor.createRequest(method, (String) null);
assertRequestLineEquals(request, "GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/1 HTTP/1.1"); assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/1 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -79,7 +79,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
Method method = BrowsingAsyncClient.class.getMethod("getVDCInOrg", String.class, String.class); Method method = BrowsingAsyncClient.class.getMethod("getVDCInOrg", String.class, String.class);
HttpRequest request = processor.createRequest(method, "11", "22"); HttpRequest request = processor.createRequest(method, "11", "22");
assertRequestLineEquals(request, "GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22 HTTP/1.1"); assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -94,7 +94,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
Method method = BrowsingAsyncClient.class.getMethod("getVDCInOrg", String.class, String.class); Method method = BrowsingAsyncClient.class.getMethod("getVDCInOrg", String.class, String.class);
HttpRequest request = processor.createRequest(method, (String) null, "22"); HttpRequest request = processor.createRequest(method, (String) null, "22");
assertRequestLineEquals(request, "GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/1/vdc/22 HTTP/1.1"); assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/1/vdc/22 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -110,7 +110,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
HttpRequest request = processor.createRequest(method, "11", "22", "VM-Tier01"); HttpRequest request = processor.createRequest(method, "11", "22", "VM-Tier01");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/network/VM-Tier01 HTTP/1.1"); "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/network/VM-Tier01 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -126,7 +126,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
HttpRequest request = processor.createRequest(method, (String) null, "22", "VM-Tier01"); HttpRequest request = processor.createRequest(method, (String) null, "22", "VM-Tier01");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/1/vdc/22/network/VM-Tier01 HTTP/1.1"); "GET https://api.savvis.net/vpdc/v1.0/org/1/vdc/22/network/VM-Tier01 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -143,7 +143,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
HttpRequest request = processor.createRequest(method, "11", "22", "33"); HttpRequest request = processor.createRequest(method, "11", "22", "33");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1"); "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -157,10 +157,10 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
public void testVM() throws SecurityException, NoSuchMethodException, IOException { public void testVM() throws SecurityException, NoSuchMethodException, IOException {
Method method = BrowsingAsyncClient.class.getMethod("getVM", URI.class, GetVMOptions[].class); Method method = BrowsingAsyncClient.class.getMethod("getVM", URI.class, GetVMOptions[].class);
HttpRequest request = processor.createRequest(method, URI HttpRequest request = processor.createRequest(method, URI
.create("https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33")); .create("https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33"));
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1"); "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -178,7 +178,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
.withPowerState()); .withPowerState());
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/VM-Tier01/withpowerstate HTTP/1.1"); "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/VM-Tier01/withpowerstate HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -195,7 +195,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
HttpRequest request = processor.createRequest(method, (String) null, "22", "VM-Tier01"); HttpRequest request = processor.createRequest(method, (String) null, "22", "VM-Tier01");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/1/vdc/22/vApp/VM-Tier01 HTTP/1.1"); "GET https://api.savvis.net/vpdc/v1.0/org/1/vdc/22/vApp/VM-Tier01 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -210,7 +210,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
Method method = BrowsingAsyncClient.class.getMethod("getTask", String.class); Method method = BrowsingAsyncClient.class.getMethod("getTask", String.class);
HttpRequest request = processor.createRequest(method, "1"); HttpRequest request = processor.createRequest(method, "1");
assertRequestLineEquals(request, "GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/task/1 HTTP/1.1"); assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/task/1 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -226,7 +226,7 @@ public class BrowsingAsyncClientTest extends BaseVPDCAsyncClientTest<BrowsingAsy
HttpRequest request = processor.createRequest(method, "11", "22"); HttpRequest request = processor.createRequest(method, "11", "22");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/FirewallService HTTP/1.1"); "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/FirewallService HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);

View File

@ -48,7 +48,7 @@ public class FirewallAsyncClientTest extends BaseVPDCAsyncClientTest<FirewallAsy
"Tcp").policy("allow").description("Server Tier Firewall Rule").isLogged(false).build()); "Tcp").policy("allow").description("Server Tier Firewall Rule").isLogged(false).build());
assertRequestLineEquals(request, assertRequestLineEquals(request,
"PUT https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/FirewallService HTTP/1.1"); "PUT https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/FirewallService HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream( assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream(
"/firewallService-default.xml")), "application/xml", false); "/firewallService-default.xml")), "application/xml", false);
@ -67,7 +67,7 @@ public class FirewallAsyncClientTest extends BaseVPDCAsyncClientTest<FirewallAsy
"Tcp").policy("allow").description("Server Tier Firewall Rule").isLogged(false).build()); "Tcp").policy("allow").description("Server Tier Firewall Rule").isLogged(false).build());
assertRequestLineEquals(request, assertRequestLineEquals(request,
"DELETE https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/FirewallService HTTP/1.1"); "DELETE https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/FirewallService HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream( assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream(
"/firewallService-default.xml")), "application/xml", false); "/firewallService-default.xml")), "application/xml", false);

View File

@ -51,7 +51,7 @@ public class ServiceManagementAsyncClientTest extends BaseVPDCAsyncClientTest<Se
HttpRequest request = processor.createRequest(method, "11", "22", "33"); HttpRequest request = processor.createRequest(method, "11", "22", "33");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"POST https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1"); "POST https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -65,10 +65,10 @@ public class ServiceManagementAsyncClientTest extends BaseVPDCAsyncClientTest<Se
public void testPowerOnVM() throws SecurityException, NoSuchMethodException, IOException { public void testPowerOnVM() throws SecurityException, NoSuchMethodException, IOException {
Method method = ServiceManagementAsyncClient.class.getMethod("powerOnVM", URI.class); Method method = ServiceManagementAsyncClient.class.getMethod("powerOnVM", URI.class);
HttpRequest request = processor.createRequest(method, URI HttpRequest request = processor.createRequest(method, URI
.create("https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33")); .create("https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33"));
assertRequestLineEquals(request, assertRequestLineEquals(request,
"POST https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1"); "POST https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -85,7 +85,7 @@ public class ServiceManagementAsyncClientTest extends BaseVPDCAsyncClientTest<Se
HttpRequest request = processor.createRequest(method, "11", "22", "33"); HttpRequest request = processor.createRequest(method, "11", "22", "33");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"POST https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1"); "POST https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -99,10 +99,10 @@ public class ServiceManagementAsyncClientTest extends BaseVPDCAsyncClientTest<Se
public void testPowerOffVM() throws SecurityException, NoSuchMethodException, IOException { public void testPowerOffVM() throws SecurityException, NoSuchMethodException, IOException {
Method method = ServiceManagementAsyncClient.class.getMethod("powerOffVM", URI.class); Method method = ServiceManagementAsyncClient.class.getMethod("powerOffVM", URI.class);
HttpRequest request = processor.createRequest(method, URI HttpRequest request = processor.createRequest(method, URI
.create("https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33")); .create("https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33"));
assertRequestLineEquals(request, assertRequestLineEquals(request,
"POST https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1"); "POST https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);

View File

@ -64,11 +64,11 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
}); });
HttpRequest request = processor.createRequest(method, URI HttpRequest request = processor.createRequest(method, URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22"), VMSpec.builder().name( .create("https://api.savvis.net/rest/api/v0.8/org/11/vdc/22"), VMSpec.builder().name(
"DemoHost-1").networkTierName("VM Tier01").operatingSystem(os).build()); "DemoHost-1").networkTierName("VM Tier01").operatingSystem(os).build());
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/ HTTP/1.1"); "GET https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/vm-default.xml")), assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/vm-default.xml")),
"application/xml", false); "application/xml", false);
@ -96,7 +96,7 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
HttpRequest request = processor.createRequest(method, "11", "22", VMSpec.builder().operatingSystem(os).name( HttpRequest request = processor.createRequest(method, "11", "22", VMSpec.builder().operatingSystem(os).name(
"DemoHost-1").networkTierName("VM Tier01").build()); "DemoHost-1").networkTierName("VM Tier01").build());
assertRequestLineEquals(request, "GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/ HTTP/1.1"); assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/vm-default.xml")), assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/vm-default.xml")),
"application/xml", false); "application/xml", false);
@ -110,10 +110,10 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
public void testCaptureVApp() throws SecurityException, NoSuchMethodException, IOException { public void testCaptureVApp() throws SecurityException, NoSuchMethodException, IOException {
Method method = VMAsyncClient.class.getMethod("captureVApp", String.class, String.class, URI.class); Method method = VMAsyncClient.class.getMethod("captureVApp", String.class, String.class, URI.class);
HttpRequest request = processor.createRequest(method, "100000.0", "2736", URI.create("https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001")); HttpRequest request = processor.createRequest(method, "100000.0", "2736", URI.create("https://api.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001"));
assertRequestLineEquals(request, assertRequestLineEquals(request,
"POST https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/action/captureVApp HTTP/1.1"); "POST https://api.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/action/captureVApp HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/capture-vapp-template-default.xml")), assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/capture-vapp-template-default.xml")),
"application/xml", false); "application/xml", false);
@ -126,10 +126,10 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
public void testCloneVApp() throws SecurityException, NoSuchMethodException, IOException { public void testCloneVApp() throws SecurityException, NoSuchMethodException, IOException {
Method method = VMAsyncClient.class.getMethod("cloneVApp", URI.class, String.class, String.class); Method method = VMAsyncClient.class.getMethod("cloneVApp", URI.class, String.class, String.class);
HttpRequest request = processor.createRequest(method, URI.create("https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001"), "clonedvm", "VM Tier01"); HttpRequest request = processor.createRequest(method, URI.create("https://api.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001"), "clonedvm", "VM Tier01");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"POST https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001/action/cloneVApp HTTP/1.1"); "POST https://api.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001/action/cloneVApp HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/cloneVApp-default.xml")), assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/cloneVApp-default.xml")),
"application/xml", false); "application/xml", false);
@ -154,11 +154,11 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
}); });
HttpRequest request = processor.createRequest(method, URI HttpRequest request = processor.createRequest(method, URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22"), ImmutableSet.of(VMSpec .create("https://api.savvis.net/rest/api/v0.8/org/11/vdc/22"), ImmutableSet.of(VMSpec
.builder().name("Test VM").networkTierName("VM Tier01").operatingSystem(os).build())); .builder().name("Test VM").networkTierName("VM Tier01").operatingSystem(os).build()));
assertRequestLineEquals(request, assertRequestLineEquals(request,
"GET https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/ HTTP/1.1"); "GET https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/vm-multiple-default.xml")), assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/vm-multiple-default.xml")),
"application/xml", false); "application/xml", false);
@ -187,7 +187,7 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
HttpRequest request = processor.createRequest(method, "11", "22", ImmutableSet.of(VMSpec.builder() HttpRequest request = processor.createRequest(method, "11", "22", ImmutableSet.of(VMSpec.builder()
.operatingSystem(os).name("Test VM").networkTierName("VM Tier01").build())); .operatingSystem(os).name("Test VM").networkTierName("VM Tier01").build()));
assertRequestLineEquals(request, "GET https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/ HTTP/1.1"); assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/vm-multiple-default.xml")), assertPayloadEquals(request, Strings2.toStringAndClose(getClass().getResourceAsStream("/vm-multiple-default.xml")),
"application/xml", false); "application/xml", false);
@ -204,7 +204,7 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
HttpRequest request = processor.createRequest(method, "11", "22", "33"); HttpRequest request = processor.createRequest(method, "11", "22", "33");
assertRequestLineEquals(request, assertRequestLineEquals(request,
"DELETE https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1"); "DELETE https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -218,10 +218,10 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
public void testRemoveVM() throws SecurityException, NoSuchMethodException, IOException { public void testRemoveVM() throws SecurityException, NoSuchMethodException, IOException {
Method method = VMAsyncClient.class.getMethod("removeVM", URI.class); Method method = VMAsyncClient.class.getMethod("removeVM", URI.class);
HttpRequest request = processor.createRequest(method, URI HttpRequest request = processor.createRequest(method, URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33")); .create("https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33"));
assertRequestLineEquals(request, assertRequestLineEquals(request,
"DELETE https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33 HTTP/1.1"); "DELETE https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33 HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -235,10 +235,10 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
public void testPowerOffVM() throws SecurityException, NoSuchMethodException, IOException { public void testPowerOffVM() throws SecurityException, NoSuchMethodException, IOException {
Method method = VMAsyncClient.class.getMethod("powerOffVM", URI.class); Method method = VMAsyncClient.class.getMethod("powerOffVM", URI.class);
HttpRequest request = processor.createRequest(method, URI HttpRequest request = processor.createRequest(method, URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33")); .create("https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33"));
assertRequestLineEquals(request, assertRequestLineEquals(request,
"POST https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1"); "POST https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);
@ -252,10 +252,10 @@ public class VMAsyncClientTest extends BaseVPDCAsyncClientTest<VMAsyncClient> {
public void testPowerOnVM() throws SecurityException, NoSuchMethodException, IOException { public void testPowerOnVM() throws SecurityException, NoSuchMethodException, IOException {
Method method = VMAsyncClient.class.getMethod("powerOnVM", URI.class); Method method = VMAsyncClient.class.getMethod("powerOnVM", URI.class);
HttpRequest request = processor.createRequest(method, URI HttpRequest request = processor.createRequest(method, URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33")); .create("https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33"));
assertRequestLineEquals(request, assertRequestLineEquals(request,
"POST https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1"); "POST https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1");
assertNonPayloadHeadersEqual(request, ""); assertNonPayloadHeadersEqual(request, "");
assertPayloadEquals(request, null, null, false); assertPayloadEquals(request, null, null, false);

View File

@ -22,13 +22,14 @@ import static org.testng.Assert.assertEquals;
import java.net.URI; import java.net.URI;
import javax.inject.Provider;
import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.HttpHeaders;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.base.Supplier;
/** /**
* @author Adrian Cole * @author Adrian Cole
*/ */
@ -39,7 +40,7 @@ public class SetVCloudTokenCookieTest {
@BeforeTest @BeforeTest
void setUp() { void setUp() {
filter = new SetVCloudTokenCookie(new Provider<String>() { filter = new SetVCloudTokenCookie(new Supplier<String>() {
public String get() { public String get() {
return "token"; return "token";
} }

View File

@ -52,7 +52,7 @@ public class OrgHandlerTest {
.name("100000.0") .name("100000.0")
.description("SAVVISStation Integration Testing") .description("SAVVISStation Integration Testing")
.vDC(new Link("2736", "demo_vpdcname", "application/vnd.vmware.vcloud.vdc+xml", URI .vDC(new Link("2736", "demo_vpdcname", "application/vnd.vmware.vcloud.vdc+xml", URI
.create("https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"), .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"),
"down")).build().toString()); "down")).build().toString());
} }

View File

@ -50,7 +50,7 @@ public class OrgListHandlerTest {
Set<Resource> result = factory.create(injector.getInstance(OrgListHandler.class)).parse(is); Set<Resource> result = factory.create(injector.getInstance(OrgListHandler.class)).parse(is);
assertEquals(result, ImmutableSet.of(new ResourceImpl("100000.0", "SAVVISStation Integration Testing", assertEquals(result, ImmutableSet.of(new ResourceImpl("100000.0", "SAVVISStation Integration Testing",
"application/vnd.vmware.vcloud.org+xml", URI "application/vnd.vmware.vcloud.org+xml", URI
.create("https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0")))); .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0"))));
} }
} }

View File

@ -60,7 +60,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.startTime(dateService.iso8601DateParse("2010-05-26T08:08:08.000+08:00")) .startTime(dateService.iso8601DateParse("2010-05-26T08:08:08.000+08:00"))
.status(Task.Status.SUCCESS) .status(Task.Status.SUCCESS)
.type("application/vnd.vmware.vcloud.task+xml") .type("application/vnd.vmware.vcloud.task+xml")
.href(URI.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/21-1002")) .href(URI.create("https://api.savvis.net/rest/api/v0.8/task/21-1002"))
.owner( .owner(
ResourceImpl ResourceImpl
.builder() .builder()
@ -68,7 +68,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("mockVpdc8") .name("mockVpdc8")
.type("application/vnd.vmware.vcloud.vdc+xml") .type("application/vnd.vmware.vcloud.vdc+xml")
.href(URI .href(URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736")) .create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"))
.build()) .build())
.result( .result(
ResourceImpl ResourceImpl
@ -77,7 +77,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("mock_vpdc_item_007") .name("mock_vpdc_item_007")
.type("application/vnd.vmware.vcloud.vApp+xml") .type("application/vnd.vmware.vcloud.vApp+xml")
.href(URI .href(URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002")) .create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"))
.build()).build(); .build()).build();
assertEquals(result.toString(), expects.toString()); assertEquals(result.toString(), expects.toString());
@ -94,7 +94,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.startTime(dateService.iso8601DateParse("2010-05-26T08:08:08.000+08:00")) .startTime(dateService.iso8601DateParse("2010-05-26T08:08:08.000+08:00"))
.status(Task.Status.SUCCESS) .status(Task.Status.SUCCESS)
.type("application/vnd.vmware.vcloud.task+xml") .type("application/vnd.vmware.vcloud.task+xml")
.href(URI.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/21-1002")) .href(URI.create("https://api.savvis.net/rest/api/v0.8/task/21-1002"))
.owner( .owner(
ResourceImpl ResourceImpl
.builder() .builder()
@ -102,7 +102,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("mockVpdc8") .name("mockVpdc8")
.type("application/vnd.vmware.vcloud.vdc+xml") .type("application/vnd.vmware.vcloud.vdc+xml")
.href(URI .href(URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736")) .create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"))
.build()) .build())
.result( .result(
ResourceImpl ResourceImpl
@ -111,7 +111,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("mock_vpdc_item_008") .name("mock_vpdc_item_008")
.type("application/vnd.vmware.vcloud.vApp+xml") .type("application/vnd.vmware.vcloud.vApp+xml")
.href(URI .href(URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/vdc/2736/vmdk/1234567")) .create("https://api.savvis.net/rest/api/v0.8/vdc/2736/vmdk/1234567"))
.build()).build(); .build()).build();
assertEquals(result.toString(), expects.toString()); assertEquals(result.toString(), expects.toString());
@ -127,7 +127,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.startTime(dateService.iso8601DateParse("2010-05-26T08:08:08.000+08:00")) .startTime(dateService.iso8601DateParse("2010-05-26T08:08:08.000+08:00"))
.status(Task.Status.RUNNING) .status(Task.Status.RUNNING)
.type("application/vnd.vmware.vcloud.task+xml") .type("application/vnd.vmware.vcloud.task+xml")
.href(URI.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/6904")) .href(URI.create("https://api.savvis.net/rest/api/v0.8/task/6904"))
.owner( .owner(
ResourceImpl ResourceImpl
.builder() .builder()
@ -135,7 +135,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("mockVpdc8") .name("mockVpdc8")
.type("application/vnd.vmware.vcloud.vdc+xml") .type("application/vnd.vmware.vcloud.vdc+xml")
.href(URI .href(URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736")) .create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"))
.build()) .build())
.result( .result(
ResourceImpl ResourceImpl
@ -144,7 +144,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("mock_vpdc_item_007") .name("mock_vpdc_item_007")
.type("application/vnd.vmware.vcloud.catalogItem+xml") .type("application/vnd.vmware.vcloud.catalogItem+xml")
.href(URI .href(URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002")) .create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"))
.build()).build(); .build()).build();
assertEquals(result.toString(), expects.toString()); assertEquals(result.toString(), expects.toString());
@ -160,7 +160,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.id("113927-1005") .id("113927-1005")
.startTime(dateService.iso8601DateParse("2011-03-24T20:37:34.000Z")) .startTime(dateService.iso8601DateParse("2011-03-24T20:37:34.000Z"))
.status(Task.Status.QUEUED) .status(Task.Status.QUEUED)
.href(URI.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/task/113927-1005")) .href(URI.create("https://api.savvis.net/rest/api/v0.8/task/113927-1005"))
.owner( .owner(
ResourceImpl ResourceImpl
.builder() .builder()
@ -168,7 +168,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("Foo") .name("Foo")
.type("application/vnd.vmware.vcloud.vdc+xml") .type("application/vnd.vmware.vcloud.vdc+xml")
.href(URI .href(URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/4253")) .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/4253"))
.build()) .build())
.result( .result(
ResourceImpl ResourceImpl
@ -177,7 +177,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("adriancole") .name("adriancole")
.type("application/vnd.vmware.vcloud.vApp+xml") .type("application/vnd.vmware.vcloud.vApp+xml")
.href(URI .href(URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/4253/vApp/1005")) .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/4253/vApp/1005"))
.build()).build(); .build()).build();
assertEquals(result.toString(), expects.toString()); assertEquals(result.toString(), expects.toString());
assertEquals(result.getError(), null); assertEquals(result.getError(), null);
@ -195,7 +195,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.endTime(dateService.iso8601DateParse("2010-05-26T08:09:09.000+08:00")) .endTime(dateService.iso8601DateParse("2010-05-26T08:09:09.000+08:00"))
.status(Task.Status.ERROR) .status(Task.Status.ERROR)
.type("application/vnd.vmware.vcloud.task+xml") .type("application/vnd.vmware.vcloud.task+xml")
.href(URI.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/6904-123")) .href(URI.create("https://api.savvis.net/rest/api/v0.8/task/6904-123"))
.owner( .owner(
ResourceImpl ResourceImpl
.builder() .builder()
@ -203,7 +203,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("mockVpdc8") .name("mockVpdc8")
.type("application/vnd.vmware.vcloud.vdc+xml") .type("application/vnd.vmware.vcloud.vdc+xml")
.href(URI .href(URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736")) .create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"))
.build()) .build())
.result( .result(
ResourceImpl ResourceImpl
@ -212,7 +212,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.name("mock_vpdc_item_007") .name("mock_vpdc_item_007")
.type("application/vnd.vmware.vcloud.vApp+xml") .type("application/vnd.vmware.vcloud.vApp+xml")
.href(URI .href(URI
.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002")) .create("https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"))
.build()).build(); .build()).build();
assertEquals(result.toString(), expects.toString()); assertEquals(result.toString(), expects.toString());
@ -251,7 +251,7 @@ public class TaskHandlerTest extends BaseHandlerTest {
.endTime(dateService.iso8601DateParse("2010-05-26T08:09:09.000+08:00")) .endTime(dateService.iso8601DateParse("2010-05-26T08:09:09.000+08:00"))
.status(Task.Status.NONE) .status(Task.Status.NONE)
.type("application/vnd.vmware.vcloud.task+xml") .type("application/vnd.vmware.vcloud.task+xml")
.href(URI.create("https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/3904-1002")) .href(URI.create("https://api.savvis.net/rest/api/v0.8/task/3904-1002"))
.error( .error(
TaskError TaskError
.builder() .builder()

View File

@ -63,31 +63,31 @@ public class VDCHandlerTest {
"DemoHost-1", "DemoHost-1",
VCloudMediaType.VAPP_XML, VCloudMediaType.VAPP_XML,
URI URI
.create("https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1001")), .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1001")),
new ResourceImpl( new ResourceImpl(
"1002", "1002",
"DemoHost-2", "DemoHost-2",
VCloudMediaType.VAPP_XML, VCloudMediaType.VAPP_XML,
URI URI
.create("https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002")), .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002")),
new ResourceImpl( new ResourceImpl(
"1003", "1003",
"DemoHost-3", "DemoHost-3",
VCloudMediaType.VAPP_XML, VCloudMediaType.VAPP_XML,
URI URI
.create("https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1003")), .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1003")),
new ResourceImpl( new ResourceImpl(
"1234", "1234",
"CustomerTemplateName", "CustomerTemplateName",
VCloudMediaType.VAPPTEMPLATE_XML, VCloudMediaType.VAPPTEMPLATE_XML,
URI URI
.create("https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vAppTemplate/1234")), .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vAppTemplate/1234")),
new ResourceImpl( new ResourceImpl(
"FirewallService", "FirewallService",
"firewall", "firewall",
"api.symphonyvpdc.savvis.net+xml", "api.savvis.net+xml",
URI URI
.create("https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/FirewallService")))); .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/FirewallService"))));
assertEquals(result.getAvailableNetworks(), ImmutableSet.of()); assertEquals(result.getAvailableNetworks(), ImmutableSet.of());
} }
@ -102,16 +102,16 @@ public class VDCHandlerTest {
assertEquals(result.getStatus(), Status.DEPLOYED); assertEquals(result.getStatus(), Status.DEPLOYED);
assertEquals(result.getResourceEntities(), ImmutableSet.of(new ResourceImpl("1001", "Host1", assertEquals(result.getResourceEntities(), ImmutableSet.of(new ResourceImpl("1001", "Host1",
VCloudMediaType.VAPP_XML, URI VCloudMediaType.VAPP_XML, URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1001")), .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1001")),
new ResourceImpl("1002", "Host2", VCloudMediaType.VAPP_XML, URI new ResourceImpl("1002", "Host2", VCloudMediaType.VAPP_XML, URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1002")), .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1002")),
new ResourceImpl("1003", "Host3", VCloudMediaType.VAPP_XML, URI new ResourceImpl("1003", "Host3", VCloudMediaType.VAPP_XML, URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1003")), .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1003")),
new ResourceImpl("1004", "Host4", VCloudMediaType.VAPP_XML, URI new ResourceImpl("1004", "Host4", VCloudMediaType.VAPP_XML, URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1004")))); .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1004"))));
assertEquals(result.getAvailableNetworks(), ImmutableSet.of(ResourceImpl.builder().id("VM-Tier01").name( assertEquals(result.getAvailableNetworks(), ImmutableSet.of(ResourceImpl.builder().id("VM-Tier01").name(
"VM Tier01").type(VCloudMediaType.NETWORK_XML).href( "VM Tier01").type(VCloudMediaType.NETWORK_XML).href(
URI.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/network/VM-Tier01")) URI.create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/network/VM-Tier01"))
.build())); .build()));
} }
@ -127,10 +127,10 @@ public class VDCHandlerTest {
assertEquals(result.getStatus(), Status.FAILED); assertEquals(result.getStatus(), Status.FAILED);
assertEquals(result.getResourceEntities(), ImmutableSet.of(new ResourceImpl("1001", "Host1", assertEquals(result.getResourceEntities(), ImmutableSet.of(new ResourceImpl("1001", "Host1",
VCloudMediaType.VAPP_XML, URI VCloudMediaType.VAPP_XML, URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1641/vApp/1001")))); .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1641/vApp/1001"))));
assertEquals(result.getAvailableNetworks(), ImmutableSet.of(ResourceImpl.builder().id("VM-Tier01").name( assertEquals(result.getAvailableNetworks(), ImmutableSet.of(ResourceImpl.builder().id("VM-Tier01").name(
"VM Tier01").type(VCloudMediaType.NETWORK_XML).href( "VM Tier01").type(VCloudMediaType.NETWORK_XML).href(
URI.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1641/network/VM-Tier01")) URI.create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1641/network/VM-Tier01"))
.build())); .build()));
} }
@ -155,7 +155,7 @@ public class VDCHandlerTest {
.id("1001") .id("1001")
.href( .href(
URI URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1001")) .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1001"))
.build(), .build(),
ResourceImpl ResourceImpl
.builder() .builder()
@ -164,7 +164,7 @@ public class VDCHandlerTest {
.id("1037") .id("1037")
.href( .href(
URI URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1037")) .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1037"))
.build(), .build(),
ResourceImpl ResourceImpl
.builder() .builder()
@ -173,7 +173,7 @@ public class VDCHandlerTest {
.id("1038") .id("1038")
.href( .href(
URI URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1038")) .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1038"))
.build(), .build(),
ResourceImpl ResourceImpl
.builder() .builder()
@ -182,11 +182,11 @@ public class VDCHandlerTest {
.id("1039") .id("1039")
.href( .href(
URI URI
.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1039")) .create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1039"))
.build())); .build()));
assertEquals(result.getAvailableNetworks(), ImmutableSet.of(ResourceImpl.builder().id("VM-Tier01").name( assertEquals(result.getAvailableNetworks(), ImmutableSet.of(ResourceImpl.builder().id("VM-Tier01").name(
"VM Tier01").type(VCloudMediaType.NETWORK_XML).href( "VM Tier01").type(VCloudMediaType.NETWORK_XML).href(
URI.create("https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/network/VM-Tier01")) URI.create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/network/VM-Tier01"))
.build())); .build()));
} }

View File

@ -62,7 +62,7 @@ public class VMHandlerTest {
.type("application/vnd.vmware.vcloud.vApp+xml") .type("application/vnd.vmware.vcloud.vApp+xml")
.href( .href(
URI URI
.create("https://api.sandbox.symphonyVPDC.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1001")) .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1001"))
.networkConfigSection( .networkConfigSection(
NetworkConfigSection.builder().network("VM Tier01").gateway("0.0.0.0").netmask("0.0.0.0").info( NetworkConfigSection.builder().network("VM Tier01").gateway("0.0.0.0").netmask("0.0.0.0").info(
"MAC=00:00:00:00:00:00").fenceMode("allowInOut").dhcp(true).internalToExternalNATRule( "MAC=00:00:00:00:00:00").fenceMode("allowInOut").dhcp(true).internalToExternalNATRule(

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><CaptureVAppParams xmlns="http://schemas.api.sandbox.symphonyVPDC.savvis.net/vpdci" name="CaptureTemplate"><Description>Save Template</Description><Source href="https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001"/></CaptureVAppParams> <?xml version="1.0" encoding="UTF-8" standalone="no"?><CaptureVAppParams xmlns="http://schemas.api.sandbox.savvis.net/vpdci" name="CaptureTemplate"><Description>Save Template</Description><Source href="https://api.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/1001"/></CaptureVAppParams>

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><CloneVAppParams xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" deploy="true" name="clonedvm" powerOn="true" xsi:schemaLocation="http://www.vmware.com/vcloud/v0.8 https://api.symphonyvpdc.savvis.net/ns/vcloud.xsd"><Description>VM Tier01</Description><VApp href="https://api.symphonyvpdc.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/" type="application/vnd.vmware.vcloud.vApp+xml"/></CloneVAppParams> <?xml version="1.0" encoding="UTF-8" standalone="no"?><CloneVAppParams xmlns="http://www.vmware.com/vcloud/v0.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" deploy="true" name="clonedvm" powerOn="true" xsi:schemaLocation="http://www.vmware.com/vcloud/v0.8 https://api.savvis.net/ns/vcloud.xsd"><Description>VM Tier01</Description><VApp href="https://api.savvis.net/vpdc/v1.0/org/100000.0/vdc/2736/vApp/" type="application/vnd.vmware.vcloud.vApp+xml"/></CloneVAppParams>

View File

@ -1 +1 @@
<svvs:FirewallService xmlns:svvs="http://schemas.api.sandbox.symphonyVPDC.savvis.net/vpdci" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vApp="http://www.vmware.com/vcloud/v0.8" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"><svvs:FirewallRule><svvs:IsEnabled>true</svvs:IsEnabled><svvs:Description>Server Tier Firewall Rule</svvs:Description><svvs:Type>SERVER_TIER_FIREWALL</svvs:Type><svvs:Log>no</svvs:Log><svvs:Policy>allow</svvs:Policy><svvs:Protocols><svvs:Tcp>true</svvs:Tcp></svvs:Protocols><svvs:Port>22</svvs:Port><svvs:Destination>VM Tier01</svvs:Destination><svvs:Source>internet</svvs:Source></svvs:FirewallRule></svvs:FirewallService> <svvs:FirewallService xmlns:svvs="http://schemas.api.sandbox.savvis.net/vpdci" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vApp="http://www.vmware.com/vcloud/v0.8" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"><svvs:FirewallRule><svvs:IsEnabled>true</svvs:IsEnabled><svvs:Description>Server Tier Firewall Rule</svvs:Description><svvs:Type>SERVER_TIER_FIREWALL</svvs:Type><svvs:Log>no</svvs:Log><svvs:Policy>allow</svvs:Policy><svvs:Protocols><svvs:Tcp>true</svvs:Tcp></svvs:Protocols><svvs:Port>22</svvs:Port><svvs:Destination>VM Tier01</svvs:Destination><svvs:Source>internet</svvs:Source></svvs:FirewallRule></svvs:FirewallService>

View File

@ -4,7 +4,7 @@
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:svvs="http://schemas.api.sandbox.symphonyVPDC.savvis.net/vpdci"> xmlns:svvs="http://schemas.api.sandbox.savvis.net/vpdci">
<svvs:IsEnabled>false</svvs:IsEnabled> <svvs:IsEnabled>false</svvs:IsEnabled>
<svvs:FirewallRule> <svvs:FirewallRule>
<svvs:IsEnabled>true</svvs:IsEnabled> <svvs:IsEnabled>true</svvs:IsEnabled>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vApp:Org xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:vApp="http://www.vmware.com/vcloud/v0.8" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" name="100000.0"> <vApp:Org xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:vApp="http://www.vmware.com/vcloud/v0.8" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" name="100000.0">
<vApp:Link name="demo_vpdcname" type="application/vnd.vmware.vcloud.vdc+xml" href="https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736" rel="down"/> <vApp:Link name="demo_vpdcname" type="application/vnd.vmware.vcloud.vdc+xml" href="https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736" rel="down"/>
<vApp:Description>SAVVISStation Integration Testing</vApp:Description> <vApp:Description>SAVVISStation Integration Testing</vApp:Description>
</vApp:Org> </vApp:Org>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vApp:OrgList xmlns:vApp="http://www.vmware.com/vcloud/v0.8"> <vApp:OrgList xmlns:vApp="http://www.vmware.com/vcloud/v0.8">
<vApp:Org name="SAVVISStation Integration Testing" type="application/vnd.vmware.vcloud.org+xml" href="https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0"/> <vApp:Org name="SAVVISStation Integration Testing" type="application/vnd.vmware.vcloud.org+xml" href="https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0"/>
</vApp:OrgList> </vApp:OrgList>

View File

@ -5,10 +5,10 @@
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"> xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<vApp:Task endTime="2010-05-26T08:09:09.000+08:00" startTime="2010-05-26T08:08:08.000+08:00" status="error" <vApp:Task endTime="2010-05-26T08:09:09.000+08:00" startTime="2010-05-26T08:08:08.000+08:00" status="error"
type="application/vnd.vmware.vcloud.task+xml" href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/6904-123"> type="application/vnd.vmware.vcloud.task+xml" href="https://api.savvis.net/rest/api/v0.8/task/6904-123">
<vApp:Owner name="mockVpdc8" type="application/vnd.vmware.vcloud.vdc+xml" <vApp:Owner name="mockVpdc8" type="application/vnd.vmware.vcloud.vdc+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"/> href="https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"/>
<vApp:Result name="mock_vpdc_item_007" type="application/vnd.vmware.vcloud.vApp+xml" <vApp:Result name="mock_vpdc_item_007" type="application/vnd.vmware.vcloud.vApp+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"/> href="https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"/>
</vApp:Task> </vApp:Task>
</vApp:TasksList> </vApp:TasksList>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vApp:TasksList xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:vApp="http://www.vmware.com/vcloud/v0.8" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"> <vApp:TasksList xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:vApp="http://www.vmware.com/vcloud/v0.8" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<vApp:Task startTime="2011-03-24T20:37:34.000Z" status="queued" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/task/113927-1005"> <vApp:Task startTime="2011-03-24T20:37:34.000Z" status="queued" href="https://api.savvis.net/rest/api/v0.8/task/113927-1005">
<vApp:Owner name="Foo" type="application/vnd.vmware.vcloud.vdc+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/4253"/> <vApp:Owner name="Foo" type="application/vnd.vmware.vcloud.vdc+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/4253"/>
<vApp:Result name="adriancole" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/4253/vApp/1005"/> <vApp:Result name="adriancole" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/4253/vApp/1005"/>
</vApp:Task> </vApp:Task>
</vApp:TasksList> </vApp:TasksList>

View File

@ -6,10 +6,10 @@
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"> xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<!--If Task status is running, Savvis is not displaying endTime.--> <!--If Task status is running, Savvis is not displaying endTime.-->
<vApp:Task startTime="2010-05-26T08:08:08.000+08:00" status="running" type="application/vnd.vmware.vcloud.task+xml" <vApp:Task startTime="2010-05-26T08:08:08.000+08:00" status="running" type="application/vnd.vmware.vcloud.task+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/6904"> href="https://api.savvis.net/rest/api/v0.8/task/6904">
<vApp:Owner name="mockVpdc8" type="application/vnd.vmware.vcloud.vdc+xml" <vApp:Owner name="mockVpdc8" type="application/vnd.vmware.vcloud.vdc+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"/> href="https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"/>
<vApp:Result name="mock_vpdc_item_007" type="application/vnd.vmware.vcloud.catalogItem+xml" <vApp:Result name="mock_vpdc_item_007" type="application/vnd.vmware.vcloud.catalogItem+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"/> href="https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"/>
</vApp:Task> </vApp:Task>
</vApp:TasksList> </vApp:TasksList>

View File

@ -5,7 +5,7 @@
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"> xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<vApp:Task endTime="2010-05-26T08:09:09.000+08:00" startTime="2010-05-26T08:08:08.000+08:00" status="None" <vApp:Task endTime="2010-05-26T08:09:09.000+08:00" startTime="2010-05-26T08:08:08.000+08:00" status="None"
type="application/vnd.vmware.vcloud.task+xml" href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/3904-1002"> type="application/vnd.vmware.vcloud.task+xml" href="https://api.savvis.net/rest/api/v0.8/task/3904-1002">
<vApp:Error vendorSpecificErrorCode="3000" minorErrorCode="-1" majorErrorCode="500" <vApp:Error vendorSpecificErrorCode="3000" minorErrorCode="-1" majorErrorCode="500"
message="your requested task id is not found. Please contact Savvis Administrator for further assistance/clarification "/> message="your requested task id is not found. Please contact Savvis Administrator for further assistance/clarification "/>
</vApp:Task> </vApp:Task>

View File

@ -5,10 +5,10 @@
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"> xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<vApp:Task endTime="2010-05-26T08:09:09.000+08:00" startTime="2010-05-26T08:08:08.000+08:00" status="success" <vApp:Task endTime="2010-05-26T08:09:09.000+08:00" startTime="2010-05-26T08:08:08.000+08:00" status="success"
type="application/vnd.vmware.vcloud.task+xml" href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/21-1002"> type="application/vnd.vmware.vcloud.task+xml" href="https://api.savvis.net/rest/api/v0.8/task/21-1002">
<vApp:Owner name="mockVpdc8" type="application/vnd.vmware.vcloud.vdc+xml" <vApp:Owner name="mockVpdc8" type="application/vnd.vmware.vcloud.vdc+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"/> href="https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"/>
<vApp:Result name="mock_vpdc_item_007" type="application/vnd.vmware.vcloud.vApp+xml" <vApp:Result name="mock_vpdc_item_007" type="application/vnd.vmware.vcloud.vApp+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"/> href="https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"/>
</vApp:Task> </vApp:Task>
</vApp:TasksList> </vApp:TasksList>

View File

@ -5,10 +5,10 @@
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"> xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<vApp:Task endTime="2010-05-26T08:09:09.000+08:00" startTime="2010-05-26T08:08:08.000+08:00" status="success" <vApp:Task endTime="2010-05-26T08:09:09.000+08:00" startTime="2010-05-26T08:08:08.000+08:00" status="success"
type="application/vnd.vmware.vcloud.task+xml" href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/task/21-1002"> type="application/vnd.vmware.vcloud.task+xml" href="https://api.savvis.net/rest/api/v0.8/task/21-1002">
<vApp:Owner name="mockVpdc8" type="application/vnd.vmware.vcloud.vdc+xml" <vApp:Owner name="mockVpdc8" type="application/vnd.vmware.vcloud.vdc+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"/> href="https://api.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"/>
<vApp:Result name="mock_vpdc_item_008" type="application/vnd.vmware.vcloud.vApp+xml" <vApp:Result name="mock_vpdc_item_008" type="application/vnd.vmware.vcloud.vApp+xml"
href="https://api.symphonyvpdc.savvis.net/rest/api/v0.8/vdc/2736/vmdk/1234567"/> href="https://api.savvis.net/rest/api/v0.8/vdc/2736/vmdk/1234567"/>
</vApp:Task> </vApp:Task>
</vApp:TasksList> </vApp:TasksList>

View File

@ -3,12 +3,12 @@
<vApp:Description>ServiceProfileName = Essential; ServiceLocation = US_WEST; Email = red@chair.com;</vApp:Description> <vApp:Description>ServiceProfileName = Essential; ServiceLocation = US_WEST; Email = red@chair.com;</vApp:Description>
<vApp:OfferingTag>Deployed</vApp:OfferingTag> <vApp:OfferingTag>Deployed</vApp:OfferingTag>
<vApp:ResourceEntities> <vApp:ResourceEntities>
<vApp:ResourceEntity name="Host1" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1001"/> <vApp:ResourceEntity name="Host1" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1001"/>
<vApp:ResourceEntity name="Host2" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1002"/> <vApp:ResourceEntity name="Host2" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1002"/>
<vApp:ResourceEntity name="Host3" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1003"/> <vApp:ResourceEntity name="Host3" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1003"/>
<vApp:ResourceEntity name="Host4" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1004"/> <vApp:ResourceEntity name="Host4" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1004"/>
</vApp:ResourceEntities> </vApp:ResourceEntities>
<vApp:AvailableNetworks> <vApp:AvailableNetworks>
<vApp:Network name="VM Tier01" type="application/vnd.vmware.vcloud.network+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/network/VM-Tier01"/> <vApp:Network name="VM Tier01" type="application/vnd.vmware.vcloud.network+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/network/VM-Tier01"/>
</vApp:AvailableNetworks> </vApp:AvailableNetworks>
</vApp:Vdc> </vApp:Vdc>

View File

@ -3,9 +3,9 @@
<vApp:Description>ServiceProfileName = Essential; ServiceLocation = US_WEST; Email = red@chair.com;</vApp:Description> <vApp:Description>ServiceProfileName = Essential; ServiceLocation = US_WEST; Email = red@chair.com;</vApp:Description>
<vApp:OfferingTag>Failed</vApp:OfferingTag> <vApp:OfferingTag>Failed</vApp:OfferingTag>
<vApp:ResourceEntities> <vApp:ResourceEntities>
<vApp:ResourceEntity name="Host1" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1641/vApp/1001"/> <vApp:ResourceEntity name="Host1" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1641/vApp/1001"/>
</vApp:ResourceEntities> </vApp:ResourceEntities>
<vApp:AvailableNetworks> <vApp:AvailableNetworks>
<vApp:Network name="VM Tier01" type="application/vnd.vmware.vcloud.network+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/1641/network/VM-Tier01"/> <vApp:Network name="VM Tier01" type="application/vnd.vmware.vcloud.network+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1641/network/VM-Tier01"/>
</vApp:AvailableNetworks> </vApp:AvailableNetworks>
</vApp:Vdc> </vApp:Vdc>

View File

@ -3,12 +3,12 @@
<vApp:Description>ServiceProfileName = Essential; ServiceLocation = US_WEST; Email = me@my.com;</vApp:Description> <vApp:Description>ServiceProfileName = Essential; ServiceLocation = US_WEST; Email = me@my.com;</vApp:Description>
<vApp:OfferingTag>Saved</vApp:OfferingTag> <vApp:OfferingTag>Saved</vApp:OfferingTag>
<vApp:ResourceEntities> <vApp:ResourceEntities>
<vApp:ResourceEntity name="templateHost" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1001"/> <vApp:ResourceEntity name="templateHost" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1001"/>
<vApp:ResourceEntity name="host-c501" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1037"/> <vApp:ResourceEntity name="host-c501" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1037"/>
<vApp:ResourceEntity name="host-c501" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1038"/> <vApp:ResourceEntity name="host-c501" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1038"/>
<vApp:ResourceEntity name="host-c601" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1039"/> <vApp:ResourceEntity name="host-c601" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/vApp/1039"/>
</vApp:ResourceEntities> </vApp:ResourceEntities>
<vApp:AvailableNetworks> <vApp:AvailableNetworks>
<vApp:Network name="VM Tier01" type="application/vnd.vmware.vcloud.network+xml" href="https://api.symphonyVPDC.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/network/VM-Tier01"/> <vApp:Network name="VM Tier01" type="application/vnd.vmware.vcloud.network+xml" href="https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/2555/network/VM-Tier01"/>
</vApp:AvailableNetworks> </vApp:AvailableNetworks>
</vApp:Vdc> </vApp:Vdc>

View File

@ -3,11 +3,11 @@
<vApp:Description>ServiceProfileName = Balanced; ServiceLocation = North America; Email = jim@company.com;</vApp:Description> <vApp:Description>ServiceProfileName = Balanced; ServiceLocation = North America; Email = jim@company.com;</vApp:Description>
<vApp:OfferingTag>Deployed</vApp:OfferingTag> <vApp:OfferingTag>Deployed</vApp:OfferingTag>
<vApp:ResourceEntities> <vApp:ResourceEntities>
<vApp:ResourceEntity name="DemoHost-1" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1001"/> <vApp:ResourceEntity name="DemoHost-1" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1001"/>
<vApp:ResourceEntity name="DemoHost-2" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"/> <vApp:ResourceEntity name="DemoHost-2" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1002"/>
<vApp:ResourceEntity name="DemoHost-3" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1003"/> <vApp:ResourceEntity name="DemoHost-3" type="application/vnd.vmware.vcloud.vApp+xml" href="https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1003"/>
<vApp:ResourceEntity name="CustomerTemplateName" type="application/vnd.vmware.vcloud.vAppTemplate+xml" href="https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vAppTemplate/1234"/> <vApp:ResourceEntity name="CustomerTemplateName" type="application/vnd.vmware.vcloud.vAppTemplate+xml" href="https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vAppTemplate/1234"/>
<vApp:ResourceEntity name="firewall" type="api.symphonyvpdc.savvis.net+xml" href="https://api.sandbox.symphonyvpdc.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/FirewallService"/> <vApp:ResourceEntity name="firewall" type="api.savvis.net+xml" href="https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/FirewallService"/>
</vApp:ResourceEntities> </vApp:ResourceEntities>
<vApp:AvailableNetworks/> <vApp:AvailableNetworks/>
</vApp:Vdc> </vApp:Vdc>

View File

@ -1,11 +1,11 @@
<vApp:VApp xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:vApp="http://www.vmware.com/vcloud/v0.8" <vApp:VApp xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:vApp="http://www.vmware.com/vcloud/v0.8"
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
xmlns:vApps="http://schemas.api.sandbox.symphonyVPDC.savvis.net/vpdci" xmlns:vApps="http://schemas.api.sandbox.savvis.net/vpdci"
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:svvs="http://schemas.api.sandbox.symphonyVPDC.savvis.net/vpdci" status="4" name="znHost2" xmlns:svvs="http://schemas.api.sandbox.savvis.net/vpdci" status="4" name="znHost2"
type="application/vnd.vmware.vcloud.vApp+xml" type="application/vnd.vmware.vcloud.vApp+xml"
href="https://api.sandbox.symphonyVPDC.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1001"> href="https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736/vApp/1001">
<ovf:NetworkSection> <ovf:NetworkSection>
<ovf:Info>The list of logical networks</ovf:Info> <ovf:Info>The list of logical networks</ovf:Info>
<ovf:Network ovf:name="VM Tier01"> <ovf:Network ovf:name="VM Tier01">