@Path(value="devices")
public class DevicesWebResource
extends org.onosproject.rest.AbstractWebResource
| Constructor and Description |
|---|
DevicesWebResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
getDevice(String id)
Gets details of infrastructure device.
|
javax.ws.rs.core.Response |
getDevicePorts(String id)
Gets ports of infrastructure device.
|
javax.ws.rs.core.Response |
getDevices()
Gets all infrastructure devices.
|
javax.ws.rs.core.Response |
removeDevice(String id)
Removes infrastructure device.
|
javax.ws.rs.core.Response |
setPortState(String id,
String portId,
InputStream stream)
Changes the administrative state of a port.
|
codec, encodeArray, getService, mapper, newArray, newObject@GET @Produces(value="application/json") public javax.ws.rs.core.Response getDevices()
@GET
@Path(value="{id}")
@Produces(value="application/json")
public javax.ws.rs.core.Response getDevice(@PathParam(value="id")
String id)
id - device identifier@DELETE
@Path(value="{id}")
@Produces(value="application/json")
public javax.ws.rs.core.Response removeDevice(@PathParam(value="id")
String id)
id - device identifier@GET
@Path(value="{id}/ports")
@Produces(value="application/json")
public javax.ws.rs.core.Response getDevicePorts(@PathParam(value="id")
String id)
id - device identifier@POST
@Path(value="{id}/portstate/{port_id}")
@Consumes(value="application/json")
@Produces(value="application/json")
public javax.ws.rs.core.Response setPortState(@PathParam(value="id")
String id,
@PathParam(value="port_id")
String portId,
InputStream stream)
id - device identifierportId - port numberstream - input JSON