fix gnpy model
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / gnpy / consumer / GnpyResource.java
1 /*
2  * Copyright © 2021 Orange, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.transportpce.pce.gnpy.consumer;
9
10 import javax.ws.rs.Consumes;
11 import javax.ws.rs.GET;
12 import javax.ws.rs.HEAD;
13 import javax.ws.rs.POST;
14 import javax.ws.rs.Path;
15 import javax.ws.rs.Produces;
16 import javax.ws.rs.core.MediaType;
17 import org.opendaylight.yang.gen.v1.gnpy.gnpy.api.rev220221.Request;
18 import org.opendaylight.yang.gen.v1.gnpy.path.rev220615.Result;
19
20
21 @Path("/api/v1")
22 public interface GnpyResource {
23
24     @HEAD
25     String checkStatus();
26
27     @POST
28     @Path("/path-computation")
29     @Produces(MediaType.APPLICATION_JSON)
30     @Consumes(MediaType.APPLICATION_JSON)
31     Result computePathRequest(Request request);
32
33     @GET
34     @Path("/status")
35     @Produces(MediaType.APPLICATION_JSON)
36     GnpyStatus getStatus();
37
38 }