public class SubnetWebResource
extends org.onosproject.rest.AbstractWebResource
| Modifier and Type | Field and Description |
|---|---|
static String |
JSON_NOT_NULL |
static String |
SUBNET_NOT_CREATE |
static String |
SUBNET_NOT_FOUND |
| Constructor and Description |
|---|
SubnetWebResource() |
| Modifier and Type | Method and Description |
|---|---|
Iterable<org.onosproject.vtnrsc.Subnet> |
changeJsonToSub(com.fasterxml.jackson.databind.JsonNode subnetNodes)
Returns a collection of subnets from subnetNodes.
|
Iterable<org.onosproject.vtnrsc.Subnet> |
changeJsonToSubs(com.fasterxml.jackson.databind.JsonNode subnetNodes)
Returns a collection of subnets from subnetNodes.
|
javax.ws.rs.core.Response |
createSubnet(InputStream input) |
javax.ws.rs.core.Response |
deleteSingleSubnet(String id) |
javax.ws.rs.core.Response |
getSubnet(String id) |
Iterable<org.onosproject.vtnrsc.AllocationPool> |
jsonNodeToAllocationPools(com.fasterxml.jackson.databind.JsonNode allocationPools)
Changes JsonNode alocPools to a collection of the alocPools.
|
Iterable<org.onosproject.vtnrsc.HostRoute> |
jsonNodeToHostRoutes(com.fasterxml.jackson.databind.JsonNode hostRoutes)
Changes hostRoutes JsonNode to a collection of the hostRoutes.
|
javax.ws.rs.core.Response |
listSubnets() |
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 |
updateSubnet(String id,
InputStream input) |
public static final String SUBNET_NOT_CREATE
public static final String SUBNET_NOT_FOUND
public static final String JSON_NOT_NULL
public javax.ws.rs.core.Response listSubnets()
public javax.ws.rs.core.Response getSubnet(String id)
public javax.ws.rs.core.Response createSubnet(InputStream input)
public javax.ws.rs.core.Response updateSubnet(String id, InputStream input)
public javax.ws.rs.core.Response deleteSingleSubnet(String id) throws IOException
IOExceptionpublic Iterable<org.onosproject.vtnrsc.Subnet> changeJsonToSubs(com.fasterxml.jackson.databind.JsonNode subnetNodes)
subnetNodes - the subnet json nodepublic Iterable<org.onosproject.vtnrsc.Subnet> changeJsonToSub(com.fasterxml.jackson.databind.JsonNode subnetNodes)
subnetNodes - the subnet json nodepublic Iterable<org.onosproject.vtnrsc.AllocationPool> jsonNodeToAllocationPools(com.fasterxml.jackson.databind.JsonNode allocationPools)
allocationPools - the allocationPools JsonNodepublic Iterable<org.onosproject.vtnrsc.HostRoute> jsonNodeToHostRoutes(com.fasterxml.jackson.databind.JsonNode hostRoutes)
hostRoutes - the hostRoutes json nodeprotected <T> T nullIsNotFound(T item,
String message)
T - item typeitem - item to checkmessage - not found messageorg.onlab.util.ItemNotFoundException - if item is nullCopyright © 2015. All rights reserved.