import org.codehaus.enunciate.jaxrs.ResponseCode;
import org.codehaus.enunciate.jaxrs.StatusCodes;
import org.codehaus.enunciate.jaxrs.TypeHint;
-import org.opendaylight.neutron.spi.INeutronVPNIPSECPolicyAware;
import org.opendaylight.neutron.spi.INeutronVPNIPSECPolicyCRUD;
import org.opendaylight.neutron.spi.NeutronCRUDInterfaces;
import org.opendaylight.neutron.spi.NeutronVPNIPSECPolicy;
@Path("/vpn/ipsecpolicies")
public class NeutronVPNIPSECPoliciesNorthbound
- extends AbstractNeutronNorthbound<NeutronVPNIPSECPolicy, NeutronVPNIPSECPolicyRequest, INeutronVPNIPSECPolicyCRUD, INeutronVPNIPSECPolicyAware> {
+ extends AbstractNeutronNorthbound<NeutronVPNIPSECPolicy, NeutronVPNIPSECPolicyRequest, INeutronVPNIPSECPolicyCRUD> {
private static final String RESOURCE_NAME = "VPNIPSECPolicy";
return new NeutronVPNIPSECPolicyRequest(o);
}
- @Override
- protected Object[] getInstances() {
- return NeutronUtil.getInstances(INeutronVPNIPSECPolicyAware.class, this);
- }
-
- @Override
- protected int canCreate(Object instance, NeutronVPNIPSECPolicy singleton) {
- INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
- return service.canCreateNeutronVPNIPSECPolicy(singleton);
- }
-
- @Override
- protected void created(Object instance, NeutronVPNIPSECPolicy singleton) {
- INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
- service.neutronVPNIPSECPolicyCreated(singleton);
- }
-
- @Override
- protected int canUpdate(Object instance, NeutronVPNIPSECPolicy delta, NeutronVPNIPSECPolicy original) {
- INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
- return service.canUpdateNeutronVPNIPSECPolicy(delta, original);
- }
-
- @Override
- protected void updated(Object instance, NeutronVPNIPSECPolicy updated) {
- INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
- service.neutronVPNIPSECPolicyUpdated(updated);
- }
-
- @Override
- protected int canDelete(Object instance, NeutronVPNIPSECPolicy singleton) {
- INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
- return service.canDeleteNeutronVPNIPSECPolicy(singleton);
- }
-
- @Override
- protected void deleted(Object instance, NeutronVPNIPSECPolicy singleton) {
- INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
- service.neutronVPNIPSECPolicyDeleted(singleton);
- }
-
@Context
UriInfo uriInfo;
@QueryParam("id") String queryID,
@QueryParam("tenant_id") String queryTenantID,
@QueryParam("name") String queryName,
- @QueryParam("description") String queryDescription,
@QueryParam("transform_protocol") String queryTransformProtocol,
@QueryParam("encapsulation_mode") String queryEncapsulationMode,
@QueryParam("auth_algorithm") String queryAuthAlgorithm,
NeutronVPNIPSECPolicy oSS = i.next();
if ((queryID == null || queryID.equals(oSS.getID())) &&
(queryName == null || queryName.equals(oSS.getName())) &&
- (queryDescription == null || queryDescription.equals(oSS.getDescription())) &&
(queryAuthAlgorithm == null || queryAuthAlgorithm.equals(oSS.getAuthAlgorithm())) &&
(queryEncryptionAlgorithm == null || queryEncryptionAlgorithm.equals(oSS.getEncryptionAlgorithm())) &&
(queryPFS == null || queryPFS.equals(oSS.getPerfectForwardSecrecy())) &&
@Consumes({ MediaType.APPLICATION_JSON })
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"),
+ @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response updateVPNIPSECPolicy(
@PathParam("policyID") String policyUUID, final NeutronVPNIPSECPolicyRequest input
@DELETE
@StatusCodes({
@ResponseCode(code = HttpURLConnection.HTTP_NO_CONTENT, condition = "No Content"),
+ @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "Not Found"),
@ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = "No providers available") })
public Response deleteVPNIPSECPolicy(
@PathParam("policyID") String policyUUID) {