@Path(value="ports")
public class VirtualPortWebResource
extends org.onosproject.rest.AbstractWebResource
| Modifier and Type | Field and Description |
|---|---|
static String |
JSON_NOT_NULL |
protected static org.slf4j.Logger |
log |
static String |
VPORT_ID_EXIST |
static String |
VPORT_ID_NOT_EXIST |
static String |
VPORT_NOT_FOUND |
| Constructor and Description |
|---|
VirtualPortWebResource() |
| Modifier and Type | Method and Description |
|---|---|
Iterable<org.onosproject.vtnrsc.VirtualPort> |
changeJsonToPort(com.fasterxml.jackson.databind.JsonNode vPortNodes)
Returns a collection of virtualPorts from subnetNodes.
|
Iterable<org.onosproject.vtnrsc.VirtualPort> |
changeJsonToPorts(com.fasterxml.jackson.databind.JsonNode vPortNodes)
Returns the iterable collection of virtualports from subnetNodes.
|
Iterable<org.onosproject.vtnrsc.VirtualPort> |
createOrUpdateByInputStream(com.fasterxml.jackson.databind.JsonNode vPortNode)
Returns a Object of the currently known infrastructure virtualPort.
|
javax.ws.rs.core.Response |
createPorts(InputStream input) |
javax.ws.rs.core.Response |
deletePorts(String id) |
javax.ws.rs.core.Response |
getPorts() |
javax.ws.rs.core.Response |
getportsById(String id) |
Collection<org.onosproject.vtnrsc.AllowedAddressPair> |
jsonNodeToAllowedAddressPair(com.fasterxml.jackson.databind.JsonNode allowedAddressPairs)
Returns a Object of the currently known infrastructure virtualPort.
|
org.onosproject.vtnrsc.FixedIp |
jsonNodeToFixedIps(com.fasterxml.jackson.databind.JsonNode fixedIpNode)
Returns a collection of fixedIps.
|
Collection<org.onosproject.vtnrsc.SecurityGroup> |
jsonNodeToSecurityGroup(com.fasterxml.jackson.databind.JsonNode securityGroups)
Returns a collection of virtualPorts.
|
protected <T> T |
nullIsNotFound(T item,
String message)
Returns the specified item if that items is null; otherwise throws not
found exception.
|
javax.ws.rs.core.Response |
updatePorts(String id,
InputStream input) |
public static final String VPORT_NOT_FOUND
public static final String VPORT_ID_EXIST
public static final String VPORT_ID_NOT_EXIST
public static final String JSON_NOT_NULL
protected static final org.slf4j.Logger log
@GET @Produces(value="application/json") @Consumes(value="application/json") public javax.ws.rs.core.Response getPorts()
@GET
@Path(value="{id}")
@Produces(value="application/json")
@Consumes(value="application/json")
public javax.ws.rs.core.Response getportsById(@PathParam(value="id")
String id)
@POST @Consumes(value="application/json") @Produces(value="application/json") public javax.ws.rs.core.Response createPorts(InputStream input)
@DELETE
@Path(value="{portUUID}")
@Consumes(value="application/json")
@Produces(value="application/json")
public javax.ws.rs.core.Response deletePorts(@PathParam(value="portUUID")
String id)
@PUT
@Path(value="{id}")
@Consumes(value="application/json")
@Produces(value="application/json")
public javax.ws.rs.core.Response updatePorts(@PathParam(value="id")
String id,
InputStream input)
public Iterable<org.onosproject.vtnrsc.VirtualPort> createOrUpdateByInputStream(com.fasterxml.jackson.databind.JsonNode vPortNode)
vPortNode - the virtualPort json nodepublic Iterable<org.onosproject.vtnrsc.VirtualPort> changeJsonToPorts(com.fasterxml.jackson.databind.JsonNode vPortNodes)
vPortNodes - the virtualPort json nodepublic Iterable<org.onosproject.vtnrsc.VirtualPort> changeJsonToPort(com.fasterxml.jackson.databind.JsonNode vPortNodes)
vPortNodes - the virtualPort json nodepublic Collection<org.onosproject.vtnrsc.AllowedAddressPair> jsonNodeToAllowedAddressPair(com.fasterxml.jackson.databind.JsonNode allowedAddressPairs)
allowedAddressPairs - the allowedAddressPairs json nodepublic Collection<org.onosproject.vtnrsc.SecurityGroup> jsonNodeToSecurityGroup(com.fasterxml.jackson.databind.JsonNode securityGroups)
securityGroups - the virtualPort jsonnodepublic org.onosproject.vtnrsc.FixedIp jsonNodeToFixedIps(com.fasterxml.jackson.databind.JsonNode fixedIpNode)
fixedIpNode - the fixedIp jsonnodeprotected <T> T nullIsNotFound(T item,
String message)
T - item typeitem - item to checkmessage - not found messageorg.onlab.util.ItemNotFoundException - if item is nullCopyright © 2016. All rights reserved.