mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-15 01:36:13 +02:00
Update of discovery for TAPI OLS based on ADVA testing
Change-Id: I1037fa877c88164a805d15f265fd918ec9c1d33d
This commit is contained in:
parent
45c56cc11f
commit
2b5fefbf81
@ -38,6 +38,7 @@ public final class TapiDeviceHelper {
|
||||
private static final Logger log = getLogger(TapiDeviceHelper.class);
|
||||
|
||||
public static final String SERVICE_INTERFACE_POINT = "service-interface-point";
|
||||
public static final String TAPI_COMMON = "tapi-common";
|
||||
public static final String CONTEXT = "tapi-common:context";
|
||||
public static final String UUID = "uuid";
|
||||
public static final String MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC =
|
||||
|
||||
@ -39,6 +39,8 @@ import java.util.Set;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MC_POOL;
|
||||
import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC;
|
||||
import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.SERVICE_INTERFACE_POINT;
|
||||
import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.TAPI_COMMON;
|
||||
import static org.onosproject.drivers.odtn.tapi.TapiDeviceHelper.UUID;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
@ -84,7 +86,8 @@ public class TapiDeviceLambdaQuery extends AbstractHandlerBehaviour
|
||||
MediaType.APPLICATION_JSON_TYPE);
|
||||
log.debug("Service interface point UUID: {}", uuid);
|
||||
JsonNode sipAttributes = new ObjectMapper().readTree(inputStream);
|
||||
JsonNode mcPool = sipAttributes.get(MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC).get(MC_POOL);
|
||||
JsonNode mcPool = sipAttributes.get(TAPI_COMMON + ":" + SERVICE_INTERFACE_POINT).get(0)
|
||||
.get(MEDIA_CHANNEL_SERVICE_INTERFACE_POINT_SPEC).get(MC_POOL);
|
||||
|
||||
//This creates a hashset of OChSignals representing the spectrum availability at the target port.
|
||||
return TapiDeviceHelper.getOchSignal(mcPool);
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
-->
|
||||
<drivers>
|
||||
<driver name="ols" manufacturer="tapi-swagger" hwVersion="0" swVersion="2.1">
|
||||
<behaviour api ="org.onosproject.net.optical.OpticalDevice"
|
||||
impl="org.onosproject.net.optical.DefaultOpticalDevice"/>
|
||||
<behaviour api="org.onosproject.net.device.DeviceDescriptionDiscovery"
|
||||
impl="org.onosproject.drivers.odtn.tapi.TapiDeviceDescriptionDiscovery"/>
|
||||
<behaviour api ="org.onosproject.net.behaviour.LambdaQuery"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user