mirror of https://github.com/apache/jclouds.git
update client with new approach
This commit is contained in:
parent
ed316161ac
commit
1944bd19f6
|
@ -18,21 +18,22 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.features;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
|
||||
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.rest.functions.ReturnNullOnNotFoundOr404;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.Metadata;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.MetadataEntry;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.OrgNetwork;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ReferenceType;
|
||||
import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationToRequest;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ReferenceToEndpoint;
|
||||
import org.jclouds.vcloud.director.v1_5.functions.ThrowVCloudErrorOn4xx;
|
||||
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
|
@ -45,30 +46,33 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
public interface NetworkAsyncClient {
|
||||
|
||||
/**
|
||||
* @see NeworkClient#getNetwork()
|
||||
* @see NeworkClient#getNetwork(ReferenceType)
|
||||
*/
|
||||
@GET
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<OrgNetwork> getNetwork(@EndpointParam URI uri);
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<OrgNetwork> getNetwork(@EndpointParam(parser = ReferenceToEndpoint.class) ReferenceType<?> networkRef);
|
||||
|
||||
/**
|
||||
* @see NeworkClient#getMetadata()
|
||||
* @see NeworkClient#getMetadata(ReferenceType)
|
||||
*/
|
||||
@GET
|
||||
@Path("/metadata/")
|
||||
@Path("/metadata")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Metadata> getMetadata(@EndpointParam URI orgRef);
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Metadata> getMetadata(@EndpointParam(parser = ReferenceToEndpoint.class) ReferenceType<?> networkRef);
|
||||
|
||||
/**
|
||||
* @see NeworkClient#getMetadataEntry()
|
||||
* @see NeworkClient#getMetadataEntry(ReferenceType, String)
|
||||
*/
|
||||
@GET
|
||||
@Path("/metadata/{key}")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<MetadataEntry> getMetadataEntry(@EndpointParam URI metaDataRef);
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<MetadataEntry> getMetadataEntry(@EndpointParam(parser = ReferenceToEndpoint.class) ReferenceType<?> networkRef ,
|
||||
@PathParam("key") String key);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue