2  * ============LICENSE_START=======================================================
 
   3  *  Copyright (C) 2022 Nordix Foundation.
 
   4  *  Modifications Copyright (C) 2022 Nordix Foundation.
 
   5  * ================================================================================
 
   6  * Licensed under the Apache License, Version 2.0 (the "License");
 
   7  * you may not use this file except in compliance with the License.
 
   8  * You may obtain a copy of the License at
 
  10  *      http://www.apache.org/licenses/LICENSE-2.0
 
  12  * Unless required by applicable law or agreed to in writing, software
 
  13  * distributed under the License is distributed on an "AS IS" BASIS,
 
  14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
  15  * See the License for the specific language governing permissions and
 
  16  * limitations under the License.
 
  18  * SPDX-License-Identifier: Apache-2.0
 
  19  * ============LICENSE_END=========================================================
 
  22 package org.onap.policy.distribution.forwarding.testclasses;
 
  24 import javax.ws.rs.Consumes;
 
  25 import javax.ws.rs.POST;
 
  26 import javax.ws.rs.Path;
 
  27 import javax.ws.rs.Produces;
 
  28 import javax.ws.rs.core.MediaType;
 
  29 import javax.ws.rs.core.Response;
 
  30 import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
 
  33  * Class to provide rest end points for LifecycleApiControlLoopSimulator.
 
  35  * @author Sirisha Manchikanti (sirisha.manchikanti@est.tech)
 
  38 @Produces(MediaType.APPLICATION_JSON)
 
  39 public class LifecycleApiControlLoopSimulatorEndpoint {
 
  42      * ControlLoop commissioning end-point.
 
  44      * @param body the post body
 
  45      * @return the response object
 
  48     @Path("/controlloop/v2/commission")
 
  49     @Consumes(MediaType.APPLICATION_JSON)
 
  50     @Produces(MediaType.APPLICATION_JSON)
 
  51     public Response commissionControlLoop(final ToscaServiceTemplate body) {
 
  52         return Response.status(Response.Status.OK).entity(body).build();