@Override public void create() throws ResourceAllocationException { Vpc vpc = _vpcService.createVpc(getZoneId(), getVpcOffering(), getEntityOwnerId(), getVpcName(), getDisplayText(), getCidr(), getNetworkDomain(), getDisplayVpc()); if (vpc != null) { setEntityId(vpc.getId()); setEntityUuid(vpc.getUuid()); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a VPC"); } }
long copyOfVpcId; try { copyOfVpc = _vpcService.createVpc(vpc.getZoneId(), vpcOfferingId, vpc.getAccountId(), vpc.getName(), vpc.getDisplayText(), vpc.getCidr(), vpc.getNetworkDomain(), vpc.isDisplay()); copyOfVpcId = copyOfVpc.getId();
@Override public void create() throws ResourceAllocationException { final Vpc vpc = _vpcService.createVpc(getZoneId(), getVpcOffering(), getEntityOwnerId(), getVpcName(), getDisplayText(), getCidr(), getNetworkDomain(), getDisplayVpc(), getSourceNatList(), getSyslogServerList(), getAdvertInterval(), getAdvertMethod()); if (vpc != null) { setEntityId(vpc.getId()); setEntityUuid(vpc.getUuid()); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a VPC"); } }