91aad18e3ab5663b5417337ea96a7ca085671830
[vfc/nfvo/driver/sfc.git] / zte / sfc-driver / sfc-driver / src / main / java / org / onap / sfc / service / ISdnControllerService.java
1 /**
2  * Copyright 2016 ZTE Corporation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.onap.sfc.service;
18
19 import org.onap.sfc.entity.Result;
20
21 import javax.ws.rs.Consumes;
22 import javax.ws.rs.DELETE;
23 import javax.ws.rs.GET;
24 import javax.ws.rs.HeaderParam;
25 import javax.ws.rs.POST;
26 import javax.ws.rs.Path;
27 import javax.ws.rs.PathParam;
28 import javax.ws.rs.Produces;
29 import javax.ws.rs.core.MediaType;
30 import javax.ws.rs.core.Response;
31
32
33 @Path("/restconf/config/neutron:neutron")
34 public interface ISdnControllerService {
35
36     @Path("/")
37     @GET
38     @Produces(MediaType.APPLICATION_JSON)
39     public Result querySdnController() throws Exception;
40
41     @Path("/port-pairs")
42     @POST
43     @Produces(MediaType.APPLICATION_JSON)
44     @Consumes(MediaType.APPLICATION_JSON)
45     public Response createPortPair(@HeaderParam("Authorization") String authorization, String portPairReq4S) throws Exception;
46
47     @Path("/port-pair-groups")
48     @POST
49     @Produces(MediaType.APPLICATION_JSON)
50     @Consumes(MediaType.APPLICATION_JSON)
51     public Response createPortPairGroup(@HeaderParam("Authorization") String authorization, String ppg4S) throws Exception;
52
53     @Path("/sfc-flow-classifiers")
54     @POST
55     @Produces(MediaType.APPLICATION_JSON)
56     @Consumes(MediaType.APPLICATION_JSON)
57     public Response createFlowCla(@HeaderParam("Authorization") String authorization, String flowClassfierReq) throws Exception;
58
59
60     @Path("/port-chains")
61     @POST
62     @Produces(MediaType.APPLICATION_JSON)
63     @Consumes(MediaType.APPLICATION_JSON)
64     public Response createPortChain(@HeaderParam("Authorization") String authorization, String portChainReq4S) throws Exception;
65
66     @Path("/port-pairs/port-pair/{id}")
67     @DELETE
68     @Produces(MediaType.APPLICATION_JSON)
69     public Response deletePortPair(@HeaderParam("Authorization") String authorization, @PathParam("id") String id) throws Exception;
70
71
72     @Path("/port-pair-groups/port-pair-group/{id}")
73     @DELETE
74     @Produces(MediaType.APPLICATION_JSON)
75     public Response deletePortPairGroup(@HeaderParam("Authorization") String authorization, @PathParam("id") String uuid) throws Exception;
76
77     @Path("/sfc-flow-classifiers/sfc-flow-classifier/{id}")
78     @DELETE
79     @Produces(MediaType.APPLICATION_JSON)
80     public Response deleteFlowClassifiers(@HeaderParam("Authorization") String authorization, @PathParam("id") String id) throws Exception;
81
82     @Path("/port-chains/port-chain/{id}")
83     @DELETE
84     @Produces(MediaType.APPLICATION_JSON)
85     public Response deletePortChain(@HeaderParam("Authorization") String authorization, @PathParam("id") String id) throws Exception;
86
87 }