1 /*******************************************************************************
\r
2 * Copyright © 2017-2018 AT&T Intellectual Property.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
15 ******************************************************************************/
\r
16 package org.onap.ccsdk.apps.ms.vlantagapi.core.service;
\r
18 import jakarta.validation.Valid;
\r
19 import javax.ws.rs.Consumes;
\r
20 import javax.ws.rs.GET;
\r
21 import javax.ws.rs.POST;
\r
22 import javax.ws.rs.Path;
\r
23 import javax.ws.rs.PathParam;
\r
24 import javax.ws.rs.Produces;
\r
25 import javax.ws.rs.core.MediaType;
\r
27 import org.onap.ccsdk.apps.ms.vlantagapi.core.exception.VlantagApiException;
\r
28 import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequest;
\r
29 import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagResponse;
\r
30 import org.onap.ccsdk.apps.ms.vlantagapi.core.model.PingResponse;
\r
31 import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequest;
\r
32 import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagResponse;
\r
35 * VlantagApiService.java Purpose: Provide Vlantag Assignment & UnAssignment
\r
36 * APIs interface for VNFs
\r
38 * @author Saurav Paira
\r
42 public interface VlantagApiService {
\r
45 * This is a assignVlanTag service to assign Vlantags based on the
\r
46 * AssignVlanTagRequest and Policy instance.
\r
48 * @param AssignVlanTagRequest
\r
49 * @return AssignVlanTagResponse
\r
53 @Consumes({ MediaType.APPLICATION_JSON })
\r
54 @Produces({ MediaType.APPLICATION_JSON })
\r
55 AssignVlanTagResponse assignVlanTag(@Valid AssignVlanTagRequest body) throws VlantagApiException, Exception;
\r
58 * This is a unassignVlanTag service to unassign Vlantags based on the
\r
59 * UnassignVlanTagRequest and Policy instance.
\r
61 * @param UnassignVlanTagRequest
\r
62 * @return UnassignVlanTagResponse
\r
65 @Path("/v1/unassign")
\r
66 @Consumes({ MediaType.APPLICATION_JSON })
\r
67 @Produces({ MediaType.APPLICATION_JSON })
\r
68 UnassignVlanTagResponse unassignVlanTag(@Valid UnassignVlanTagRequest body) throws VlantagApiException, Exception;
\r
71 * This is a ping service to check the Vlantag Api is Up and running.
\r
74 * @return PingResponse
\r
77 @Path("/v1/ping/{name}")
\r
78 @Produces(MediaType.APPLICATION_JSON)
\r
79 PingResponse getPing(@PathParam("name") String name);
\r