Search in sources :

Example 11 with VpcOffering

use of com.cloud.network.vpc.VpcOffering in project cosmic by MissionCriticalCloud.

the class CreateVPCOfferingCmd method create.

// ///////////////////////////////////////////////////
// ///////////////// Accessors ///////////////////////
// ///////////////////////////////////////////////////
@Override
public void create() throws ResourceAllocationException {
    final VpcOffering vpcOff = _vpcProvSvc.createVpcOffering(getVpcOfferingName(), getDisplayText(), getSupportedServices(), getServiceProviders(), getServiceCapabilitystList(), getServiceOfferingId(), getSecondaryServiceOfferingId());
    if (vpcOff != null) {
        setEntityId(vpcOff.getId());
        setEntityUuid(vpcOff.getUuid());
    } else {
        throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a VPC offering");
    }
}
Also used : ServerApiException(com.cloud.api.ServerApiException) VpcOffering(com.cloud.network.vpc.VpcOffering)

Aggregations

VpcOffering (com.cloud.network.vpc.VpcOffering)11 ArrayList (java.util.ArrayList)5 ServerApiException (com.cloud.api.ServerApiException)3 VpcOfferingResponse (com.cloud.api.response.VpcOfferingResponse)3 List (java.util.List)3 ServerApiException (org.apache.cloudstack.api.ServerApiException)3 VpcOfferingResponse (org.apache.cloudstack.api.response.VpcOfferingResponse)3 DataCenter (com.cloud.dc.DataCenter)2 Network (com.cloud.network.Network)2 Service (com.cloud.network.Network.Service)2 PhysicalNetwork (com.cloud.network.PhysicalNetwork)2 ResourceTag (com.cloud.server.ResourceTag)2 EnumSet (java.util.EnumSet)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 ListResponse (com.cloud.api.response.ListResponse)1 NetworkResponse (com.cloud.api.response.NetworkResponse)1 PhysicalNetworkResponse (com.cloud.api.response.PhysicalNetworkResponse)1 ResourceTagResponse (com.cloud.api.response.ResourceTagResponse)1