mirror of https://github.com/apache/jclouds.git
Issue #1184: Changes for Abiquo. @Named annotations in all async api methods.
This commit is contained in:
parent
dce830adb9
commit
94c5902cc3
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -67,6 +68,7 @@ public interface AdminAsyncApi {
|
|||
/**
|
||||
* @see AdminApi#getCurrentUser()
|
||||
*/
|
||||
@Named("user:get")
|
||||
@GET
|
||||
@Path("/login")
|
||||
@Consumes(UserDto.BASE_MEDIA_TYPE)
|
||||
|
@ -78,6 +80,7 @@ public interface AdminAsyncApi {
|
|||
/**
|
||||
* @see AdminApi#listRoles()
|
||||
*/
|
||||
@Named("role:list")
|
||||
@GET
|
||||
@Path("/admin/roles")
|
||||
@Consumes(RolesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -87,6 +90,7 @@ public interface AdminAsyncApi {
|
|||
/**
|
||||
* @see AdminApi#listRoles(Enterprise enterprise)
|
||||
*/
|
||||
@Named("role:list")
|
||||
@GET
|
||||
@Path("/admin/roles")
|
||||
@Consumes(RolesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -97,6 +101,7 @@ public interface AdminAsyncApi {
|
|||
/**
|
||||
* @see AdminApi#getRole(UserDto)
|
||||
*/
|
||||
@Named("role:get")
|
||||
@GET
|
||||
@Consumes(RoleDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -106,6 +111,7 @@ public interface AdminAsyncApi {
|
|||
/**
|
||||
* @see AdminApi#getRole(Integer)
|
||||
*/
|
||||
@Named("role:get")
|
||||
@GET
|
||||
@Path("/admin/roles/{role}")
|
||||
@Consumes(RoleDto.BASE_MEDIA_TYPE)
|
||||
|
@ -116,12 +122,14 @@ public interface AdminAsyncApi {
|
|||
/**
|
||||
* @see AdminApi#deleteRole(RoleDto)
|
||||
*/
|
||||
@Named("role:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteRole(@EndpointLink("edit") @BinderParam(BindToPath.class) RoleDto role);
|
||||
|
||||
/**
|
||||
* @see AdminApi#updateRole(RoleDto)
|
||||
*/
|
||||
@Named("role:update")
|
||||
@PUT
|
||||
@Produces(RoleDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(RoleDto.BASE_MEDIA_TYPE)
|
||||
|
@ -131,6 +139,7 @@ public interface AdminAsyncApi {
|
|||
/**
|
||||
* @see AdminApi#createRole(RoleDto)
|
||||
*/
|
||||
@Named("role:create")
|
||||
@POST
|
||||
@Path("/admin/roles")
|
||||
@Produces(RoleDto.BASE_MEDIA_TYPE)
|
||||
|
@ -141,6 +150,7 @@ public interface AdminAsyncApi {
|
|||
/**
|
||||
* @see AdminApi#listPrivileges(RoleDto)
|
||||
*/
|
||||
@Named("privilege:list")
|
||||
@GET
|
||||
@Consumes(PrivilegesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -116,6 +117,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listVirtualDatacenters(VirtualDatacenterOptions)
|
||||
*/
|
||||
@Named("vdc:list")
|
||||
@GET
|
||||
@Path("/virtualdatacenters")
|
||||
@Consumes(VirtualDatacentersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -125,6 +127,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getVirtualDatacenter(Integer)
|
||||
*/
|
||||
@Named("vdc:get")
|
||||
@GET
|
||||
@Path("/virtualdatacenters/{virtualdatacenter}")
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
|
@ -137,6 +140,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#createVirtualDatacenter(VirtualDatacenterDto, Datacenter,
|
||||
* Enterprise)
|
||||
*/
|
||||
@Named("vdc:create")
|
||||
@POST
|
||||
@Path("/virtualdatacenters")
|
||||
@Consumes(VirtualDatacenterDto.BASE_MEDIA_TYPE)
|
||||
|
@ -150,6 +154,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#updateVirtualDatacenter(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("vdc:update")
|
||||
@PUT
|
||||
@Consumes(VirtualDatacenterDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualDatacenterDto.BASE_MEDIA_TYPE)
|
||||
|
@ -160,6 +165,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#deleteVirtualDatacenter(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("vdc:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteVirtualDatacenter(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) VirtualDatacenterDto virtualDatacenter);
|
||||
|
@ -167,6 +173,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listAvailableTemplates(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("vdc:listtemplates")
|
||||
@GET
|
||||
@Consumes(VirtualMachineTemplatesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -177,6 +184,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#listAvailableTemplates(VirtualDatacenterDto,
|
||||
* VirtualMachineTemplateOptions)
|
||||
*/
|
||||
@Named("vdc:listtemplates")
|
||||
@GET
|
||||
@Consumes(VirtualMachineTemplatesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -187,6 +195,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listStorageTiers(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("vdc:listtiers")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(TiersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -197,6 +206,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getStorageTier(VirtualDatacenterDto, Integer)
|
||||
*/
|
||||
@Named("vdc:gettier")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
|
@ -211,6 +221,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listAvailablePublicIps(VirtualDatacenterDto, IpOptions)
|
||||
*/
|
||||
@Named("vdc:listavailablepublicips")
|
||||
@GET
|
||||
@Consumes(PublicIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -221,6 +232,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listPurchasedPublicIps(VirtualDatacenterDto, IpOptions)
|
||||
*/
|
||||
@Named("vdc:listpurchasedpublicips")
|
||||
@GET
|
||||
@Consumes(PublicIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -231,6 +243,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#purchasePublicIp(PublicIpDto)
|
||||
*/
|
||||
@Named("vdc:purchasepublicip")
|
||||
@PUT
|
||||
@Consumes(PublicIpDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -240,6 +253,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#releasePublicIp(PublicIpDto)
|
||||
*/
|
||||
@Named("vdc:releasepublicip")
|
||||
@PUT
|
||||
@Consumes(PublicIpDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -251,6 +265,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listPrivateNetworks(VirtualDatacenter)
|
||||
*/
|
||||
@Named("privatenetwork:list")
|
||||
@GET
|
||||
@Consumes(VLANNetworksDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -260,6 +275,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getPrivateNetwork(VirtualDatacenterDto, Integer)
|
||||
*/
|
||||
@Named("privatenetwork:get")
|
||||
@GET
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
@Consumes(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
|
@ -271,6 +287,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#createPrivateNetwork(VirtualDatacenterDto, VLANNetworkDto)
|
||||
*/
|
||||
@Named("privatenetwork:create")
|
||||
@POST
|
||||
@Consumes(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
|
@ -282,6 +299,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#updatePrivateNetwork(VLANNetworkDto)
|
||||
*/
|
||||
@Named("privatenetwork:update")
|
||||
@PUT
|
||||
@Consumes(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
|
@ -292,6 +310,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#deletePrivateNetwork(VLANNetworkDto)
|
||||
*/
|
||||
@Named("privatenetwork:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deletePrivateNetwork(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) VLANNetworkDto privateNetwork);
|
||||
|
@ -299,6 +318,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getDefaultNetwork(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("vdc:getdefaultnetwork")
|
||||
@GET
|
||||
@Consumes(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -308,6 +328,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#setDefaultNetwork(VirtualDatacenterDto, VLANNetworkDto)
|
||||
*/
|
||||
@Named("vdc:setdefaultnetwork")
|
||||
@PUT
|
||||
@Produces(LinksDto.BASE_MEDIA_TYPE)
|
||||
ListenableFuture<Void> setDefaultNetwork(
|
||||
|
@ -319,6 +340,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listPrivateNetworkIps(VLANNetworkDto)
|
||||
*/
|
||||
@Named("privatenetwork:listips")
|
||||
@GET
|
||||
@Consumes(PrivateIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -328,6 +350,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listPrivateNetworkIps(VLANNetworkDto, IpOptions)
|
||||
*/
|
||||
@Named("privatenetwork:listips")
|
||||
@GET
|
||||
@Consumes(PrivateIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -337,6 +360,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getPrivateNetworkIp(VLANNetworkDto, Integer)
|
||||
*/
|
||||
@Named("privatenetwork:getip")
|
||||
@GET
|
||||
@Consumes(PrivateIpDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -349,6 +373,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listVirtualAppliances(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("vapp:list")
|
||||
@GET
|
||||
@Consumes(VirtualAppliancesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -358,6 +383,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getVirtualAppliance(VirtualDatacenterDto, Integer)
|
||||
*/
|
||||
@Named("vapp:get")
|
||||
@GET
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
@Consumes(VirtualApplianceDto.BASE_MEDIA_TYPE)
|
||||
|
@ -369,6 +395,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getVirtualApplianceState(VirtualApplianceDto)
|
||||
*/
|
||||
@Named("vapp:getstate")
|
||||
@GET
|
||||
@Consumes(VirtualApplianceStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -379,6 +406,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#createVirtualAppliance(VirtualDatacenterDto,
|
||||
* VirtualApplianceDto)
|
||||
*/
|
||||
@Named("vapp:create")
|
||||
@POST
|
||||
@Consumes(VirtualApplianceDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualApplianceDto.BASE_MEDIA_TYPE)
|
||||
|
@ -390,6 +418,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#updateVirtualAppliance(VirtualApplianceDto)
|
||||
*/
|
||||
@Named("vapp:update")
|
||||
@PUT
|
||||
@Consumes(VirtualApplianceDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualApplianceDto.BASE_MEDIA_TYPE)
|
||||
|
@ -400,6 +429,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#deleteVirtualAppliance(VirtualApplianceDto)
|
||||
*/
|
||||
@Named("vapp:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteVirtualAppliance(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) VirtualApplianceDto virtualAppliance);
|
||||
|
@ -408,6 +438,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#deleteVirtualAppliance(VirtualApplianceDto,
|
||||
* VirtualApplianceOptions)
|
||||
*/
|
||||
@Named("vapp:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteVirtualAppliance(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) VirtualApplianceDto virtualAppliance,
|
||||
|
@ -417,6 +448,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#deployVirtualAppliance(VirtualApplianceDto,
|
||||
* VirtualMachineTaskDto)
|
||||
*/
|
||||
@Named("vapp:deploy")
|
||||
@POST
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualMachineTaskDto.BASE_MEDIA_TYPE)
|
||||
|
@ -429,6 +461,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#undeployVirtualAppliance(VirtualApplianceDto,
|
||||
* VirtualMachineTaskDto)
|
||||
*/
|
||||
@Named("vapp:undeploy")
|
||||
@POST
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualMachineTaskDto.BASE_MEDIA_TYPE)
|
||||
|
@ -440,6 +473,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getVirtualAppliancePrice(VirtualApplianceDto)
|
||||
*/
|
||||
@Named("vapp:gerprice")
|
||||
@GET
|
||||
@Consumes(MediaType.TEXT_PLAIN)
|
||||
@ResponseParser(ReturnStringIf2xx.class)
|
||||
|
@ -451,6 +485,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listVirtualMachines(VirtualApplianceDto)
|
||||
*/
|
||||
@Named("vm:list")
|
||||
@GET
|
||||
@Consumes(VirtualMachinesWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -461,6 +496,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#listVirtualMachines(VirtualApplianceDto,
|
||||
* VirtualMachineOptions)
|
||||
*/
|
||||
@Named("vm:list")
|
||||
@GET
|
||||
@Consumes(VirtualMachinesWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -471,6 +507,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getVirtualMachine(VirtualApplianceDto, Integer)
|
||||
*/
|
||||
@Named("vm:get")
|
||||
@GET
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
@Consumes(VirtualMachineWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
|
@ -483,6 +520,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#createVirtualMachine(VirtualApplianceDto,
|
||||
* VirtualMachineWithNodeExtendedDto)
|
||||
*/
|
||||
@Named("vm:create")
|
||||
@POST
|
||||
@Consumes(VirtualMachineWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualMachineWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
|
@ -494,6 +532,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#deleteVirtualMachine(VirtualMachineDto)
|
||||
*/
|
||||
@Named("vm:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteVirtualMachine(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) VirtualMachineDto virtualMachine);
|
||||
|
@ -501,6 +540,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#updateVirtualMachine(VirtualMachineWithNodeExtendedDto)
|
||||
*/
|
||||
@Named("vm:update")
|
||||
@PUT
|
||||
@ResponseParser(ReturnTaskReferenceOrNull.class)
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
|
@ -512,6 +552,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#updateVirtualMachine(VirtualMachineDto,
|
||||
* VirtualMachineOptions)
|
||||
*/
|
||||
@Named("vm:update")
|
||||
@PUT
|
||||
@ResponseParser(ReturnTaskReferenceOrNull.class)
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
|
@ -524,6 +565,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#changeVirtualMachineState(VirtualMachineDto,
|
||||
* VirtualMachineStateDto)
|
||||
*/
|
||||
@Named("vm:changestate")
|
||||
@PUT
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualMachineStateDto.BASE_MEDIA_TYPE)
|
||||
|
@ -535,6 +577,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getVirtualMachineState(VirtualMachineDto)
|
||||
*/
|
||||
@Named("vm:getstate")
|
||||
@GET
|
||||
@Consumes(VirtualMachineStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -544,6 +587,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listNetworkConfigurations(VirtualMachineDto)
|
||||
*/
|
||||
@Named("vm:listnetworkconfigurations")
|
||||
@GET
|
||||
@Consumes(VMNetworkConfigurationsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -554,6 +598,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#setGatewayNetwork(VirtualMachineDto,
|
||||
* VMNetworkConfigurationDto)
|
||||
*/
|
||||
@Named("vm:setgateway")
|
||||
@PUT
|
||||
@Produces(LinksDto.BASE_MEDIA_TYPE)
|
||||
ListenableFuture<Void> setGatewayNetwork(
|
||||
|
@ -563,6 +608,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#rebootVirtualMachine(VirtualMachineDto)
|
||||
*/
|
||||
@Named("vm:reboot")
|
||||
@POST
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -574,6 +620,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getVirtualMachineTemplate(VirtualMachineTemplateDto)
|
||||
*/
|
||||
@Named("vm:gettemplate")
|
||||
@GET
|
||||
@Consumes(VirtualMachineTemplateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -583,6 +630,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listAttachedVolumes(VirtualMachineDto)
|
||||
*/
|
||||
@Named("vm:listvolumes")
|
||||
@GET
|
||||
@Consumes(VolumesManagementDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -592,6 +640,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#detachAllVolumes(VirtualMachineDto)
|
||||
*/
|
||||
@Named("vm:detachvolumes")
|
||||
@DELETE
|
||||
@ResponseParser(ReturnTaskReferenceOrNull.class)
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
|
@ -602,6 +651,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#replaceVolumes(VirtualMachineDto, VirtualMachineOptions,
|
||||
* VolumeManagementDto...)
|
||||
*/
|
||||
@Named("vm:changevolumes")
|
||||
@PUT
|
||||
@ResponseParser(ReturnTaskReferenceOrNull.class)
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
|
@ -613,6 +663,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listAttachedHardDisks(VirtualMachineDto)
|
||||
*/
|
||||
@Named("vm:listharddisks")
|
||||
@GET
|
||||
@Consumes(DisksManagementDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -622,6 +673,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#detachAllHardDisks(VirtualMachineDto)
|
||||
*/
|
||||
@Named("vm:detachharddisks")
|
||||
@DELETE
|
||||
@ResponseParser(ReturnTaskReferenceOrNull.class)
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
|
@ -631,6 +683,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#replaceHardDisks(VirtualMachineDto, DiskManagementDto...)
|
||||
*/
|
||||
@Named("vm:changeharddisks")
|
||||
@PUT
|
||||
@ResponseParser(ReturnTaskReferenceOrNull.class)
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
|
@ -643,6 +696,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#deployVirtualMachine(VirtualMachineDto,
|
||||
* VirtualMachineTaskDto)
|
||||
*/
|
||||
@Named("vm:deploy")
|
||||
@POST
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualMachineTaskDto.BASE_MEDIA_TYPE)
|
||||
|
@ -655,6 +709,7 @@ public interface CloudAsyncApi {
|
|||
* @see CloudApi#undeployVirtualMachine(VirtualMachineDto,
|
||||
* VirtualMachineTaskDto)
|
||||
*/
|
||||
@Named("vm:undeploy")
|
||||
@POST
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualMachineTaskDto.BASE_MEDIA_TYPE)
|
||||
|
@ -668,6 +723,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listHardDisks(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("harddisk:list")
|
||||
@GET
|
||||
@Consumes(DisksManagementDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -677,6 +733,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getHardDisk(VirtualDatacenterDto, Integer)
|
||||
*/
|
||||
@Named("harddisk:get")
|
||||
@GET
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
@Consumes(DiskManagementDto.BASE_MEDIA_TYPE)
|
||||
|
@ -688,6 +745,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#createHardDisk(VirtualDatacenterDto, DiskManagementDto)
|
||||
*/
|
||||
@Named("harddisk:create")
|
||||
@POST
|
||||
@Consumes(DiskManagementDto.BASE_MEDIA_TYPE)
|
||||
@Produces(DiskManagementDto.BASE_MEDIA_TYPE)
|
||||
|
@ -699,6 +757,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#deleteHardDisk(DiskManagementDto)
|
||||
*/
|
||||
@Named("harddisk:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteHardDisk(@EndpointLink("edit") @BinderParam(BindToPath.class) DiskManagementDto hardDisk);
|
||||
|
||||
|
@ -707,6 +766,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listVolumes(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("volume:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(VolumesManagementDto.BASE_MEDIA_TYPE)
|
||||
|
@ -717,6 +777,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#listVolumes(VirtualDatacenterDto, VolumeOptions)
|
||||
*/
|
||||
@Named("volume:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(VolumesManagementDto.BASE_MEDIA_TYPE)
|
||||
|
@ -728,6 +789,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#getVolume(VirtualDatacenterDto, Integer)
|
||||
*/
|
||||
@Named("volume:get")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
|
@ -740,6 +802,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#createVolume(VirtualDatacenterDto, VolumeManagementDto)
|
||||
*/
|
||||
@Named("volume:create")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
@Consumes(VolumeManagementDto.BASE_MEDIA_TYPE)
|
||||
|
@ -752,6 +815,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#updateVolume(VolumeManagementDto)
|
||||
*/
|
||||
@Named("volume:update")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
@ResponseParser(ReturnTaskReferenceOrNull.class)
|
||||
|
@ -763,6 +827,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#updateVolume(VolumeManagementDto)
|
||||
*/
|
||||
@Named("volume:delete")
|
||||
@EnterpriseEdition
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteVolume(@EndpointLink("edit") @BinderParam(BindToPath.class) VolumeManagementDto volume);
|
||||
|
@ -770,6 +835,7 @@ public interface CloudAsyncApi {
|
|||
/**
|
||||
* @see CloudApi#moveVolume(VolumeManagementDto, VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("volume:move")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
@Fallback(MovedVolume.class)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -71,7 +72,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#listLicenses()
|
||||
*/
|
||||
|
||||
@Named("license:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Path("/licenses")
|
||||
|
@ -82,6 +83,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#listLicenses(LicenseOptions)
|
||||
*/
|
||||
@Named("license:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Path("/licenses")
|
||||
|
@ -92,6 +94,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#addLicense(LicenseDto)
|
||||
*/
|
||||
@Named("license:add")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
@Produces(LicenseDto.BASE_MEDIA_TYPE)
|
||||
|
@ -103,6 +106,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#removeLicense(LicenseDto)
|
||||
*/
|
||||
@Named("license:remove")
|
||||
@DELETE
|
||||
@EnterpriseEdition
|
||||
ListenableFuture<Void> removeLicense(@EndpointLink("edit") @BinderParam(BindToPath.class) LicenseDto license);
|
||||
|
@ -112,6 +116,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#listPrivileges()
|
||||
*/
|
||||
@Named("privilege:list")
|
||||
@GET
|
||||
@Path("/privileges")
|
||||
@Consumes(PrivilegesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -121,6 +126,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#getPrivilege(Integer)
|
||||
*/
|
||||
@Named("privilege:get")
|
||||
@GET
|
||||
@Path("/privileges/{privilege}")
|
||||
@Consumes(PrivilegeDto.BASE_MEDIA_TYPE)
|
||||
|
@ -133,6 +139,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#listSystemProperties()
|
||||
*/
|
||||
@Named("property:list")
|
||||
@GET
|
||||
@Path("/properties")
|
||||
@Consumes(SystemPropertiesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -142,6 +149,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#listSystemProperties(PropertyOptions)
|
||||
*/
|
||||
@Named("property:list")
|
||||
@GET
|
||||
@Path("/properties")
|
||||
@Consumes(SystemPropertiesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -151,6 +159,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#updateSystemProperty(VirtualDatacenterDto)
|
||||
*/
|
||||
@Named("property:update")
|
||||
@PUT
|
||||
@Produces(SystemPropertyDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(SystemPropertyDto.BASE_MEDIA_TYPE)
|
||||
|
@ -163,6 +172,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#listCategories()
|
||||
*/
|
||||
@Named("category:list")
|
||||
@GET
|
||||
@Path("/categories")
|
||||
@Consumes(CategoriesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -172,6 +182,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#getCategory(Integer)
|
||||
*/
|
||||
@Named("category:get")
|
||||
@GET
|
||||
@Path("/categories/{category}")
|
||||
@Consumes(CategoryDto.BASE_MEDIA_TYPE)
|
||||
|
@ -182,6 +193,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#createCategory(CategoryDto)
|
||||
*/
|
||||
@Named("category:create")
|
||||
@POST
|
||||
@Path("/categories")
|
||||
@Produces(CategoryDto.BASE_MEDIA_TYPE)
|
||||
|
@ -192,6 +204,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#updateCategory(CategoryDto)
|
||||
*/
|
||||
@Named("category:update")
|
||||
@PUT
|
||||
@Produces(CategoryDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(CategoryDto.BASE_MEDIA_TYPE)
|
||||
|
@ -202,6 +215,7 @@ public interface ConfigAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#deleteCategory(CategoryDto)
|
||||
*/
|
||||
@Named("category:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteCategory(@EndpointLink("edit") @BinderParam(BindToPath.class) CategoryDto category);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -83,6 +84,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listEnterprises()
|
||||
*/
|
||||
@Named("enterprise:list")
|
||||
@GET
|
||||
@Path("/enterprises")
|
||||
@Consumes(EnterprisesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -92,6 +94,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listEnterprises(EnterpriseOptions)
|
||||
*/
|
||||
@Named("enterprise:list")
|
||||
@GET
|
||||
@Path("/enterprises")
|
||||
@Consumes(EnterprisesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -101,6 +104,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listEnterprises(DatacenterDto, EnterpriseOptions)
|
||||
*/
|
||||
@Named("enterprise:list")
|
||||
@GET
|
||||
@Consumes(EnterprisesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -110,6 +114,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#createEnterprise(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:create")
|
||||
@POST
|
||||
@Path("/enterprises")
|
||||
@Produces(EnterpriseDto.BASE_MEDIA_TYPE)
|
||||
|
@ -120,6 +125,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#getEnterprise(Integer)
|
||||
*/
|
||||
@Named("enterprise:get")
|
||||
@GET
|
||||
@Path("/enterprises/{enterprise}")
|
||||
@Consumes(EnterpriseDto.BASE_MEDIA_TYPE)
|
||||
|
@ -130,6 +136,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#updateEnterprise(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:update")
|
||||
@PUT
|
||||
@Produces(EnterpriseDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(EnterpriseDto.BASE_MEDIA_TYPE)
|
||||
|
@ -140,12 +147,14 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#deleteEnterprise(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteEnterprise(@EndpointLink("edit") @BinderParam(BindToPath.class) EnterpriseDto enterprise);
|
||||
|
||||
/**
|
||||
* @see EnterpriseApi#listAllowedDatacenters(Integer)
|
||||
*/
|
||||
@Named("enterprise:listalloweddatacenters")
|
||||
@GET
|
||||
@Path("/datacenters")
|
||||
@Consumes(DatacentersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -155,6 +164,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listVirtualDatacenters(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:listvirtualdatacenters")
|
||||
@GET
|
||||
@Consumes(VirtualDatacentersDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -166,6 +176,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#getEnterpriseProperties(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:getproperties")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(EnterprisePropertiesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -176,6 +187,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#updateEnterpriseProperties(EnterprisePropertiesDto)
|
||||
*/
|
||||
@Named("enterprse:setproperties")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
@Produces(EnterprisePropertiesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -190,6 +202,7 @@ public interface EnterpriseAsyncApi {
|
|||
* @see EnterpriseApi#createLimits(EnterpriseDto, DatacenterDto,
|
||||
* DatacenterLimitsDto)
|
||||
*/
|
||||
@Named("limit:create")
|
||||
@POST
|
||||
@Produces(DatacenterLimitsDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(DatacenterLimitsDto.BASE_MEDIA_TYPE)
|
||||
|
@ -202,6 +215,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#getLimits(EnterpriseDto, DatacenterDto)
|
||||
*/
|
||||
@Named("limit:get")
|
||||
@GET
|
||||
@Consumes(DatacentersLimitsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -213,6 +227,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#updateLimits(DatacenterLimitsDto)
|
||||
*/
|
||||
@Named("limit:update")
|
||||
@PUT
|
||||
@Produces(DatacenterLimitsDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(DatacenterLimitsDto.BASE_MEDIA_TYPE)
|
||||
|
@ -223,12 +238,14 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#deleteLimits(DatacenterLimitsDto)
|
||||
*/
|
||||
@Named("limit:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteLimits(@EndpointLink("edit") @BinderParam(BindToPath.class) DatacenterLimitsDto limits);
|
||||
|
||||
/**
|
||||
* @see EnterpriseApi#listLimits(EnterpriseDto)
|
||||
*/
|
||||
@Named("limit:list")
|
||||
@GET
|
||||
@Consumes(DatacentersLimitsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -240,6 +257,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listUsers(EnterpriseDto)
|
||||
*/
|
||||
@Named("user:list")
|
||||
@GET
|
||||
@Consumes(UsersDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -248,6 +266,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#getUser(EnterpriseDto, Integer)
|
||||
*/
|
||||
@Named("user:get")
|
||||
@GET
|
||||
@Consumes(UserDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -258,6 +277,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#createUser(EnterpriseDto)
|
||||
*/
|
||||
@Named("user:create")
|
||||
@POST
|
||||
@Produces(UserDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(UserDto.BASE_MEDIA_TYPE)
|
||||
|
@ -268,6 +288,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#updateUser(UserDto)
|
||||
*/
|
||||
@Named("user:update")
|
||||
@PUT
|
||||
@Produces(UserDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(UserDto.BASE_MEDIA_TYPE)
|
||||
|
@ -277,12 +298,14 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#deleteUser(UserDto)
|
||||
*/
|
||||
@Named("user:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteUser(@EndpointLink("edit") @BinderParam(BindToPath.class) UserDto user);
|
||||
|
||||
/**
|
||||
* @see EnterpriseApi#listVirtualMachines(UserDto)
|
||||
*/
|
||||
@Named("user:listvms")
|
||||
@GET
|
||||
@Consumes(VirtualMachinesWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -294,6 +317,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#getDatacenterRepository(EnterpriseDto, Integer)
|
||||
*/
|
||||
@Named("repository:get")
|
||||
@GET
|
||||
@Consumes(DatacenterRepositoryDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -305,6 +329,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#refreshTemplateRepository(Integer, Integer)
|
||||
*/
|
||||
@Named("repository:refresh")
|
||||
@PUT
|
||||
@Path("/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/actions/refresh")
|
||||
ListenableFuture<Void> refreshTemplateRepository(@PathParam("enterprise") Integer enterpriseId,
|
||||
|
@ -315,6 +340,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listExternalNetworks(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:listexternalnetworks")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(VLANNetworksDto.BASE_MEDIA_TYPE)
|
||||
|
@ -327,6 +353,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listVirtualAppliances(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:listvapps")
|
||||
@GET
|
||||
@Consumes(VirtualAppliancesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -336,6 +363,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listVirtualMachines(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:listvms")
|
||||
@GET
|
||||
@Consumes(VirtualMachinesWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -347,6 +375,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listVirtualMachines(EnterpriseDto)
|
||||
*/
|
||||
@Named("enterprise:listreservedmachines")
|
||||
@GET
|
||||
@Consumes(MachinesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -358,6 +387,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#listTemplateDefinitionLists(EnterpriseDto)
|
||||
*/
|
||||
@Named("templatedefinitionlist:list")
|
||||
@GET
|
||||
@Consumes(TemplateDefinitionListsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -368,6 +398,7 @@ public interface EnterpriseAsyncApi {
|
|||
* @see EnterpriseApi#createTemplateDefinitionList(EnterpriseDto,
|
||||
* TemplateDefinitionListDto)
|
||||
*/
|
||||
@Named("templatedefinitionlist:create")
|
||||
@POST
|
||||
@Produces(TemplateDefinitionListDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(TemplateDefinitionListDto.BASE_MEDIA_TYPE)
|
||||
|
@ -379,6 +410,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#updateTemplateDefinitionList(TemplateDefinitionListDto)
|
||||
*/
|
||||
@Named("templatedefinitionlist:update")
|
||||
@PUT
|
||||
@Produces(TemplateDefinitionListDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(TemplateDefinitionListDto.BASE_MEDIA_TYPE)
|
||||
|
@ -389,6 +421,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#deleteTemplateDefinitionList(EnterpriseDto)
|
||||
*/
|
||||
@Named("templatedefinitionlist:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteTemplateDefinitionList(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) TemplateDefinitionListDto templateList);
|
||||
|
@ -396,6 +429,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#getTemplateDefinitionList(EnterpriseDto, Integer)
|
||||
*/
|
||||
@Named("templatedefinitionlist:get")
|
||||
@GET
|
||||
@Consumes(TemplateDefinitionListDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -407,6 +441,7 @@ public interface EnterpriseAsyncApi {
|
|||
/**
|
||||
* @see EnterpriseApi#getTemplateDefinitionList(EnterpriseDto, Integer)
|
||||
*/
|
||||
@Named("templatedefinitionlist:status")
|
||||
@GET
|
||||
@Consumes(TemplatesStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
|
@ -46,6 +47,7 @@ public interface EventAsyncApi {
|
|||
/**
|
||||
* @see EventApi#listEvents()
|
||||
*/
|
||||
@Named("event:list")
|
||||
@GET
|
||||
@Path("/events")
|
||||
@Consumes(EventsDto.BASE_MEDIA_TYPE)
|
||||
|
@ -55,6 +57,7 @@ public interface EventAsyncApi {
|
|||
/**
|
||||
* @see EventApi#listEvents()
|
||||
*/
|
||||
@Named("event:list")
|
||||
@GET
|
||||
@Path("/events")
|
||||
@Consumes(EventsDto.BASE_MEDIA_TYPE)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -124,6 +125,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listDatacenters()
|
||||
*/
|
||||
@Named("datacenter:list")
|
||||
@GET
|
||||
@Path("/datacenters")
|
||||
@Consumes(DatacentersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -133,6 +135,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#createDatacenter(DatacenterDto)
|
||||
*/
|
||||
@Named("datacenter:create")
|
||||
@POST
|
||||
@Path("/datacenters")
|
||||
@Produces(DatacenterDto.BASE_MEDIA_TYPE)
|
||||
|
@ -143,6 +146,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getDatacenter(Integer)
|
||||
*/
|
||||
@Named("datacenter:get")
|
||||
@GET
|
||||
@Path("/datacenters/{datacenter}")
|
||||
@Consumes(DatacenterDto.BASE_MEDIA_TYPE)
|
||||
|
@ -153,6 +157,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateDatacenter(DatacenterDto)
|
||||
*/
|
||||
@Named("datacenter:update")
|
||||
@PUT
|
||||
@Produces(DatacenterDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(DatacenterDto.BASE_MEDIA_TYPE)
|
||||
|
@ -163,6 +168,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#deleteDatacenter(DatacenterDto)
|
||||
*/
|
||||
@Named("datacenter:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteDatacenter(@EndpointLink("edit") @BinderParam(BindToPath.class) DatacenterDto datacenter);
|
||||
|
||||
|
@ -170,6 +176,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#discoverSingleMachine(DatacenterDto, String,
|
||||
* HypervisorType, String, String)
|
||||
*/
|
||||
@Named("machine:discover")
|
||||
@GET
|
||||
@Consumes(MachineDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -183,6 +190,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#discoverSingleMachine(DatacenterDto, String,
|
||||
* HypervisorType, String, String, MachineOptions)
|
||||
*/
|
||||
@Named("machine:discover")
|
||||
@GET
|
||||
@Consumes(MachineDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -196,6 +204,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#discoverMultipleMachines(DatacenterDto, String,
|
||||
* String, HypervisorType, String, String)
|
||||
*/
|
||||
@Named("machine:discover")
|
||||
@GET
|
||||
@Consumes(MachinesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -210,6 +219,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#discoverMultipleMachines(DatacenterDto, String,
|
||||
* String, HypervisorType, String, String, MachineOptions)
|
||||
*/
|
||||
@Named("machine:discover")
|
||||
@GET
|
||||
@Consumes(MachinesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -223,6 +233,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listLimits(DatacenterDto)
|
||||
*/
|
||||
@Named("limit:list")
|
||||
@GET
|
||||
@Consumes(DatacentersLimitsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -233,6 +244,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#checkMachineState(DatacenterDto, String, String,
|
||||
* HypervisorType, String, String)
|
||||
*/
|
||||
@Named("machine:checkstate")
|
||||
@GET
|
||||
@Consumes(MachineStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -246,6 +258,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#checkMachineState(DatacenterDto, String, String,
|
||||
* HypervisorType, String, String, MachineOptions)
|
||||
*/
|
||||
@Named("machine:checkstate")
|
||||
@GET
|
||||
@Consumes(MachineStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -259,6 +272,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#checkMachineIpmiState(DatacenterDto, String,
|
||||
* String, String)
|
||||
*/
|
||||
@Named("machine:checkipmi")
|
||||
@GET
|
||||
@Consumes(MachineIpmiStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -271,6 +285,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#checkMachineIpmiState(DatacenterDto, String,
|
||||
* String, String, IpmiOptions)
|
||||
*/
|
||||
@Named("machine:checkipmi")
|
||||
@GET
|
||||
@Consumes(MachineIpmiStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -285,6 +300,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#getHypervisorTypeFromMachine(DatacenterDto,
|
||||
* DatacenterOptions)
|
||||
*/
|
||||
@Named("hypervisortype:getfrommachine")
|
||||
@GET
|
||||
@Consumes(MediaType.TEXT_PLAIN)
|
||||
@ResponseParser(ReturnStringIf2xx.class)
|
||||
|
@ -294,6 +310,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getHypervisorTypes(DatacenterDto)
|
||||
*/
|
||||
@Named("hypervisortype:list")
|
||||
@GET
|
||||
@Consumes(HypervisorTypesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -305,6 +322,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listRacks(DatacenterDto)
|
||||
*/
|
||||
@Named("rack:list")
|
||||
@GET
|
||||
@Consumes(RacksDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -313,6 +331,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#createRack(DatacenterDto, RackDto)
|
||||
*/
|
||||
@Named("rack:create")
|
||||
@POST
|
||||
@Produces(RackDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(RackDto.BASE_MEDIA_TYPE)
|
||||
|
@ -323,6 +342,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getRack(DatacenterDto, Integer)
|
||||
*/
|
||||
@Named("rack:get")
|
||||
@GET
|
||||
@Consumes(RackDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -333,6 +353,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateRack(RackDto)
|
||||
*/
|
||||
@Named("rack:update")
|
||||
@PUT
|
||||
@Consumes(RackDto.BASE_MEDIA_TYPE)
|
||||
@Produces(RackDto.BASE_MEDIA_TYPE)
|
||||
|
@ -342,6 +363,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#deleteRack(RackDto)
|
||||
*/
|
||||
@Named("rack:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteRack(@EndpointLink("edit") @BinderParam(BindToPath.class) RackDto rack);
|
||||
|
||||
|
@ -350,6 +372,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listManagedRacks(DatacenterDto)
|
||||
*/
|
||||
@Named("ucs:listracks")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(UcsRacksDto.BASE_MEDIA_TYPE)
|
||||
|
@ -360,6 +383,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#createManagedRack(DatacenterDto, UcsRackDto)
|
||||
*/
|
||||
@Named("ucs:createrack")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
@Produces(UcsRackDto.BASE_MEDIA_TYPE)
|
||||
|
@ -372,6 +396,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getManagedRack(DatacenterDto, Integer)
|
||||
*/
|
||||
@Named("ucs:getrack")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(UcsRackDto.BASE_MEDIA_TYPE)
|
||||
|
@ -384,6 +409,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateManagedRack(UcsRackDto)
|
||||
*/
|
||||
@Named("ucs:updaterack")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
@Consumes(UcsRackDto.BASE_MEDIA_TYPE)
|
||||
|
@ -395,6 +421,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listServiceProfiles(UcsRackDto)
|
||||
*/
|
||||
@Named("ucs:listserviceprofiles")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(LogicServersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -405,6 +432,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listServiceProfiles(UcsRackDto, QueryOptions)
|
||||
*/
|
||||
@Named("ucs:listserviceprofiles")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(LogicServersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -415,6 +443,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listServiceProfileTemplates(UcsRackDto)
|
||||
*/
|
||||
@Named("ucs:listserviceprofiletemplates")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(LogicServersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -426,6 +455,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#listServiceProfileTemplates(UcsRackDto,
|
||||
* LogicServerOptions)
|
||||
*/
|
||||
@Named("ucs:listserviceproviletemplates")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(LogicServersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -436,6 +466,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listOrganizations(UcsRackDto)
|
||||
*/
|
||||
@Named("ucs:listorganizations")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(OrganizationsDto.BASE_MEDIA_TYPE)
|
||||
|
@ -446,6 +477,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listOrganizations(UcsRackDto, OrganizationOptions)
|
||||
*/
|
||||
@Named("ucs:listorganizations")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(OrganizationsDto.BASE_MEDIA_TYPE)
|
||||
|
@ -457,6 +489,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#cloneLogicServer(UcsRackDto, LogicServerDto,
|
||||
* OrganizationDto, String)
|
||||
*/
|
||||
@Named("ucs:clonelogicserver")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
ListenableFuture<Void> cloneLogicServer(@EndpointLink("ls-clone") @BinderParam(BindToPath.class) UcsRackDto rack,
|
||||
|
@ -468,6 +501,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#associateLogicServer(UcsRackDto, LogicServerDto,
|
||||
* OrganizationDto, String)
|
||||
*/
|
||||
@Named("ucs:associatelogicserver")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
ListenableFuture<Void> associateLogicServer(
|
||||
|
@ -480,6 +514,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#associateTemplate(UcsRackDto, LogicServerDto,
|
||||
* OrganizationDto, String, String)
|
||||
*/
|
||||
@Named("ucs:associatetemplate")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
ListenableFuture<Void> associateTemplate(
|
||||
|
@ -492,6 +527,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#cloneAndAssociateLogicServer(UcsRackDto,
|
||||
* LogicServerDto, OrganizationDto, String, String)
|
||||
*/
|
||||
@Named("ucs:cloneandassociatelogicserver")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
ListenableFuture<Void> cloneAndAssociateLogicServer(
|
||||
|
@ -503,6 +539,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#dissociateLogicServer(UcsRackDto, LogicServerDto)
|
||||
*/
|
||||
@Named("ucs:dissociatelogicserver")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
ListenableFuture<Void> dissociateLogicServer(
|
||||
|
@ -512,6 +549,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#deleteLogicServer(UcsRackDto, LogicServerDto)
|
||||
*/
|
||||
@Named("ucs:deletelogicserver")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
ListenableFuture<Void> deleteLogicServer(@EndpointLink("ls-delete") @BinderParam(BindToPath.class) UcsRackDto rack,
|
||||
|
@ -520,6 +558,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listFsms(UcsRackDto, String)
|
||||
*/
|
||||
@Named("ucs:listfsms")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(FsmsDto.BASE_MEDIA_TYPE)
|
||||
|
@ -532,6 +571,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listRemoteServices(DatacenterDto)
|
||||
*/
|
||||
@Named("rs:list")
|
||||
@GET
|
||||
@Consumes(RemoteServicesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -542,6 +582,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#createRemoteService(DatacenterDto,
|
||||
* RemoteServiceDto)
|
||||
*/
|
||||
@Named("rs:create")
|
||||
@POST
|
||||
@Produces(RemoteServiceDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(RemoteServiceDto.BASE_MEDIA_TYPE)
|
||||
|
@ -553,6 +594,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getRemoteService(DatacenterDto, RemoteServiceType)
|
||||
*/
|
||||
@Named("rs:get")
|
||||
@GET
|
||||
@Consumes(RemoteServiceDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -564,6 +606,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateRemoteService(RemoteServiceDto)
|
||||
*/
|
||||
@Named("rs:update")
|
||||
@PUT
|
||||
@Consumes(RemoteServiceDto.BASE_MEDIA_TYPE)
|
||||
@Produces(RemoteServiceDto.BASE_MEDIA_TYPE)
|
||||
|
@ -574,6 +617,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#deleteRemoteService(RemoteServiceDto)
|
||||
*/
|
||||
@Named("rs:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteRemoteService(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) RemoteServiceDto remoteService);
|
||||
|
@ -581,6 +625,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#isAvailable(RemoteServiceDto)
|
||||
*/
|
||||
@Named("rs:available")
|
||||
@GET
|
||||
@Fallback(FalseIfNotAvailable.class)
|
||||
ListenableFuture<Boolean> isAvailable(
|
||||
|
@ -591,6 +636,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listMachines(RackDto)
|
||||
*/
|
||||
@Named("machine:list")
|
||||
@GET
|
||||
@Consumes(MachinesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -599,6 +645,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#createMachine(RackDto, MachineDto)
|
||||
*/
|
||||
@Named("machine:create")
|
||||
@POST
|
||||
@Produces(MachineDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(MachineDto.BASE_MEDIA_TYPE)
|
||||
|
@ -609,6 +656,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getMachine(RackDto, Integer)
|
||||
*/
|
||||
@Named("machine:get")
|
||||
@GET
|
||||
@Consumes(MachineDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -619,6 +667,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#checkMachineState(MachineDto)
|
||||
*/
|
||||
@Named("machine:checkstate")
|
||||
@GET
|
||||
@Consumes(MachineStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -629,6 +678,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#checkMachineIpmiState(MachineDto)
|
||||
*/
|
||||
@Named("machine:checkipmi")
|
||||
@GET
|
||||
@Consumes(MachineIpmiStateDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -638,6 +688,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateMachine(MachineDto)
|
||||
*/
|
||||
@Named("machine:update")
|
||||
@PUT
|
||||
@Produces(MachineDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(MachineDto.BASE_MEDIA_TYPE)
|
||||
|
@ -648,12 +699,14 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#deleteMachine(MachineDto)
|
||||
*/
|
||||
@Named("machine:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteMachine(@EndpointLink("edit") @BinderParam(BindToPath.class) MachineDto machine);
|
||||
|
||||
/**
|
||||
* @see InfrastructureApi#reserveMachine(EnterpriseDto, MachineDto)
|
||||
*/
|
||||
@Named("machine:reserve")
|
||||
@POST
|
||||
@Consumes(MachineDto.BASE_MEDIA_TYPE)
|
||||
@Produces(MachineDto.BASE_MEDIA_TYPE)
|
||||
|
@ -665,6 +718,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#cancelReservation(EnterpriseDto, MachineDto)
|
||||
*/
|
||||
@Named("machine:cancelreservation")
|
||||
@DELETE
|
||||
ListenableFuture<Void> cancelReservation(
|
||||
@EndpointLink("reservedmachines") @BinderParam(BindToPath.class) EnterpriseDto enterprise,
|
||||
|
@ -675,6 +729,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#powerOff(MachineDto)
|
||||
*/
|
||||
@Named("machine:poweroff")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
ListenableFuture<Void> powerOff(@EndpointLink("poweroff") @BinderParam(BindToPath.class) MachineDto machine);
|
||||
|
@ -682,6 +737,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#powerOn(MachineDto)
|
||||
*/
|
||||
@Named("machine:poweron")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
ListenableFuture<Void> powerOn(@EndpointLink("poweron") @BinderParam(BindToPath.class) MachineDto machine);
|
||||
|
@ -689,6 +745,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getLogicServer(MachineDto)
|
||||
*/
|
||||
@Named("machine:getlogicserver")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(LogicServerDto.BASE_MEDIA_TYPE)
|
||||
|
@ -699,6 +756,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#ledOn(MachineDto)
|
||||
*/
|
||||
@Named("machine:ledon")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
ListenableFuture<Void> ledOn(@EndpointLink("ledon") @BinderParam(BindToPath.class) MachineDto machine);
|
||||
|
@ -706,6 +764,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#ledOff(MachineDto)
|
||||
*/
|
||||
@Named("machine:ledoff")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
ListenableFuture<Void> ledOff(@EndpointLink("ledoff") @BinderParam(BindToPath.class) MachineDto machine);
|
||||
|
@ -713,6 +772,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getLedLocator(MachineDto)
|
||||
*/
|
||||
@Named("machine:getlocatorled")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(BladeLocatorLedDto.BASE_MEDIA_TYPE)
|
||||
|
@ -720,11 +780,10 @@ public interface InfrastructureAsyncApi {
|
|||
ListenableFuture<BladeLocatorLedDto> getLocatorLed(
|
||||
@EndpointLink("led") @BinderParam(BindToPath.class) MachineDto machine);
|
||||
|
||||
/*********************** Storage Device ***********************/
|
||||
|
||||
/**
|
||||
* @see InfrastructureApi#listVirtualMachinesByMachine(MachineDto)
|
||||
*/
|
||||
@Named("machine:listvms")
|
||||
@GET
|
||||
@Consumes(VirtualMachinesWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -734,6 +793,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getVirtualMachine(MachineDto, Integer)
|
||||
*/
|
||||
@Named("machine:getvm")
|
||||
@GET
|
||||
@Fallback(NullOnNotFoundOr404.class)
|
||||
@Consumes(VirtualMachineWithNodeExtendedDto.BASE_MEDIA_TYPE)
|
||||
|
@ -747,6 +807,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listStorageDevices(DatacenterDto)
|
||||
*/
|
||||
@Named("storagedevice:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(StorageDevicesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -757,6 +818,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listSupportedStorageDevices(DatacenterDto)
|
||||
*/
|
||||
@Named("storagedevice:listsupported")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(StorageDevicesMetadataDto.BASE_MEDIA_TYPE)
|
||||
|
@ -767,6 +829,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getStorageDevice(DatacenterDto, Integer)
|
||||
*/
|
||||
@Named("storagedevice:get")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(StorageDeviceDto.BASE_MEDIA_TYPE)
|
||||
|
@ -780,6 +843,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#createStorageDevice(DatacenterDto,
|
||||
* StorageDeviceDto)
|
||||
*/
|
||||
@Named("storagedevice:create")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
@Produces(StorageDeviceDto.BASE_MEDIA_TYPE)
|
||||
|
@ -792,6 +856,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#deleteStorageDevice(StorageDeviceDto)
|
||||
*/
|
||||
@Named("storagedevice:delete")
|
||||
@EnterpriseEdition
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteStorageDevice(
|
||||
|
@ -800,6 +865,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateStorageDevice(StorageDeviceDto)
|
||||
*/
|
||||
@Named("storagedevice:update")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
@Produces(StorageDeviceDto.BASE_MEDIA_TYPE)
|
||||
|
@ -813,6 +879,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listTiers(DatacenterDto)
|
||||
*/
|
||||
@Named("tier:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(TiersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -822,6 +889,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateTier(TierDto)
|
||||
*/
|
||||
@Named("tier:update")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
@Produces(TierDto.BASE_MEDIA_TYPE)
|
||||
|
@ -832,6 +900,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getTier(DatacenterDto, Integer)
|
||||
*/
|
||||
@Named("tier:get")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(TierDto.BASE_MEDIA_TYPE)
|
||||
|
@ -846,6 +915,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#listStoragePools(StorageDeviceDto,
|
||||
* StoragePoolOptions)
|
||||
*/
|
||||
@Named("storagepool:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(StoragePoolsDto.BASE_MEDIA_TYPE)
|
||||
|
@ -857,6 +927,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listStoragePools(TierDto)
|
||||
*/
|
||||
@Named("storagepool:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(StoragePoolsDto.BASE_MEDIA_TYPE)
|
||||
|
@ -866,6 +937,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#createStoragePool(StorageDeviceDto, StoragePoolDto)
|
||||
*/
|
||||
@Named("storagepool:create")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
@Consumes(StoragePoolDto.BASE_MEDIA_TYPE)
|
||||
|
@ -878,6 +950,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateStoragePool(StoragePoolDto)
|
||||
*/
|
||||
@Named("storagepool:update")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
// For the most strangest reason in world, compiler does not accept
|
||||
|
@ -891,6 +964,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#deleteStoragePool(StoragePoolDto)
|
||||
*/
|
||||
@Named("storagepool:delete")
|
||||
@EnterpriseEdition
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteStoragePool(
|
||||
|
@ -899,6 +973,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getStoragePool(StorageDeviceDto, String)
|
||||
*/
|
||||
@Named("storagepool:get")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(StoragePoolDto.BASE_MEDIA_TYPE)
|
||||
|
@ -912,6 +987,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#refreshStoragePool(StoragePoolDto,
|
||||
* StoragePoolOptions)
|
||||
*/
|
||||
@Named("storagepool:refresh")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(StoragePoolDto.BASE_MEDIA_TYPE)
|
||||
|
@ -924,6 +1000,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listNetworks(DatacenterDto)
|
||||
*/
|
||||
@Named("network:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(VLANNetworksDto.BASE_MEDIA_TYPE)
|
||||
|
@ -934,6 +1011,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listNetwork(DatacenterDto, NetworkOptions)
|
||||
*/
|
||||
@Named("network:list")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(VLANNetworksDto.BASE_MEDIA_TYPE)
|
||||
|
@ -944,6 +1022,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getNetwork(DatacenterDto, Integer)
|
||||
*/
|
||||
@Named("network:get")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Consumes(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
|
@ -956,6 +1035,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#createNetwork(DatacenterDto, VLANNetworkDto)
|
||||
*/
|
||||
@Named("network:create")
|
||||
@EnterpriseEdition
|
||||
@POST
|
||||
@Produces(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
|
@ -968,6 +1048,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#updateNetwork(VLANNetworkDto)
|
||||
*/
|
||||
@Named("network:update")
|
||||
@EnterpriseEdition
|
||||
@PUT
|
||||
@Produces(VLANNetworkDto.BASE_MEDIA_TYPE)
|
||||
|
@ -979,6 +1060,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#deleteNetwork(VLANNetworkDto)
|
||||
*/
|
||||
@Named("network:delete")
|
||||
@EnterpriseEdition
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteNetwork(@EndpointLink("edit") @BinderParam(BindToPath.class) VLANNetworkDto network);
|
||||
|
@ -986,6 +1068,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#checkTagAvailability(DatacenterDto, Integer)
|
||||
*/
|
||||
@Named("network:checktag")
|
||||
@EnterpriseEdition
|
||||
@GET
|
||||
@Path("/datacenters/{datacenter}/network/action/checkavailability")
|
||||
|
@ -1000,6 +1083,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listPublicIps(VLANNetworkDto)
|
||||
*/
|
||||
@Named("publicnetwork:listips")
|
||||
@GET
|
||||
@Consumes(PublicIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1009,6 +1093,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listPublicIps(VLANNetworkDto, IpOptions)
|
||||
*/
|
||||
@Named("publicnetwork:listips")
|
||||
@GET
|
||||
@Consumes(PublicIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1018,6 +1103,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getPublicIp(VLANNetworkDto, Integer)
|
||||
*/
|
||||
@Named("publicnetwork:getip")
|
||||
@GET
|
||||
@Consumes(PublicIpDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1028,6 +1114,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listExternalIps(VLANNetworkDto)
|
||||
*/
|
||||
@Named("externalnetwork:listips")
|
||||
@GET
|
||||
@Consumes(ExternalIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1037,6 +1124,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listExternalIps(VLANNetworkDto, IpOptions)
|
||||
*/
|
||||
@Named("externalnetwork:listips")
|
||||
@GET
|
||||
@Consumes(ExternalIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1046,6 +1134,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getExternalIp(VLANNetworkDto, Integer)
|
||||
*/
|
||||
@Named("externalnetwork:getip")
|
||||
@GET
|
||||
@Consumes(ExternalIpDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1056,6 +1145,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listUnmanagedIps(VLANNetworkDto)
|
||||
*/
|
||||
@Named("unmanagednetwork:listips")
|
||||
@GET
|
||||
@Consumes(UnmanagedIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1065,6 +1155,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listUnmanagedIps(VLANNetworkDto, IpOptions)
|
||||
*/
|
||||
@Named("unmanagednetwork:listips")
|
||||
@GET
|
||||
@Consumes(UnmanagedIpsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1074,6 +1165,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getUnmanagedIp(VLANNetworkDto, Integer)
|
||||
*/
|
||||
@Named("unmanagednetwork:getip")
|
||||
@GET
|
||||
@Consumes(UnmanagedIpDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1086,6 +1178,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#listNetworkServiceTypes(DatacenterDto)
|
||||
*/
|
||||
@Named("networkservicetype:list")
|
||||
@GET
|
||||
@Consumes(NetworkServiceTypesDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1096,6 +1189,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @see InfrastructureApi#createNetworkServiceType(DatacenterDto,
|
||||
* NetworkServiceTypeDto)
|
||||
*/
|
||||
@Named("networkservicetype:create")
|
||||
@POST
|
||||
@Produces(NetworkServiceTypeDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(NetworkServiceTypeDto.BASE_MEDIA_TYPE)
|
||||
|
@ -1107,6 +1201,7 @@ public interface InfrastructureAsyncApi {
|
|||
/**
|
||||
* @see InfrastructureApi#getNetworkServiceType(DatacenterDto, Integer)
|
||||
*/
|
||||
@Named("networkservicetype:get")
|
||||
@GET
|
||||
@Consumes(NetworkServiceTypeDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -1122,6 +1217,7 @@ public interface InfrastructureAsyncApi {
|
|||
* the instance to update with the new values.
|
||||
* @return the updated entity.
|
||||
*/
|
||||
@Named("networkservicetype:update")
|
||||
@PUT
|
||||
@Produces(NetworkServiceTypeDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(NetworkServiceTypeDto.BASE_MEDIA_TYPE)
|
||||
|
@ -1135,6 +1231,7 @@ public interface InfrastructureAsyncApi {
|
|||
* @param nstDto
|
||||
* the entity to delete
|
||||
*/
|
||||
@Named("networkservicetype:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteNetworkServiceType(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) NetworkServiceTypeDto nstDto);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -70,6 +71,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#listCurrencies()
|
||||
*/
|
||||
@Named("currency:list")
|
||||
@GET
|
||||
@Path("/currencies")
|
||||
@Consumes(CurrenciesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -79,6 +81,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#getCurrency(Integer)
|
||||
*/
|
||||
@Named("currency:get")
|
||||
@GET
|
||||
@Path("/currencies/{currency}")
|
||||
@Consumes(CurrencyDto.BASE_MEDIA_TYPE)
|
||||
|
@ -89,6 +92,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#createCurrency(CurrencyDto)
|
||||
*/
|
||||
@Named("currency:create")
|
||||
@POST
|
||||
@Path("/currencies")
|
||||
@Produces(CurrencyDto.BASE_MEDIA_TYPE)
|
||||
|
@ -99,6 +103,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#updateCurrency(CurrencyDto)
|
||||
*/
|
||||
@Named("currency:update")
|
||||
@PUT
|
||||
@Produces(CurrencyDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(CurrencyDto.BASE_MEDIA_TYPE)
|
||||
|
@ -109,6 +114,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see ConfigApi#deleteCurrency(CurrencyDto)
|
||||
*/
|
||||
@Named("currency:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteCurrency(@EndpointLink("edit") @BinderParam(BindToPath.class) CurrencyDto currency);
|
||||
|
||||
|
@ -117,6 +123,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#listCostCodes()
|
||||
*/
|
||||
@Named("costcode:list")
|
||||
@GET
|
||||
@Path("/costcodes")
|
||||
@Consumes(CostCodesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -126,6 +133,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#getCostCode(Integer)
|
||||
*/
|
||||
@Named("costcode:get")
|
||||
@GET
|
||||
@Path("/costcodes/{costcode}")
|
||||
@Consumes(CostCodeDto.BASE_MEDIA_TYPE)
|
||||
|
@ -136,6 +144,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#createCostCode(CostCodeDto)
|
||||
*/
|
||||
@Named("costcode:create")
|
||||
@POST
|
||||
@Path("/costcodes")
|
||||
@Produces(CostCodeDto.BASE_MEDIA_TYPE)
|
||||
|
@ -146,6 +155,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#updateCostCode(CostCodeDto)
|
||||
*/
|
||||
@Named("costcode:update")
|
||||
@PUT
|
||||
@Produces(CostCodeDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(CostCodeDto.BASE_MEDIA_TYPE)
|
||||
|
@ -156,6 +166,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#deleteCostCode(CostCodeDto)
|
||||
*/
|
||||
@Named("costcode:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteCostCode(@EndpointLink("edit") @BinderParam(BindToPath.class) CostCodeDto costcode);
|
||||
|
||||
|
@ -164,6 +175,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#listPricingTemplates()
|
||||
*/
|
||||
@Named("pricingtemplate:list")
|
||||
@GET
|
||||
@Path("/pricingtemplates")
|
||||
@Consumes(PricingTemplatesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -173,6 +185,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#getPricingTemplate(Integer)
|
||||
*/
|
||||
@Named("pricingtemplate:get")
|
||||
@GET
|
||||
@Path("/pricingtemplates/{pricingtemplate}")
|
||||
@Consumes(PricingTemplateDto.BASE_MEDIA_TYPE)
|
||||
|
@ -183,6 +196,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#createPricingTemplate(PricingTemplateDto)
|
||||
*/
|
||||
@Named("pricingtemplate:create")
|
||||
@POST
|
||||
@Path("/pricingtemplates")
|
||||
@Produces(PricingTemplateDto.BASE_MEDIA_TYPE)
|
||||
|
@ -194,6 +208,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#updatePricingTemplate(PricingTemplateDto)
|
||||
*/
|
||||
@Named("pricingtemplate:update")
|
||||
@PUT
|
||||
@Produces(PricingTemplateDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(PricingTemplateDto.BASE_MEDIA_TYPE)
|
||||
|
@ -204,6 +219,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#deletePricingTemplate(PricingTemplateDto)
|
||||
*/
|
||||
@Named("pricingtemplate:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deletePricingTemplate(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) PricingTemplateDto pricingtemplate);
|
||||
|
@ -213,6 +229,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#getCostCodeCurrency(Integer)
|
||||
*/
|
||||
@Named("costcodecurrency:get")
|
||||
@GET
|
||||
@Path("/costcodes/{costcode}/currencies")
|
||||
@Consumes(CostCodeCurrenciesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -224,6 +241,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#updateCostCodeCurrencies(CostCodeCurrenciesDto)
|
||||
*/
|
||||
@Named("costcodecurrency:update")
|
||||
@PUT
|
||||
@Path("/costcodes/{costcode}/currencies")
|
||||
@Produces(CostCodeCurrenciesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -237,6 +255,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#getPricingCostCodes(Integer)
|
||||
*/
|
||||
@Named("pricingcostcode:get")
|
||||
@GET
|
||||
@Path("/pricingtemplates/{pricingtemplate}/costcodes")
|
||||
@Consumes(PricingCostCodesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -247,6 +266,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#getPricingCostCode(Integer)
|
||||
*/
|
||||
@Named("pricingcostcode:get")
|
||||
@GET
|
||||
@Path("/pricingtemplates/{pricingtemplate}/costcodes/{costcode}")
|
||||
@Consumes(PricingCostCodeDto.BASE_MEDIA_TYPE)
|
||||
|
@ -258,6 +278,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#updatePricingCostCode(PricingCostCodeDto)
|
||||
*/
|
||||
@Named("pricingcostcode:update")
|
||||
@PUT
|
||||
@Path("/pricingtemplates/{pricingtemplate}/costcodes/{costcode}")
|
||||
@Produces(PricingCostCodeDto.BASE_MEDIA_TYPE)
|
||||
|
@ -272,6 +293,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#getPricingTiers(Integer)
|
||||
*/
|
||||
@Named("pricingtier:get")
|
||||
@GET
|
||||
@Path("/pricingtemplates/{pricingtemplate}/tiers")
|
||||
@Consumes(PricingTiersDto.BASE_MEDIA_TYPE)
|
||||
|
@ -282,6 +304,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#getPricingTier(Integer)
|
||||
*/
|
||||
@Named("pricingtier:get")
|
||||
@GET
|
||||
@Path("/pricingtemplates/{pricingtemplate}/tiers/{tier}")
|
||||
@Consumes(PricingTierDto.BASE_MEDIA_TYPE)
|
||||
|
@ -293,6 +316,7 @@ public interface PricingAsyncApi {
|
|||
/**
|
||||
* @see PricingApi#updatePricingTier(PricingTierDto)
|
||||
*/
|
||||
@Named("pricingtier:update")
|
||||
@PUT
|
||||
@Path("/pricingtemplates/{pricingtemplate}/tiers/{tier}")
|
||||
@Produces(PricingTierDto.BASE_MEDIA_TYPE)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
|
||||
|
@ -55,6 +56,7 @@ public interface TaskAsyncApi {
|
|||
/**
|
||||
* @see TaskApi#getTask(RESTLink)
|
||||
*/
|
||||
@Named("task:get")
|
||||
@GET
|
||||
@Consumes(TaskDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -64,6 +66,7 @@ public interface TaskAsyncApi {
|
|||
/**
|
||||
* @see TaskApi#listTasks(SingleResourceTransportDto)
|
||||
*/
|
||||
@Named("task:list")
|
||||
@GET
|
||||
@Consumes(TasksDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.jclouds.abiquo.features;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
|
@ -73,6 +74,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
* @see VirtualMachineTemplateApi#listVirtualMachineTemplates(Integer,
|
||||
* Integer)
|
||||
*/
|
||||
@Named("template:list")
|
||||
@GET
|
||||
@Path("/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates")
|
||||
@Consumes(VirtualMachineTemplatesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -85,6 +87,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
* @see VirtualMachineTemplateApi#listVirtualMachineTemplates(Integer,
|
||||
* Integer, VirtualMachineTemplateOptions)
|
||||
*/
|
||||
@Named("template:list")
|
||||
@GET
|
||||
@Path("/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates")
|
||||
@Consumes(VirtualMachineTemplatesDto.BASE_MEDIA_TYPE)
|
||||
|
@ -97,6 +100,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
* @see VirtualMachineTemplateApi#getVirtualMachineTemplate(Integer, Integer,
|
||||
* Integer)
|
||||
*/
|
||||
@Named("template:get")
|
||||
@GET
|
||||
@Path("/{enterprise}/datacenterrepositories/{datacenterrepository}/virtualmachinetemplates/{virtualmachinetemplate}")
|
||||
@Consumes(VirtualMachineTemplateDto.BASE_MEDIA_TYPE)
|
||||
|
@ -109,6 +113,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
/**
|
||||
* @see VirtualMachineTemplateApi#updateVirtualMachineTemplate(VirtualMachineTemplateDto)
|
||||
*/
|
||||
@Named("template:update")
|
||||
@PUT
|
||||
@Produces(VirtualMachineTemplateDto.BASE_MEDIA_TYPE)
|
||||
@Consumes(VirtualMachineTemplateDto.BASE_MEDIA_TYPE)
|
||||
|
@ -119,6 +124,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
/**
|
||||
* @see VirtualMachineTemplateApi#deleteVirtualMachineTemplate(VirtualMachineTemplateDto)
|
||||
*/
|
||||
@Named("template:delete")
|
||||
@DELETE
|
||||
ListenableFuture<Void> deleteVirtualMachineTemplate(
|
||||
@EndpointLink("edit") @BinderParam(BindToPath.class) VirtualMachineTemplateDto template);
|
||||
|
@ -127,6 +133,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
* @see VirtualMachineTemplateApi#createPersistentVirtualMachineTemplate(DatacenterRepositoryDto,
|
||||
* VirtualMachineTemplatePersistentDto)
|
||||
*/
|
||||
@Named("template:createpersistent")
|
||||
@POST
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
@Produces(VirtualMachineTemplatePersistentDto.BASE_MEDIA_TYPE)
|
||||
|
@ -142,6 +149,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
/**
|
||||
* @see VirtualMachineTemplateApi#listConversions(VirtualMachineTemplateDto)
|
||||
*/
|
||||
@Named("conversion:list")
|
||||
@GET
|
||||
@Consumes(ConversionsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -152,6 +160,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
* @see VirtualMachineTemplateApi#listConversions(VirtualMachineTemplateDto,
|
||||
* ConversionOptions)
|
||||
*/
|
||||
@Named("conversion:list")
|
||||
@GET
|
||||
@Consumes(ConversionsDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -163,6 +172,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
* @see VirtualMachineTemplateApi#getConversion(VirtualMachineTemplateDto,
|
||||
* DiskFormatType)
|
||||
*/
|
||||
@Named("conversion:get")
|
||||
@GET
|
||||
@Consumes(ConversionDto.BASE_MEDIA_TYPE)
|
||||
@JAXBResponseParser
|
||||
|
@ -174,6 +184,7 @@ public interface VirtualMachineTemplateAsyncApi {
|
|||
/**
|
||||
* @see VirtualMachineTemplateApi#updateConversion(ConversionDto)
|
||||
*/
|
||||
@Named("conversion:request")
|
||||
@PUT
|
||||
@ResponseParser(ReturnTaskReferenceOrNull.class)
|
||||
@Consumes(AcceptedRequestDto.BASE_MEDIA_TYPE)
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* 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.abiquo.features;
|
||||
|
||||
import static com.google.common.collect.Iterables.concat;
|
||||
import static com.google.common.collect.Iterables.filter;
|
||||
import static com.google.common.collect.Iterables.isEmpty;
|
||||
import static com.google.common.collect.Iterables.size;
|
||||
import static com.google.common.collect.Iterables.transform;
|
||||
import static org.testng.Assert.fail;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.inject.Named;
|
||||
|
||||
import org.jclouds.abiquo.config.AbiquoRestClientModule;
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.util.Strings;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
/**
|
||||
* Check that no method in the apis is missing the {@link Named} annotation.
|
||||
*
|
||||
* @author Ignasi Barrera
|
||||
*/
|
||||
@Test(groups = "unit", testName = "MissingNamedMethodsTest")
|
||||
public class MissingNamedMethodsTest {
|
||||
|
||||
public void testMissingNamedMethods() {
|
||||
Collection<Class<?>> apis = AbiquoRestClientModule.DELEGATE_MAP.values();
|
||||
|
||||
Iterable<String> missing = transform(concat(transform(apis, new Function<Class<?>, Iterable<Method>>() {
|
||||
@Override
|
||||
public Iterable<Method> apply(Class<?> input) {
|
||||
return filter(Arrays.asList(input.getMethods()), new Predicate<Method>() {
|
||||
@Override
|
||||
public boolean apply(Method input) {
|
||||
Named named = input.getAnnotation(Named.class);
|
||||
return named == null || Strings.isNullOrEmpty(named.value()) || !named.value().matches(".+:.+");
|
||||
}
|
||||
});
|
||||
}
|
||||
})), new Function<Method, String>() {
|
||||
@Override
|
||||
public String apply(Method input) {
|
||||
return input.getDeclaringClass().getSimpleName() + "." + input.getName();
|
||||
}
|
||||
});
|
||||
|
||||
if (!isEmpty(missing)) {
|
||||
fail(size(missing) + " methods missing @Named annotation:\n" + Joiner.on('\n').join(missing));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue