mirror of https://github.com/apache/jclouds.git
Issue 830: Tidy up client imports and javadoc
This commit is contained in:
parent
8443bbe8f2
commit
680a202b20
|
@ -37,7 +37,6 @@ import org.jclouds.rest.annotations.RequestFilters;
|
|||
import org.jclouds.rest.binders.BindToXMLPayload;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
|
|
|
@ -22,13 +22,10 @@ import java.net.URI;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.rest.annotations.Delegate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.PublishCatalogParams;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to {@link AdminCatalog} objects.
|
||||
|
@ -36,7 +33,6 @@ import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
|||
* @see AdminCatalogAsyncClient
|
||||
* @author danikov
|
||||
*/
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
public interface AdminCatalogClient extends CatalogClient {
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
|||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
/**
|
||||
* @see GroupClient
|
||||
* @see AdminOrgClient
|
||||
* @author danikov
|
||||
*/
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
|
@ -57,6 +57,7 @@ public interface AdminOrgAsyncClient extends OrgAsyncClient {
|
|||
/**
|
||||
* @see AdminOrgClient#getOrg(URI)
|
||||
*/
|
||||
@Override
|
||||
@GET
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
|
|
|
@ -24,7 +24,6 @@ import java.util.concurrent.TimeUnit;
|
|||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.rest.annotations.Delegate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminOrg;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Group;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgEmailSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgGeneralSettings;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgLdapSettings;
|
||||
|
@ -34,7 +33,7 @@ import org.jclouds.vcloud.director.v1_5.domain.OrgSettings;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.OrgVAppTemplateLeaseSettings;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to {@link Group} objects.
|
||||
* Provides synchronous access to {@link Org} objects.
|
||||
*
|
||||
* @see GroupAsyncClient
|
||||
* @author danikov
|
||||
|
|
|
@ -36,7 +36,6 @@ import org.jclouds.rest.annotations.RequestFilters;
|
|||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminVdc;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient.Writeable;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
||||
|
@ -48,8 +47,6 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
*/
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
public interface AdminVdcAsyncClient extends VdcAsyncClient {
|
||||
|
||||
// TODO Should we use MetadataClient?
|
||||
|
||||
@GET
|
||||
@Consumes
|
||||
|
@ -88,6 +85,7 @@ public interface AdminVdcAsyncClient extends VdcAsyncClient {
|
|||
/**
|
||||
* @return asynchronous access to {@link Writeable} features
|
||||
*/
|
||||
@Override
|
||||
@Delegate
|
||||
MetadataAsyncClient.Writeable getMetadataClient();
|
||||
}
|
||||
|
|
|
@ -26,14 +26,11 @@ import org.jclouds.rest.annotations.Delegate;
|
|||
import org.jclouds.rest.annotations.EndpointParam;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AdminVdc;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
import org.jclouds.vcloud.director.v1_5.features.MetadataAsyncClient.Writeable;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to Network.
|
||||
* <p/>
|
||||
* Provides synchronous access to {@link AdminVdc}.
|
||||
*
|
||||
* @see NetworkAsyncClient
|
||||
* @see <a href= "http://support.theenterprisecloud.com/kb/default.asp?id=984&Lang=1&SID=" />
|
||||
* @see AdminVdcAsyncClient
|
||||
* @author danikov
|
||||
*/
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.jclouds.rest.binders.BindToXMLPayload;
|
|||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CatalogItem;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CatalogType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
||||
|
|
|
@ -23,10 +23,8 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.rest.annotations.Delegate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Catalog;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CatalogItem;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CatalogType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to {@link Catalog} objects.
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.jclouds.rest.binders.BindToXMLPayload;
|
|||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CloneMediaParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Media;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
|
|
|
@ -25,16 +25,13 @@ import org.jclouds.concurrent.Timeout;
|
|||
import org.jclouds.rest.annotations.Delegate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.CloneMediaParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Media;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to Media.
|
||||
* <p/>
|
||||
* Provides synchronous access to {@link Media}.
|
||||
*
|
||||
* @see MediaAsyncClient
|
||||
* @see <a href= "http://support.theenterprisecloud.com/kb/default.asp?id=984&Lang=1&SID=" />
|
||||
* @author danikov
|
||||
*/
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
|
|
|
@ -45,13 +45,14 @@ import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
|||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
/**
|
||||
|
||||
* @see NetworkClient
|
||||
* @see MetadataClient
|
||||
* @author danikov
|
||||
*/
|
||||
public interface MetadataAsyncClient {
|
||||
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
public static interface Readable extends MetadataAsyncClient {
|
||||
|
||||
/**
|
||||
* @see MetadataClient.Readable#getMetadata(URISupplier)
|
||||
*/
|
||||
|
@ -75,6 +76,7 @@ public interface MetadataAsyncClient {
|
|||
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
public static interface Writeable extends Readable {
|
||||
|
||||
/**
|
||||
* @see MetadataClient.Writable#mergeMetadata(URI, Metadata))
|
||||
*/
|
||||
|
|
|
@ -27,19 +27,16 @@ import org.jclouds.vcloud.director.v1_5.domain.MetadataValue;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.Task;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to Upload.
|
||||
* <p/>
|
||||
* Provides synchronous access to {@linkl Metadata}.
|
||||
*
|
||||
* @see MetadataAsyncClient
|
||||
* @see <a href= "http://support.theenterprisecloud.com/kb/default.asp?id=984&Lang=1&SID=" />
|
||||
* @author danikov
|
||||
*/
|
||||
public interface MetadataClient {
|
||||
|
||||
// FIXME Correct spelling of Writeable -> Writable
|
||||
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
public static interface Readable extends MetadataClient {
|
||||
|
||||
/**
|
||||
* Retrieves an list of metadata
|
||||
*
|
||||
|
@ -57,6 +54,7 @@ public interface MetadataClient {
|
|||
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
public static interface Writeable extends Readable {
|
||||
|
||||
/**
|
||||
* Merges the metadata for a media with the information provided.
|
||||
*
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.jclouds.rest.annotations.EndpointParam;
|
|||
import org.jclouds.rest.annotations.ExceptionParser;
|
||||
import org.jclouds.rest.annotations.JAXBResponseParser;
|
||||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Network;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
@ -36,7 +35,6 @@ import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
|||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
/**
|
||||
|
||||
* @see NetworkClient
|
||||
* @author danikov
|
||||
*/
|
||||
|
|
|
@ -23,15 +23,12 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.rest.annotations.Delegate;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Network;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to Network.
|
||||
* <p/>
|
||||
* Provides synchronous access to {@link Network}.
|
||||
*
|
||||
* @see NetworkAsyncClient
|
||||
* @see <a href= "http://support.theenterprisecloud.com/kb/default.asp?id=984&Lang=1&SID=" />
|
||||
* @author danikov
|
||||
*/
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
|
|
|
@ -28,8 +28,7 @@ import org.jclouds.vcloud.director.v1_5.domain.Org;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.OrgList;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to Org.
|
||||
* <p/>
|
||||
* Provides synchronous access to {@link Org}.
|
||||
*
|
||||
* @see OrgAsyncClient
|
||||
* @author Adrian Cole
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecords;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.query.VAppReferences;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to The REST API query interface.
|
||||
* Provides synchronous access to the REST API query interface.
|
||||
*
|
||||
* @see QueryAsyncClient
|
||||
* @author grkvlt@apache.org
|
||||
|
|
|
@ -30,12 +30,12 @@ import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
|||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
/**
|
||||
*
|
||||
* @see UploadClient
|
||||
* @author danikov
|
||||
*/
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
public interface UploadAsyncClient {
|
||||
|
||||
/**
|
||||
* @see UploadClient#put
|
||||
*/
|
||||
|
|
|
@ -25,8 +25,7 @@ import org.jclouds.concurrent.Timeout;
|
|||
import org.jclouds.io.Payload;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to Upload.
|
||||
* <p/>
|
||||
* Provides synchronous access to upload.
|
||||
*
|
||||
* @see UploadAsyncClient
|
||||
* @author danikov
|
||||
|
|
|
@ -42,11 +42,12 @@ import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
|||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
/**
|
||||
* @see GroupClient
|
||||
* @see UserClient
|
||||
* @author danikov
|
||||
*/
|
||||
@RequestFilters(AddVCloudAuthorizationToRequest.class)
|
||||
public interface UserAsyncClient {
|
||||
|
||||
/**
|
||||
* @see UserClient#createUser(URI, User)
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,6 @@ import java.net.URI;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Group;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.User;
|
||||
|
||||
/**
|
||||
|
@ -33,6 +32,7 @@ import org.jclouds.vcloud.director.v1_5.domain.User;
|
|||
*/
|
||||
@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
|
||||
public interface UserClient {
|
||||
|
||||
/**
|
||||
* Creates or imports a user in an organization. The user could be enabled or disabled.
|
||||
*
|
||||
|
|
|
@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.features;
|
|||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.CUSTOMIZATION_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.GUEST_CUSTOMIZATION_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.LEASE_SETTINGS_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.METADATA;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.METADATA_ENTRY;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NETWORK_CONFIG_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NETWORK_CONNECTION_SECTION;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NETWORK_SECTION;
|
||||
|
@ -40,7 +38,6 @@ import javax.ws.rs.GET;
|
|||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
|
||||
import org.jclouds.rest.annotations.BinderParam;
|
||||
|
@ -53,8 +50,6 @@ import org.jclouds.rest.binders.BindToXMLPayload;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.CustomizationSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.MetadataValue;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
|
@ -214,60 +209,6 @@ public interface VAppTemplateAsyncClient {
|
|||
ListenableFuture<Task> editVappTemplateLeaseSettingsSection(@EndpointParam URI templateURI,
|
||||
@BinderParam(BindToXMLPayload.class) LeaseSettingsSection settingsSection);
|
||||
|
||||
/**
|
||||
* @see VAppTemplateClient#getVAppTemplateMetadata(URI)
|
||||
*/
|
||||
@GET
|
||||
@Consumes(METADATA)
|
||||
@Path("/metadata")
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Metadata> getVAppTemplateMetadata(@EndpointParam URI templateURI);
|
||||
|
||||
@POST
|
||||
@Produces(METADATA)
|
||||
@Consumes(TASK)
|
||||
@Path("/metadata")
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Task> editVAppTemplateMetadata(@EndpointParam URI templateURI,
|
||||
@BinderParam(BindToXMLPayload.class) Metadata metadata);
|
||||
|
||||
/**
|
||||
* @see VAppTemplateClient#getVAppTemplateMetadataValue(URI, String)
|
||||
*/
|
||||
@GET
|
||||
@Consumes(METADATA_ENTRY)
|
||||
@Path("/metadata/{key}")
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<MetadataValue> getVAppTemplateMetadataValue(@EndpointParam URI templateURI,
|
||||
@PathParam("key") String key);
|
||||
|
||||
/**
|
||||
* @see VAppTemplateClient#editVAppTemplateMetadataValue(URI, String, org.jclouds.vcloud.director.v1_5.domain.MetadataValue)
|
||||
*/
|
||||
@PUT
|
||||
@Produces(METADATA_ENTRY)
|
||||
@Consumes(TASK)
|
||||
@Path("/metadata/{key}")
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Task> editVAppTemplateMetadataValue(@EndpointParam URI templateURI,
|
||||
@PathParam("key") String key,
|
||||
@BinderParam(BindToXMLPayload.class) MetadataValue value);
|
||||
|
||||
/**
|
||||
* @see VAppTemplateClient#deleteVAppTemplateMetadataValue(URI, String)
|
||||
*/
|
||||
@DELETE
|
||||
@Consumes(TASK)
|
||||
@Path("/metadata/{key}")
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Task> deleteVAppTemplateMetadataValue(@EndpointParam URI templateURI,
|
||||
@PathParam("key") String key);
|
||||
|
||||
/**
|
||||
* @see VAppTemplateClient#getVAppTemplateNetworkConfigSection(URI)
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.jclouds.rest.annotations.Delegate;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.CustomizationSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.LeaseSettingsSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.NetworkConfigSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.NetworkConnectionSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Owner;
|
||||
|
@ -39,7 +38,7 @@ import org.jclouds.vcloud.director.v1_5.domain.ovf.Envelope;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
|
||||
|
||||
/**
|
||||
* Provides synchronous access to {@link org.jclouds.vcloud.director.v1_5.domain.VAppTemplate} objects.
|
||||
* Provides synchronous access to {@link VAppTemplate} objects.
|
||||
*
|
||||
* @author Adam Lowe
|
||||
* @see org.jclouds.vcloud.director.v1_5.features.VAppTemplateAsyncClient
|
||||
|
@ -49,15 +48,24 @@ public interface VAppTemplateClient {
|
|||
|
||||
/**
|
||||
* Retrieves a vApp template (can be used also to retrieve a VM from a vApp Template).
|
||||
* The vApp could be in one of these statues: FAILED_CREATION(-1) - Transient entity state,
|
||||
* e.g., model object is created but the corresponding VC backing does not exist yet. This
|
||||
* is further sub-categorized in the respective entities. UNRESOLVED(0) - Entity is whole,
|
||||
* e.g., VM creation is complete and all the required model objects and VC backings are created.
|
||||
* RESOLVED(1) - Entity is resolved. UNKNOWN(6) - Entity state could not be retrieved from
|
||||
* the inventory, e.g., VM power state is null. POWERED_OFF(8) - All VMs of the vApp template
|
||||
* are powered off. MIXED(10) - vApp template status is set to MIXED when the VMs in the
|
||||
* vApp are in different power states.
|
||||
*
|
||||
* The vApp could be in one of these statues:
|
||||
* <ul>
|
||||
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#FAILED_CREATION} -
|
||||
* Transient entity state, e.g., model object is created but the corresponding VC backing
|
||||
* does not exist yet. This is further sub-categorized in the respective entities.
|
||||
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED} -
|
||||
* Entity is whole, e.g., VM creation is complete and all the required model objects and VC backings are created.
|
||||
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#RESOLVED} -
|
||||
* Entity is resolved.
|
||||
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNKNOWN} -
|
||||
* Entity state could not be retrieved from the inventory, e.g., VM power state is null.
|
||||
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#POWERED_OFF} -
|
||||
* All VMs of the vApp template
|
||||
* are powered off.
|
||||
* <li>{@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#MIXED} -
|
||||
* vApp template status is set to MIXED when the VMs in the vApp are in different power states.
|
||||
* </ul>
|
||||
* <pre>
|
||||
* GET /vAppTemplate/{id}
|
||||
* </pre>
|
||||
|
@ -236,17 +244,7 @@ public interface VAppTemplateClient {
|
|||
NetworkConfigSection getVAppTemplateNetworkConfigSection(URI templateUri);
|
||||
|
||||
/**
|
||||
* Modifies the network config section of a vApp. There are three general types of vApp
|
||||
* networks which could be configured from this section. They are specified by the element
|
||||
* value in /. isolated - this is a vApp network which is not connected to any external
|
||||
* organization network and is used only to connect VMs internally in a vApp. In this
|
||||
* network you could configure only its element of /. bridged - this is a vApp network
|
||||
* which is directly connected to an external organization network. In this network you
|
||||
* should configure only the element of /. In this case the element is inherit from the
|
||||
* parent network. natRouted - this is a vApp network which is NAT routed to an external
|
||||
* organization network. In this network you could configure the and also you should
|
||||
* specify and the element of /. When the network is NAT routed you could specify DHCP,
|
||||
* firewall rules and NAT rules, for fine-grained configuration of your network.
|
||||
* Modifies the network config section of a vApp.
|
||||
*
|
||||
* <pre>
|
||||
* PUT /vAppTemplate/{id}/networkConfigSection
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.jclouds.vcloud.director.v1_5.domain.CloneVAppTemplateParams;
|
|||
import org.jclouds.vcloud.director.v1_5.domain.ComposeVAppParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.InstantiateVAppParamsType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Media;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.UploadVAppTemplateParams;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.VApp;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
|
||||
|
|
|
@ -54,8 +54,11 @@ public interface VdcClient {
|
|||
Vdc getVdc(URI vdcUri);
|
||||
|
||||
/**
|
||||
* Captures a vApp into vApp template.
|
||||
* The status of vApp template will be in UNRESOLVED(0) until the capture task is finished.
|
||||
* Captures a vApp into vApp template.
|
||||
*
|
||||
* The status of vApp template will be in
|
||||
* {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)}
|
||||
* until the capture task is finished.
|
||||
*
|
||||
* @return a VApp resource which will contain a task.
|
||||
* The user should should wait for this task to finish to be able to use the vApp.
|
||||
|
@ -64,7 +67,9 @@ public interface VdcClient {
|
|||
|
||||
/**
|
||||
* Clones a media into new one.
|
||||
* The status of the returned media is UNRESOLVED(0) until the task for cloning finish.
|
||||
* The status of the returned media is
|
||||
* {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)}
|
||||
* until the task for cloning finish.
|
||||
*
|
||||
* @return a Media resource which will contain a task.
|
||||
* The user should monitor the contained task status in order to check when it is completed.
|
||||
|
@ -80,8 +85,11 @@ public interface VdcClient {
|
|||
VApp cloneVApp(URI vdcUri, CloneVAppParams params);
|
||||
|
||||
/**
|
||||
* Clones a vApp template into new one.
|
||||
* The status of vApp template will be in UNRESOLVED(0) until the clone task is finished.
|
||||
* Clones a vApp template into new one.
|
||||
*
|
||||
* The status of vApp template will be in
|
||||
* {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)}
|
||||
* until the clone task is finished.
|
||||
*
|
||||
* @return a VAppTemplate resource which will contain a task.
|
||||
* The user should should wait for this task to finish to be able to use the VAppTemplate.
|
||||
|
@ -89,23 +97,32 @@ public interface VdcClient {
|
|||
VAppTemplate cloneVAppTemplate(URI vdcUri, CloneVAppTemplateParams params);
|
||||
|
||||
/**
|
||||
* Composes a new vApp using VMs from other vApps or vApp templates. The vCloud API supports
|
||||
* composing a vApp from any combination of vApp templates, vApps, or virtual machines.
|
||||
* When you compose a vApp, all children of each composition source become peers in the
|
||||
* Children collection of the composed vApp. To compose a vApp, a client makes a compose
|
||||
* vApp request whose body is a ComposeVAppParams element, includes the following information:
|
||||
* - An InstantiationParams element that applies to the composed vApp itself and any vApp
|
||||
* templates referenced in Item elements. - A SourcedItem element for each virtual machine,
|
||||
* vApp, or vAppTemplate to include in the composition. Each SourcedItem can contain the
|
||||
* following elements: - A required Source element whose href attribute value is a reference
|
||||
* to a vApp template, vApp, or VM to include in the composition. If the Source element
|
||||
* references a VM, the Item must also include an InstantiationParams element specific to
|
||||
* that VM. - An optional NetworkAssignment element that specifies how the network connections
|
||||
* of child VM elements are mapped to vApp networks in the parent. - If any of the composition
|
||||
* items is subject to a EULA, the ComposeVAppParams element must include an AllEULAsAccepted
|
||||
* element that has a value of true, indicating that you accept the EULA. Otherwise, composition
|
||||
* fails. The composed vApp must be deployed and powered on before it can be used. The status
|
||||
* of vApp will be UNRESOLVED(0) until the compose task is finished.
|
||||
* Composes a new vApp using VMs from other vApps or vApp templates.
|
||||
*
|
||||
* The vCloud API supports composing a vApp from any combination of vApp templates, vApps,
|
||||
* or virtual machines. When you compose a vApp, all children of each composition source
|
||||
* become peers in the Children collection of the composed vApp. To compose a vApp, a client
|
||||
* makes a compose vApp request whose body is a ComposeVAppParams element, includes the
|
||||
* following information:
|
||||
* <ul>
|
||||
* <li>An InstantiationParams element that applies to the composed vApp itself and any vApp
|
||||
* templates referenced in Item elements.
|
||||
* <li>A SourcedItem element for each virtual machine, vApp, or vAppTemplate to include in
|
||||
* the composition. Each SourcedItem can contain the following elements:
|
||||
* <ul>
|
||||
* <li>A required Source element whose href attribute value is a reference
|
||||
* to a vApp template, vApp, or VM to include in the composition. If the Source element
|
||||
* references a VM, the Item must also include an InstantiationParams element specific to
|
||||
* that VM.
|
||||
* <li>An optional NetworkAssignment element that specifies how the network connections
|
||||
* of child VM elements are mapped to vApp networks in the parent.
|
||||
* </ul>
|
||||
* <li>If any of the composition items is subject to a EULA, the ComposeVAppParams element
|
||||
* must include an AllEULAsAccepted element that has a value of true, indicating that you
|
||||
* accept the EULA. Otherwise, composition fails. The composed vApp must be deployed and
|
||||
* powered on before it can be used. The status of vApp will be
|
||||
* {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)}
|
||||
* until the compose task is finished.
|
||||
*
|
||||
* @return a VApp resource which will contain a task.
|
||||
* The user should should wait for this task to finish to be able to use the vApp.
|
||||
|
@ -114,7 +131,10 @@ public interface VdcClient {
|
|||
|
||||
/**
|
||||
* Instantiate a vApp template into a new vApp.
|
||||
* The status of vApp will be in UNRESOLVED(0) until the instantiate task is finished.
|
||||
*
|
||||
* The status of vApp will be in
|
||||
* {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#UNRESOLVED UNRESOLVED(0)}
|
||||
* until the instantiate task is finished.
|
||||
*
|
||||
* <pre>
|
||||
* POST /vdc/{id}/action/instantiateVAppTemplate
|
||||
|
@ -126,13 +146,17 @@ public interface VdcClient {
|
|||
VApp instantiateVApp(URI vdcUri, InstantiateVAppParamsType params);
|
||||
|
||||
/**
|
||||
* Uploading vApp template to a vDC. The operation is separate on several steps:
|
||||
* 1. creating empty vApp template entity
|
||||
* 2. uploading an OVF of vApp template
|
||||
* 3. uploading disks described from the OVF
|
||||
* 4. finishing task for uploading
|
||||
* The status of vApp template will be NOT_READY(0) until the ovf and all disks are uploaded
|
||||
* to the transfer site. After this a task will run on the vApp template uploading.
|
||||
* Uploading vApp template to a vDC.
|
||||
*
|
||||
* The operation is separate on several steps:
|
||||
* <ol>
|
||||
* <li>creating empty vApp template entity
|
||||
* <li>uploading an OVF of vApp template
|
||||
* <li>uploading disks described from the OVF
|
||||
* <li>finishing task for uploading
|
||||
* </ol>
|
||||
* The status of vApp template will be {@link org.jclouds.vcloud.director.v1_5.domain.ResourceEntityType.Status#NOT_READY NOT_READY(0)}
|
||||
* until the ovf and all disks are uploaded to the transfer site. After this a task will run on the vApp template uploading.
|
||||
*
|
||||
* Note that the empty vApp template's getFiles() returns a file of size -1 after step one above,
|
||||
* because the descriptor.ovf does not yet exist.
|
||||
|
|
|
@ -46,7 +46,7 @@ public class AdminCatalogClientExpectTest extends BaseVCloudDirectorRestClientEx
|
|||
private Reference orgRef = Reference.builder()
|
||||
.type("application/vnd.vmware.vcloud.catalog+xml")
|
||||
.name("QunyingTestCatalog")
|
||||
.href(URI.create(endpoint + "/admin/catalog/7212e451-76e1-4631-b2de-ba1dfd8080e4"))
|
||||
.href(URI.create(endpoint + "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0"))
|
||||
.build();
|
||||
|
||||
private Reference catalogRef = Reference.builder()
|
||||
|
@ -59,7 +59,7 @@ public class AdminCatalogClientExpectTest extends BaseVCloudDirectorRestClientEx
|
|||
public void testCreateCatalog() {
|
||||
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||
new VcloudHttpRequestPrimer()
|
||||
.apiCommand("POST", "/admin/org/???/catalogs")
|
||||
.apiCommand("POST", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/catalogs")
|
||||
.xmlFilePayload("/catalog/admin/createCatalogSource.xml", VCloudDirectorMediaType.ADMIN_CATALOG)
|
||||
.acceptMedia(VCloudDirectorMediaType.ADMIN_CATALOG)
|
||||
.httpRequestBuilder().build(),
|
||||
|
@ -70,16 +70,10 @@ public class AdminCatalogClientExpectTest extends BaseVCloudDirectorRestClientEx
|
|||
AdminCatalog source = createCatalogSource();
|
||||
AdminCatalog expected = createCatalog();
|
||||
|
||||
assertEquals(client.getAdminCatalogClient().createCatalog(catalogRef.getHref(), source), expected);
|
||||
assertEquals(client.getAdminCatalogClient().createCatalog(orgRef.getHref(), source), expected);
|
||||
}
|
||||
|
||||
// FIXME temporarily disabling this test due to JAXB error:
|
||||
// javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.vmware.com/vcloud/v1.5", local:"AdminCatalog").
|
||||
// Expected elements are <{http://www.vmware.com/vcloud/v1.5}Catalog>,<{http://www.vmware.com/vcloud/v1.5}CatalogItems>,
|
||||
// <{http://www.vmware.com/vcloud/v1.5}CatalogReference>,<{http://www.vmware.com/vcloud/v1.5}Error>,
|
||||
// <{http://www.vmware.com/vcloud/v1.5}Link>,<{http://www.vmware.com/vcloud/v1.5}Owner>,
|
||||
// <{http://www.vmware.com/vcloud/v1.5}Task>
|
||||
@Test(enabled = false)
|
||||
@Test
|
||||
public void testGetCatalog() {
|
||||
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
|
||||
new VcloudHttpRequestPrimer()
|
||||
|
|
Loading…
Reference in New Issue