Srikanth Vavilapalli | b1f168d | 2014-10-19 21:31:52 -0700 | [diff] [blame] | 1 | package net.onrc.onos.apps.segmentrouting.web; |
| 2 | |
| 3 | import org.restlet.resource.Delete; |
| 4 | import org.restlet.resource.Get; |
| 5 | import org.restlet.resource.Post; |
| 6 | import org.restlet.resource.ServerResource; |
| 7 | import org.slf4j.Logger; |
| 8 | import org.slf4j.LoggerFactory; |
| 9 | |
| 10 | /** |
| 11 | * Base class for return router statistics |
| 12 | * |
| 13 | */ |
| 14 | public class SegmentRouterTunnelResource extends ServerResource { |
| 15 | protected final static Logger log = |
| 16 | LoggerFactory.getLogger(SegmentRouterTunnelResource.class); |
| 17 | |
| 18 | @Post("json") |
| 19 | public String createTunnel(String tunnelParams) { |
| 20 | String reply = "success"; |
| 21 | log.debug("createTunnel with params {}", tunnelParams); |
| 22 | return reply; |
| 23 | } |
| 24 | |
| 25 | @Delete("json") |
| 26 | public String deleteTunnel(String tunnelId) { |
| 27 | String reply = "deleted"; |
| 28 | log.debug("deleteTunnel with Id {}", tunnelId); |
| 29 | return reply; |
| 30 | } |
| 31 | |
| 32 | @Get("json") |
| 33 | public String getTunnel() { |
| 34 | String reply = "success"; |
| 35 | log.debug("getTunnel with params"); |
| 36 | return reply; |
| 37 | } |
| 38 | } |