@Path(value="hosts")
public class HostsWebResource
extends org.onosproject.rest.AbstractWebResource
| Constructor and Description |
|---|
HostsWebResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createAndAddHost(InputStream stream)
Creates a new host based on JSON input and adds it to the current
host inventory.
|
javax.ws.rs.core.Response |
getHostById(String id)
Get details of end-station host.
|
javax.ws.rs.core.Response |
getHostByMacAndVlan(String mac,
String vlan)
Get details of end-station host with MAC/VLAN.
|
javax.ws.rs.core.Response |
getHosts()
Get all end-station hosts.
|
javax.ws.rs.core.Response |
removeHost(String mac,
String vlan)
Removes infrastructure device.
|
codec, encodeArray, getService, mapper, newArray, newObject@GET @Produces(value="application/json") public javax.ws.rs.core.Response getHosts()
@GET
@Produces(value="application/json")
@Path(value="{id}")
public javax.ws.rs.core.Response getHostById(@PathParam(value="id")
String id)
id - host identifier@GET
@Produces(value="application/json")
@Path(value="{mac}/{vlan}")
public javax.ws.rs.core.Response getHostByMacAndVlan(@PathParam(value="mac")
String mac,
@PathParam(value="vlan")
String vlan)
mac - host MAC addressvlan - host VLAN identifier@POST @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response createAndAddHost(InputStream stream)
stream - input JSON@DELETE
@Path(value="{mac}/{vlan}")
@Produces(value="application/json")
public javax.ws.rs.core.Response removeHost(@PathParam(value="mac")
String mac,
@PathParam(value="vlan")
String vlan)
mac - host MAC addressvlan - host VLAN identifier