}
import org-openroadm-common-state-types {
prefix org-openroadm-common-state-types;
- revision-date 2018-11-30;
}
organization
}
import org-openroadm-service-format {
prefix org-openroadm-service-format;
- revision-date 2019-05-31;
}
organization
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.Lgx;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.lgx.Lgx;
// This class is a temporary workaround while waiting jackson
// support in yang tools https://git.opendaylight.org/gerrit/c/yangtools/+/94852
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.Port;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.Port;
// This class is a temporary workaround while waiting jackson
// support in yang tools https://git.opendaylight.org/gerrit/c/yangtools/+/94852
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.PackageVersion;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.Lgx;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.Port;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.lgx.Lgx;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.Port;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationProcessService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceAEnd;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceZEnd;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirection;
// This class is a temporary workaround while waiting jackson
// support in yang tools https://git.opendaylight.org/gerrit/c/yangtools/+/94852
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirection;
// This class is a temporary workaround while waiting jackson
// support in yang tools https://git.opendaylight.org/gerrit/c/yangtools/+/94852
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.read.ListAppender;
import java.util.List;
+import java.util.Map;
import javax.ws.rs.core.Application;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.TestProperties;
import org.junit.Test;
import org.opendaylight.transportpce.dmaap.client.resource.EventsApiStub;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.NbiNotificationsListener;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationProcessService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationProcessServiceBuilder;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceAEndBuilder;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceZEndBuilder;
import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.slf4j.LoggerFactory;
public class NbiNotificationsListenerImplTest extends JerseyTest {
.setNodeId(new NodeIdType("nodeidtype"))
.setServiceFormat(ServiceFormat.Ethernet)
.setServiceRate(Uint32.valueOf(100))
- .setRxDirection(new RxDirectionBuilder().build())
- .setTxDirection(new TxDirectionBuilder().build())
+ .setRxDirection(Map.of(new RxDirectionKey(Uint8.ZERO),
+ new RxDirectionBuilder().setIndex(Uint8.ZERO).build()))
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO),
+ new TxDirectionBuilder().setIndex(Uint8.ZERO).build()))
.build())
.setServiceZEnd(new ServiceZEndBuilder()
.setClli("clli")
.setNodeId(new NodeIdType("nodeidtype"))
.setServiceFormat(ServiceFormat.Ethernet)
.setServiceRate(Uint32.valueOf(100))
- .setRxDirection(new RxDirectionBuilder().build())
- .setTxDirection(new TxDirectionBuilder().build())
+ .setRxDirection(Map.of(new RxDirectionKey(Uint8.ZERO),
+ new RxDirectionBuilder().setIndex(Uint8.ZERO).build()))
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO),
+ new TxDirectionBuilder().setIndex(Uint8.ZERO).build()))
.build())
.build();
listener.onPublishNotificationProcessService(notification);
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev170818.TransportpceNetworkutilsService;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.tapinetworkutils.rev210408.TransportpceTapinetworkutilsService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
org.opendaylight.yang.gen.v1.http.org.openroadm.tca.rev200327.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.openroadm.user.mgmt.rev191129.$YangModuleInfoImpl.getInstance(),
+ // common models 10.1
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.attributes.rev210924.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev211210.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.phy.codes.rev210528.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev211210.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev210924.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.$YangModuleInfoImpl.getInstance(),
+
// device models 1.2.1 and 2.2.1
org.opendaylight.yang.gen.v1.http.org.openroadm.database.rev161014.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.openroadm.database.rev181019.$YangModuleInfoImpl.getInstance(),
.getInstance(),
// service models
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.$YangModuleInfoImpl
- .getInstance(),
- org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.$YangModuleInfoImpl
- .getInstance(),
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.$YangModuleInfoImpl.getInstance(),
- org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev190531.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.ber.test.rev211210.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.ber.test.rev200529.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.controller.customization.rev211210.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.operational.mode.catalog.rev211210.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.$YangModuleInfoImpl
+ .getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.$YangModuleInfoImpl.getInstance(),
+ org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev211210.$YangModuleInfoImpl.getInstance(),
// tapi models
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.oam.rev181210.$YangModuleInfoImpl.getInstance(),
.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.$YangModuleInfoImpl
.getInstance(),
- org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.$YangModuleInfoImpl
+ org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.$YangModuleInfoImpl
.getInstance(),
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220114.$YangModuleInfoImpl
.getInstance(),
.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705
.$YangModuleInfoImpl.getInstance(),
- org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017
- .$YangModuleInfoImpl.getInstance(),
- org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128
+ org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118
.$YangModuleInfoImpl.getInstance(),
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.$YangModuleInfoImpl
.getInstance(),
import org.junit.Test;
import org.opendaylight.transportpce.common.converter.JsonStringConverter;
import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.GetNotificationsAlarmServiceInputBuilder;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.GetNotificationsAlarmServiceOutput;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.GetNotificationsProcessServiceInputBuilder;
import org.mockito.MockitoAnnotations;
import org.opendaylight.transportpce.nbinotifications.producer.Publisher;
import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.NotificationAlarmService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.NotificationProcessService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationAlarmService;
*/
package org.opendaylight.transportpce.nbinotifications.utils;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.LgxBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import java.util.Map;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.lgx.LgxBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.NotificationProcessService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.NotificationProcessServiceBuilder;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.get.notifications.alarm.service.output.NotificationsAlarmService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceAEndBuilder;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceZEndBuilder;
import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
public final class NotificationServiceDataUtils {
.setRxDirection(getRxDirection());
}
- private static TxDirection getTxDirection() {
- return new TxDirectionBuilder()
+ private static Map<TxDirectionKey, TxDirection> getTxDirection() {
+ return Map.of(new TxDirectionKey(Uint8.ZERO), new TxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName("device name")
.setPortName("port name")
.setLgxPortRack("lgx port rack")
.setLgxPortShelf("lgx port shelf")
.build())
- .build();
+ .setIndex(Uint8.ZERO)
+ .build());
}
- private static RxDirection getRxDirection() {
- return new RxDirectionBuilder()
+ private static Map<RxDirectionKey, RxDirection> getRxDirection() {
+ return Map.of(new RxDirectionKey(Uint8.ZERO), new RxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName("device name")
.setPortName("port name")
.setLgxPortRack("lgx port rack")
.setLgxPortShelf("lgx port shelf")
.build())
- .build();
+ .setIndex(Uint8.ZERO)
+ .build());
}
}
"node-id": "XPONDER-1-2",
"service-rate": 1,
"clli": "clli",
- "tx-direction": {
+ "tx-direction": [
+ {
"port": {
"port-slot": "port slot",
"port-device-name": "device name",
"lgx-port-shelf": "lgx port shelf",
"lgx-port-rack": "lgx port rack",
"lgx-device-name": "lgx device name"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }
+ ],
+ "rx-direction": [
+ {
"port": {
"port-slot": "port slot",
"port-device-name": "device name",
"lgx-port-shelf": "lgx port shelf",
"lgx-port-rack": "lgx port rack",
"lgx-device-name": "lgx device name"
- }
- }
+ },
+ "index": 0
+ }]
},
"connection-type": "service",
"operational-state": "inService",
"node-id": "XPONDER-1-2",
"service-rate": 1,
"clli": "clli",
- "tx-direction": {
+ "tx-direction": [
+ {
"port": {
"port-slot": "port slot",
"port-device-name": "device name",
"lgx-port-shelf": "lgx port shelf",
"lgx-port-rack": "lgx port rack",
"lgx-device-name": "lgx device name"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [
+ {
"port": {
"port-slot": "port slot",
"port-device-name": "device name",
"lgx-port-shelf": "lgx port shelf",
"lgx-port-rack": "lgx port rack",
"lgx-device-name": "lgx device name"
- }
- }
+ },
+ "index": 0
+ }]
},
"service-name": "service1",
"message": "message",
{
- "nbi-notifications:notification-process-service":{
- "common-id":"commond-id",
- "message":"message",
- "operational-state":"inService",
- "service-z-end":{
- "node-id":"XPONDER-1-2",
- "service-rate":1,
- "clli":"clli",
- "service-format":"OC",
- "tx-direction":{
- "port":{
- "port-name":"port name",
- "port-slot":"port slot",
- "port-sub-slot":"port subslot",
- "port-device-name":"device name",
- "port-shelf":"port shelf",
- "port-type":"port type",
- "port-rack":"port rack"
- },
- "lgx":{
- "lgx-port-shelf":"lgx port shelf",
- "lgx-port-rack":"lgx port rack",
- "lgx-port-name":"lgx port name",
- "lgx-device-name":"lgx device name"
+ "nbi-notifications:notification-process-service": {
+ "common-id": "commond-id",
+ "message": "message",
+ "operational-state": "inService",
+ "service-z-end": {
+ "node-id": "XPONDER-1-2",
+ "service-rate": 1,
+ "clli": "clli",
+ "is-split-lambda": false,
+ "service-format": "OC",
+ "tx-direction": [
+ {
+ "index": 0,
+ "port": {
+ "port-name": "port name",
+ "port-slot": "port slot",
+ "port-sub-slot": "port subslot",
+ "port-device-name": "device name",
+ "port-shelf": "port shelf",
+ "port-type": "port type",
+ "port-rack": "port rack"
+ },
+ "lgx": {
+ "lgx-port-shelf": "lgx port shelf",
+ "lgx-port-rack": "lgx port rack",
+ "lgx-port-name": "lgx port name",
+ "lgx-device-name": "lgx device name"
+ }
}
- },
- "rx-direction":{
- "port":{
- "port-name":"port name",
- "port-slot":"port slot",
- "port-sub-slot":"port subslot",
- "port-device-name":"device name",
- "port-shelf":"port shelf",
- "port-type":"port type",
- "port-rack":"port rack"
- },
- "lgx":{
- "lgx-port-shelf":"lgx port shelf",
- "lgx-port-rack":"lgx port rack",
- "lgx-port-name":"lgx port name",
- "lgx-device-name":"lgx device name"
+ ],
+ "rx-direction": [
+ {
+ "index": 0,
+ "port": {
+ "port-name": "port name",
+ "port-slot": "port slot",
+ "port-sub-slot": "port subslot",
+ "port-device-name": "device name",
+ "port-shelf": "port shelf",
+ "port-type": "port type",
+ "port-rack": "port rack"
+ },
+ "lgx": {
+ "lgx-port-shelf": "lgx port shelf",
+ "lgx-port-rack": "lgx port rack",
+ "lgx-port-name": "lgx port name",
+ "lgx-device-name": "lgx device name"
+ }
}
- }
+ ]
},
- "service-name":"service1",
- "connection-type":"service",
- "service-a-end":{
- "node-id":"XPONDER-1-2",
- "service-rate":1,
- "clli":"clli",
- "service-format":"OC",
- "tx-direction":{
- "port":{
- "port-name":"port name",
- "port-slot":"port slot",
- "port-sub-slot":"port subslot",
- "port-device-name":"device name",
- "port-shelf":"port shelf",
- "port-type":"port type",
- "port-rack":"port rack"
- },
- "lgx":{
- "lgx-port-shelf":"lgx port shelf",
- "lgx-port-rack":"lgx port rack",
- "lgx-port-name":"lgx port name",
- "lgx-device-name":"lgx device name"
+ "service-name": "service1",
+ "connection-type": "service",
+ "service-a-end": {
+ "node-id": "XPONDER-1-2",
+ "service-rate": 1,
+ "clli": "clli",
+ "is-split-lambda": false,
+ "service-format": "OC",
+ "tx-direction": [
+ {
+ "index": 0,
+ "port": {
+ "port-name": "port name",
+ "port-slot": "port slot",
+ "port-sub-slot": "port subslot",
+ "port-device-name": "device name",
+ "port-shelf": "port shelf",
+ "port-type": "port type",
+ "port-rack": "port rack"
+ },
+ "lgx": {
+ "lgx-port-shelf": "lgx port shelf",
+ "lgx-port-rack": "lgx port rack",
+ "lgx-port-name": "lgx port name",
+ "lgx-device-name": "lgx device name"
+ }
}
- },
- "rx-direction":{
- "port":{
- "port-name":"port name",
- "port-slot":"port slot",
- "port-sub-slot":"port subslot",
- "port-device-name":"device name",
- "port-shelf":"port shelf",
- "port-type":"port type",
- "port-rack":"port rack"
- },
- "lgx":{
- "lgx-port-shelf":"lgx port shelf",
- "lgx-port-rack":"lgx port rack",
- "lgx-port-name":"lgx port name",
- "lgx-device-name":"lgx device name"
+ ],
+ "rx-direction": [
+ {
+ "index": 0,
+ "port": {
+ "port-name": "port name",
+ "port-slot": "port slot",
+ "port-sub-slot": "port subslot",
+ "port-device-name": "device name",
+ "port-shelf": "port shelf",
+ "port-type": "port type",
+ "port-rack": "port rack"
+ },
+ "lgx": {
+ "lgx-port-shelf": "lgx port shelf",
+ "lgx-port-rack": "lgx port rack",
+ "lgx-port-name": "lgx port name",
+ "lgx-device-name": "lgx device name"
+ }
}
- }
+ ]
},
- "response-failed":""
+ "response-failed": ""
}
-}
\ No newline at end of file
+}
import org.opendaylight.transportpce.networkmodel.service.FrequenciesService;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultSh;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.TransportpceServicehandlerListener;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.RpcStatusEx;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
--- /dev/null
+module org-openroadm-common-attributes {
+ namespace "http://org/openroadm/common-attributes";
+ prefix org-openroadm-common-attributes;
+
+ import org-openroadm-otn-common-types {
+ prefix org-openroadm-otn-common-types;
+ revision-date 2021-09-24;
+ }
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of common attributes.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+
+ grouping parent-odu-allocation {
+ description
+ "parent odu allocation group";
+ container parent-odu-allocation {
+ presence "Explicit assignment of parent ODU trib-slot and trib-port allocation. ";
+ description
+ "parent odu allocation";
+ leaf trib-port-number {
+ type uint16 {
+ range "1 .. 80";
+ }
+ mandatory true;
+ description
+ "Assigned tributary port number in parent OPU";
+ }
+ choice trib-slots-choice {
+ description
+ "trib slot selection";
+ case opu {
+ leaf-list trib-slots {
+ type uint16 {
+ range "1 .. 80";
+ }
+ min-elements 1;
+ max-elements 80;
+ description
+ "Assigned trib slots occupied in parent OPU MSI";
+ }
+ }
+ case opucn {
+ leaf-list opucn-trib-slots {
+ type org-openroadm-otn-common-types:opucn-trib-slot-def;
+ description
+ "Specify the list of OPUCn 5G tributary slots in the form of
+ TS #A.B (G.709 Figure 20-9) in the case of provisioning the low
+ order ODUk to the parent server ODUCn";
+ }
+ }
+ }
+ }
+ }
+
+ grouping deg-threshold {
+ description
+ "Deg threshold grouping";
+ leaf degm-intervals {
+ type uint8 {
+ range "2 .. 10";
+ }
+ default "2";
+ description
+ "G.806 - Consecutive bad intervals required for declare dDEG";
+ }
+ leaf degthr-percentage {
+ type uint16 {
+ range "1 .. 10000";
+ }
+ default "100";
+ description
+ "Percentage of errored blocks required to declare an interval bad, in units of 0.01%";
+ }
+ }
+
+ grouping trail-trace-tx {
+ description
+ "Trail trace tx grouping";
+ leaf tx-sapi {
+ type string {
+ length "0 .. 15";
+ }
+ description
+ "The provisioned 15 character transmit trace SAPI. Implementations shall add the [0] field automatically per ITU-T G.709";
+ }
+ leaf tx-dapi {
+ type string {
+ length "0 .. 15";
+ }
+ description
+ "The provisioned 15 character transmit trace DAPI. Implementations shall add the [0] field automatically per ITU-T G.709";
+ }
+ leaf tx-operator {
+ type string {
+ length "0 .. 32";
+ }
+ description
+ "The provisioned 32 character Operator Specific field";
+ }
+ }
+
+ grouping trail-trace-other {
+ description
+ "Trail trace other grouping";
+ leaf expected-sapi {
+ type string {
+ length "0 .. 15";
+ }
+ description
+ "The provisioned expected SAPI, to be compared with accepted TTI";
+ }
+ leaf expected-dapi {
+ type string {
+ length "0 .. 15";
+ }
+ description
+ "The provisioned expected DAPI, to be compared with accepted TTI";
+ }
+ leaf tim-act-enabled {
+ type boolean;
+ default "false";
+ description
+ "Enables TTI Mismatch consequent actions.";
+ }
+ leaf tim-detect-mode {
+ type enumeration {
+ enum Disabled {
+ description
+ "TTI is ignored";
+ }
+ enum SAPI {
+ description
+ "Expected SAPI is compared to the Accepted TTI. Other TTI fields are ignored";
+ }
+ enum DAPI {
+ description
+ "Expected DAPI is compared to the Accepted TTI. Other TTI fields are ignored";
+ }
+ enum SAPI-and-DAPI {
+ description
+ "Expected SAPI and Expected DAPI are compared to the Accepted TTI. Operator specific TTI field is ignored";
+ }
+ }
+ default "Disabled";
+ description
+ "tim detect mode leaf";
+ }
+ }
+}
--- /dev/null
+module org-openroadm-common-node-types {
+ namespace "http://org/openroadm/common-node-types";
+ prefix org-openroadm-common-node-types;
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of common node types.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2020-12-11 {
+ description
+ "Version 8.1";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2018-11-30 {
+ description
+ "Version 4.1.0";
+ }
+ revision 2018-09-28 {
+ description
+ "Version 4.0.0";
+ }
+ revision 2018-03-30 {
+ description
+ "Version 3.0.0";
+ }
+
+ typedef node-types {
+ type enumeration {
+ enum rdm {
+ value 1;
+ }
+ enum xpdr {
+ value 2;
+ }
+ enum ila {
+ value 3;
+ }
+ enum extplug {
+ value 4;
+ }
+ }
+ description
+ "Identifier for node type
+ 1. rdm for ROADM
+ 2. xpdr for Transponder, Regen
+ 3. ila for in-line amplifier
+ 4. extplug for external pluggable";
+ }
+
+ typedef node-subtypes {
+ type enumeration {
+ enum none {
+ value 1;
+ description
+ "The none-enum indicates there is no node-subtype refinement.
+ Standard OpenROADM node properties apply in this case. If an
+ optional-leaf of node-subtypes is not present, the behaviour is the
+ same as the none-enum.";
+ }
+ enum edge-optical-spec {
+ value 2;
+ description
+ "This enum refines a ROADM node-type. It indicates that node conforms
+ to edge optical specifications as defined in the OpenROADM MSA
+ Specification: MW-MW(Edge), MW-Wr(Edge), and Local Control (Edge).";
+ }
+ }
+ description
+ "Identifier for node-subtype. Provides refinement of node-type.";
+ }
+
+ typedef xpdr-node-types {
+ type enumeration {
+ enum tpdr {
+ value 1;
+ }
+ enum mpdr {
+ value 2;
+ }
+ enum switch {
+ value 3;
+ }
+ enum regen {
+ value 4;
+ }
+ enum regen-uni {
+ value 5;
+ }
+ }
+ description
+ "Identifier for Xponder node type
+ 1. Transponder
+ 2. Muxponder
+ 3. OTN switchponder
+ 4. Regenerator
+ 5. Regenerator based on unidirectional model
+
+ Xponder types are modeled in one of two ways:
+
+ Type 1: The xponder ports are configured with port-qual of xpdr-client or
+xpdr-network, the xponder connectivity is advertised using connection-map, and
+no explicit cross connects are provisioned.
+
+ Type 2: The xponder ports are configured with port-qual of switch-network
+or switch-client, the connectivity is advertised using switching-pool, and
+explicit cross connects are provisioned.
+
+ Type 1 applies to transponders, unidirectional regenerators, and bidirectional regenerators.
+ Type 2 applies to muxponders and switchponders.";
+ }
+
+ typedef node-id-type {
+ type string {
+ length "7..63";
+ pattern '([a-zA-Z][a-zA-Z0-9-]{5,61}[a-zA-Z0-9])' {
+ error-message
+ "A node-id must be 7 to 63 characters in length.
+ A node-id can contain letters, numbers, and hyphens.
+ The first character must be a letter.
+ The last character must be a letter or number.";
+ }
+ }
+ description
+ "Globally unique identifier for a device.";
+ }
+}
--- /dev/null
+module org-openroadm-common-optical-channel-types {
+ namespace "http://org/openroadm/common-optical-channel-types";
+ prefix org-openroadm-common-optical-channel-types;
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of common optical channel types.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-03-26 {
+ description
+ "Version 9.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2019-09-27 {
+ description
+ "Version 6.0.0";
+ }
+ revision 2019-03-29 {
+ description
+ "Version 5.0.0";
+ }
+ revision 2018-11-30 {
+ description
+ "Version 4.1.0";
+ }
+ revision 2018-05-30 {
+ description
+ "Version 3.1.0";
+ }
+ revision 2018-03-30 {
+ description
+ "Version 3.0.0";
+ }
+
+ identity optical-rate-identity {
+ description
+ "base for otsi and och idenity";
+ }
+
+ identity och-rate-identity {
+ base optical-rate-identity;
+ description
+ "A unique och rate identification";
+ }
+
+ identity otsi-rate-identity {
+ base optical-rate-identity;
+ description
+ "A unique OTSi rate identification";
+ }
+
+ identity foic-identity {
+ description
+ "A unique FOICx.k identification (G.709.3 FlexO-LR and
+ G.709.1 FlexO-SR)";
+ }
+
+ identity foic1.1 {
+ base foic-identity;
+ description
+ "Applicable to the FlexO type defined in G.Sup58 2020-09";
+ }
+
+ identity foic1.2 {
+ base foic-identity;
+ description
+ "Applicable to the FlexO type defined in G.Sup58";
+ }
+
+ identity foic1.4 {
+ base foic-identity;
+ description
+ "Applicable to the FlexO type defined in G.709.1 and G.709.3";
+ }
+
+ identity foic2.4 {
+ base foic-identity;
+ description
+ "Applicable to the FlexO type defined in G.709.1";
+ }
+
+ identity foic2.8 {
+ base foic-identity;
+ description
+ "Applicable to the FlexO type defined in G.Sup58";
+ }
+
+ identity foic3.6 {
+ base foic-identity;
+ description
+ "Applicable to the FlexO type defined in future";
+ }
+
+ identity foic4.8 {
+ base foic-identity;
+ description
+ "Applicable to the FlexO type defined in G.709.1";
+ }
+
+ identity foic4.16 {
+ base foic-identity;
+ description
+ "Applicable to the FlexO type defined in G.Sup58";
+ }
+
+ identity R400G-otsi {
+ base otsi-rate-identity;
+ description
+ "Applicable instance for otsi rate identity";
+ }
+
+ identity R300G-otsi {
+ base otsi-rate-identity;
+ description
+ "Applicable instance for otsi rate identity";
+ }
+
+ identity R200G-otsi {
+ base otsi-rate-identity;
+ description
+ "Applicable instance for otsi rate identity";
+ }
+
+ identity R200G {
+ base och-rate-identity;
+ description
+ "Identity for 200G Rate";
+ }
+
+ identity R100G-otsi {
+ base otsi-rate-identity;
+ description
+ "Applicable instance for otsi rate identity";
+ }
+
+ identity R100G {
+ base och-rate-identity;
+ description
+ "Identity for 100G Rate";
+ }
+
+ identity R56G-foic-otsi {
+ base otsi-rate-identity;
+ description
+ "Applicable instance for otsi rate identity";
+ }
+
+ identity R28G-foic-otsi {
+ base otsi-rate-identity;
+ description
+ "Applicable instance for otsi rate identity";
+ }
+
+ identity R10.7G {
+ base och-rate-identity;
+ description
+ "Identity for 10.7G Rate";
+ }
+
+ identity R11.1G {
+ base och-rate-identity;
+ description
+ "Identity for 11.1G Rate";
+ }
+
+ typedef frequency-THz {
+ type decimal64 {
+ fraction-digits 8;
+ }
+ units "THz";
+ description
+ "Frequency value in THz.";
+ }
+
+ typedef frequency-GHz {
+ type decimal64 {
+ fraction-digits 5;
+ }
+ units "GHz";
+ description
+ "Frequency value in GHz.";
+ }
+
+ typedef wavelength-duplication-type {
+ type enumeration {
+ enum one-per-srg {
+ value 1;
+ description
+ "The SRG cannot handle wavelength duplication. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will result in failure.";
+ }
+ enum one-per-degree {
+ value 2;
+ description
+ "The SRG can handle wavelength duplication, but only one per degree. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will succeed, so long as the connections are not using the same degree.";
+ }
+ }
+ description
+ "One per srg is applied to C/D add/drop group
+ one per degree is applied to C/D/C add drop group";
+ }
+
+ typedef modulation-format {
+ type enumeration {
+ enum bpsk {
+ value 0;
+ description
+ "binary phase-shift keying";
+ }
+ enum dc-dp-bpsk {
+ value 1;
+ description
+ "DC dual-polarization binary phase-shift keying";
+ }
+ enum qpsk {
+ value 2;
+ description
+ "quadrature phase-shift keying";
+ }
+ enum dp-qpsk {
+ value 3;
+ description
+ "dual-polarization quadrature phase-shift keying";
+ }
+ enum qam16 {
+ value 4;
+ description
+ "quadrature amplitude modulation 16";
+ }
+ enum dp-qam16 {
+ value 5;
+ description
+ "dual-polarization quadrature amplitude modulation 16";
+ }
+ enum dc-dp-qam16 {
+ value 6;
+ description
+ "DC dual-polarization quadrature amplitude modulation 16";
+ }
+ enum qam8 {
+ value 7;
+ description
+ "quadrature amplitude modulation 8";
+ }
+ enum dp-qam8 {
+ value 8;
+ description
+ "dual-polarization quadrature amplitude modulation 8";
+ }
+ enum dc-dp-qam8 {
+ value 9;
+ description
+ "DC dual-polarization quadrature amplitude modulation 8";
+ }
+ }
+ description
+ "Modulation format";
+ }
+
+ typedef provision-mode-type {
+ type enumeration {
+ enum explicit;
+ enum profile;
+ }
+ description
+ "Provision Mode Type On Optical Channel";
+ }
+
+ grouping full-bandwidth-grouping {
+ leaf full-bandwidth-at-3dB {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ description
+ "Signal full bandwidth at 3dB below the peak. Information used to model signal’s spectral shape.";
+ config false;
+ }
+ leaf full-bandwidth-at-10dB {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ description
+ "Signal full bandwidth at 10dB below the peak. Information used to model signal’s spectral shape.";
+ config false;
+ }
+ }
+
+}
--- /dev/null
+module org-openroadm-common-phy-codes {
+ namespace "http://org/openroadm/common-phy-codes";
+ prefix org-openroadm-common-phy-codes;
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of common types.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+
+ identity compliance-code-identity {
+ description
+ "Base identity for reporting pluggable compliance codes per port.";
+ }
+
+ identity phy-code-none {
+ base compliance-code-identity;
+ description
+ "Used to report that no OpenROADM codes are supported.";
+ }
+
+ // BEGIN section for client phy code entities
+
+ // Parent identity
+ identity client-phy-code-identity {
+ description
+ "base identity for client phy code.";
+ }
+
+ // IEEE 802.3 - 2018 PHY/PMD Names (subset)
+ identity ethernet-1000BASE-SX {
+ base client-phy-code-identity;
+ }
+ identity ethernet-1000BASE-LX {
+ base client-phy-code-identity;
+ }
+ identity ethernet-10GBASE-SR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-10GBASE-LR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-10GBASE-ER {
+ base client-phy-code-identity;
+ }
+ identity ethernet-10GBASE-SW {
+ base client-phy-code-identity;
+ }
+ identity ethernet-10GBASE-LW {
+ base client-phy-code-identity;
+ }
+ identity ethernet-10GBASE-EW {
+ base client-phy-code-identity;
+ }
+ identity ethernet-25GBASE-SR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-25GBASE-LR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-25GBASE-ER {
+ base client-phy-code-identity;
+ }
+ identity ethernet-25GBASE-CR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-25GBASE-CR-S {
+ base client-phy-code-identity;
+ }
+ identity ethernet-25GBASE-KR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-25GBASE-KR-S {
+ base client-phy-code-identity;
+ }
+ identity ethernet-40GBASE-SR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-40GBASE-LR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-40GBASE-ER4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-40GBASE-FR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-40GBASE-T {
+ base client-phy-code-identity;
+ }
+ identity ethernet-40GBASE-KR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-50GBASE-SR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-50GBASE-FR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-50GBASE-LR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-50GBASE-KR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-50GBASE-CR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-CR2 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-KR2 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-SR10 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-SR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-LR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-ER4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-SR2 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-DR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-CR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-KP4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GBASE-KR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-200GBASE-SR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-200GBASE-DR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-200GBASE-FR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-200GBASE-LR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-400GBASE-SR16 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-400GBASE-DR4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-400GBASE-FR8 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-400GBASE-LR8 {
+ base client-phy-code-identity;
+ }
+
+
+ // Common names not defined in IEEE 802.3
+ identity ethernet-1000BASE-EX {
+ base client-phy-code-identity;
+ }
+ identity ethernet-1000BASE-ZX {
+ base client-phy-code-identity;
+ }
+ identity ethernet-10GBASE-ZR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-10GBASE-ZW {
+ base client-phy-code-identity;
+ }
+ identity ethernet-40GQSFP-PSM4 {
+ base client-phy-code-identity;
+ }
+
+
+ // http://psm4.org
+ identity ethernet-100G-PSM4 {
+ base client-phy-code-identity;
+ }
+
+
+ // http://www.cwdm4-msa.org/
+ identity ethernet-100GE-CWDM4 {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100GE-4WDM-10 {
+ base client-phy-code-identity;
+ }
+
+
+
+ // http://100glambda.com/
+ identity ethernet-100G-FR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-100G-LR {
+ base client-phy-code-identity;
+ }
+ identity ethernet-400G-FR4 {
+ base client-phy-code-identity;
+ }
+
+
+ // ITU-T G.959.1 - 2018 */
+ identity otn-P1I1-1D1 {
+ base client-phy-code-identity;
+ }
+ identity otn-P1S1-1D1 {
+ base client-phy-code-identity;
+ }
+ identity otn-P1L1-1D1 {
+ base client-phy-code-identity;
+ }
+ identity otn-P1L1-1D2 {
+ base client-phy-code-identity;
+ }
+ identity otn-P1I1-2D1 {
+ base client-phy-code-identity;
+ }
+ identity otn-P1I1-2D2 {
+ base client-phy-code-identity;
+ }
+ identity otn-P1S1-2D1 {
+ base client-phy-code-identity;
+ }
+ identity otn-P1S1-2D2a {
+ base client-phy-code-identity;
+ }
+ identity otn-P1S1-2D2b {
+ base client-phy-code-identity;
+ }
+ identity otn-1S1-2D2bF {
+ base client-phy-code-identity;
+ }
+ identity otn-P1L1-2D1 {
+ base client-phy-code-identity;
+ }
+ identity otn-P1L1-2D2 {
+ base client-phy-code-identity;
+ }
+ identity otn-1L1-2D2F {
+ base client-phy-code-identity;
+ }
+ identity otn-P1L1-2D2E {
+ base client-phy-code-identity;
+ }
+ identity otn-1L1-2D2FE {
+ base client-phy-code-identity;
+ }
+ identity otn-C4S1-2D1 {
+ base client-phy-code-identity;
+ }
+ identity otn-1I1-3D1F {
+ base client-phy-code-identity;
+ }
+ identity otn-8R1-4D1F {
+ base client-phy-code-identity;
+ }
+ identity otn-4I1-9D1F {
+ base client-phy-code-identity;
+ }
+ identity otn-4L1-9C1F {
+ base client-phy-code-identity;
+ }
+ identity otn-4L1-9D1F {
+ base client-phy-code-identity;
+ }
+ identity otn-4I1-4D1F {
+ base client-phy-code-identity;
+ }
+ identity otn-8I1-4D1F {
+ base client-phy-code-identity;
+ }
+
+ typedef compliance-codes-union {
+ type union {
+ type identityref { base client-phy-code-identity; }
+ type identityref { base compliance-code-identity; }
+ }
+ default "org-openroadm-common-phy-codes:phy-code-none";
+ description
+ "Compliance codes supported in OpenROADM.";
+ }
+ // END section for client phy code entities
+}
\ No newline at end of file
--- /dev/null
+module org-openroadm-common-types {
+ namespace "http://org/openroadm/common-types";
+ prefix org-openroadm-common-types;
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of common types.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2021-03-26 {
+ description
+ "Version 9.0";
+ }
+ revision 2020-12-11 {
+ description
+ "Version 8.1";
+ }
+ revision 2020-09-25 {
+ description
+ "Version 8.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2019-09-27 {
+ description
+ "Version 6.0.0";
+ }
+ revision 2019-05-31 {
+ description
+ "Version 5.1.0";
+ }
+ revision 2019-03-29 {
+ description
+ "Version 5.0.0";
+ }
+ revision 2018-11-30 {
+ description
+ "Version 4.1.0";
+ }
+ revision 2018-09-28 {
+ description
+ "Version 4.0.0";
+ }
+ revision 2018-03-30 {
+ description
+ "Version 3.0.0";
+ }
+ revision 2017-12-15 {
+ description
+ "Version 2.2";
+ }
+ revision 2017-09-29 {
+ description
+ "Version 2.1";
+ }
+ revision 2017-06-26 {
+ description
+ "Version 2.0";
+ }
+ revision 2016-10-14 {
+ description
+ "Version 1.2";
+ }
+
+ typedef activate-notification-type {
+ type enumeration {
+ enum activate {
+ value 1;
+ description
+ "software or database activation";
+ }
+ enum commit {
+ value 2;
+ description
+ "commit the software or database.
+ For software activate, this event can happen in the following scenarios:
+ 1) immediately when user issue sw-activate command without validationTimer
+ or if the validationTimer is specified as 00-00-00;
+ 2) when user issue cancel-validation-timer before it expires and with accept=true.
+ For database activate, this event can occur in the following scenarios:
+ 1) immediately when user issue db-activate command without rollBackTimer
+ or if the rollBackTimer is specified as 00-00-00;
+ 2) when user issue cancel-rollback-timer before it expires and with accept=true.";
+ }
+ enum cancel {
+ value 3;
+ description
+ "cancel the database or software activation operation.
+ For software activate, this event can happen in the following cases:
+ 1) when the validationTimer expires;
+ 2) when the user issues cancel-validation-timer with accept=false.
+ For database activate, this event can happen in the following cases:
+ 1) when the rollBackTimer expires;
+ 2) when the user issues cancel-rollback-timer with accept=false.";
+ }
+ }
+ description
+ "Type of notification on software or database activation events";
+ }
+
+ typedef rpc-status {
+ type enumeration {
+ enum Successful {
+ value 1;
+ }
+ enum Failed {
+ value 2;
+ }
+ }
+ description
+ "status of RPC ";
+ }
+
+ typedef extended-rpc-status {
+ type enumeration {
+ enum Successful {
+ value 1;
+ }
+ enum Failed {
+ value 2;
+ }
+ enum In-progress {
+ value 3;
+ }
+ }
+ description
+ "status of RPC ";
+ }
+
+ typedef openroadm-version-type {
+ type enumeration {
+ enum 1.0 {
+ value 1;
+ description
+ "value for 1.0";
+ }
+ enum 2.0 {
+ value 2;
+ description
+ "value for 2.0";
+ }
+ enum 2.1 {
+ value 3;
+ description
+ "value for 2.1";
+ }
+ enum 2.2 {
+ value 4;
+ description
+ "value for 2.2";
+ }
+ enum 3.0 {
+ value 5;
+ description
+ "value for 3.0";
+ }
+ enum 3.1 {
+ value 6;
+ description
+ "value for 3.1";
+ }
+ enum 4.0 {
+ value 7;
+ description
+ "value for 4.0";
+ }
+ enum 2.2.1 {
+ value 8;
+ description
+ "value for 2.2.1";
+ }
+ enum 4.1 {
+ value 9;
+ description
+ "value for 4.1";
+ }
+ enum 3.1.1 {
+ value 10;
+ description
+ "value for 3.1.1";
+ }
+ enum 5.0 {
+ value 11;
+ description
+ "value for 5.0";
+ }
+ enum 5.1 {
+ value 12;
+ description
+ "value for 5.1";
+ }
+ enum 6.0 {
+ value 13;
+ description
+ "value for 6.0";
+ }
+ enum 6.1 {
+ value 14;
+ description
+ "value for 6.1";
+ }
+ enum 7.0 {
+ value 15;
+ description
+ "value for 7.0";
+ }
+ enum 7.1 {
+ value 16;
+ description
+ "value for 7.1";
+ }
+ enum 8.0 {
+ value 17;
+ description
+ "value for 8.0";
+ }
+ enum 8.1 {
+ value 18;
+ description
+ "value for 8.1";
+ }
+ enum 9.0 {
+ value 19;
+ description
+ "value for 9.0";
+ }
+ enum 9.1 {
+ value 20;
+ description
+ "value for 9.1";
+ }
+ enum 10.0 {
+ value 21;
+ description
+ "value for 10.0";
+ }
+ enum 10.1 {
+ value 22;
+ description
+ "value for 10.1";
+ }
+ }
+ description
+ "OpenROADM version enum type";
+ }
+
+ grouping rpc-response-status {
+ leaf status {
+ type rpc-status;
+ mandatory true;
+ description
+ "Successful or Failed";
+ }
+ leaf status-message {
+ type string;
+ description
+ "Gives a more detailed status";
+ }
+ }
+
+ grouping extended-rpc-response-status {
+ leaf status {
+ type extended-rpc-status;
+ mandatory true;
+ description
+ "Successful, Failed or In-progress";
+ }
+ leaf status-message {
+ type string;
+ description
+ "Gives a more detailed status.";
+ }
+ }
+
+ grouping eth-rate-and-burst-size {
+ description
+ "Grouping of ethernet committed rate and burst size.";
+ leaf committed-info-rate {
+ type uint32;
+ mandatory true;
+ description
+ "Committed Information Rate (CIR), unit in Mbps. For example, 1250 Mbps";
+ }
+ leaf committed-burst-size {
+ type uint16;
+ mandatory true;
+ description
+ "Committed Burst Size, unit in 1KB (K Byte).
+ Range 16 | 32 | 64 | 128 | 512 | 1024. Default: 16";
+ }
+ }
+
+ identity otn-protection-type {
+ description
+ "OTN base protection identity from which
+ specific protection types are derived.";
+ }
+
+ typedef tcm-direction-capability-type {
+ type enumeration {
+ enum up-tcm {
+ description
+ "Port supports up TCM termination, e.g., direction facing the switch fabric";
+ }
+ enum down-tcm {
+ description
+ "Port supports down TCM termination, e.g., direction facing out of the equipment ";
+ }
+ enum up-down-tcm {
+ description
+ "Port supports both up and down TCM terminations";
+ }
+ }
+ description
+ "TCM direction capability for the port";
+ }
+
+
+
+
+
+
+ //
+ // Identities for FEC -- used for Device and Service models
+ //
+
+ // Base Identity
+ identity fec-identity {
+ description
+ "A unique FEC identification";
+ }
+
+ // FEC Off (duplications for backwards compatibility)
+ identity off-fec {
+ status deprecated;
+ base fec-identity;
+ description
+ "FEC Off";
+ }
+ identity off {
+ base fec-identity;
+ description
+ "FEC Off";
+ }
+ identity scfec {
+ base fec-identity;
+ description
+ "Staircase FEC identification";
+ }
+ identity rsfec {
+ base fec-identity;
+ description
+ "Reed Solomon FEC identification";
+ }
+ identity ofec {
+ base fec-identity;
+ description
+ "OpenROADM FEC identification";
+ }
+
+ // G.975.1 I.4
+ identity efec {
+ base fec-identity;
+ description
+ "G.975.1 I.4";
+ }
+
+ // G.975.1 I.7
+ identity ufec {
+ base fec-identity;
+ description
+ "G.975.1 I.7";
+ }
+
+ // Soft Decision FEC
+ identity sdfec {
+ base fec-identity;
+ description
+ "Soft Decision FEC";
+ }
+
+ // Clariphy SDFEC
+ identity sdfeca1 {
+ base fec-identity;
+ description
+ "Clariphy SDFEC";
+ }
+
+ // SDFEC with SCFED
+ identity sdfecb1 {
+ base fec-identity;
+ description
+ "SDFEC with SCFEC";
+ }
+
+ // Base-R
+ identity baser {
+ base fec-identity;
+ description
+ "Base-R (IEEE 802.3)";
+ }
+
+ grouping fec-grouping {
+ leaf fec {
+ type identityref {
+ base org-openroadm-common-types:fec-identity;
+ }
+ description
+ "FEC / Forward Error Correction";
+ }
+ }
+
+ typedef SRLG-type {
+ type enumeration {
+ enum site {
+ value 0;
+ description
+ "Site SRLG";
+ }
+ enum node {
+ value 1;
+ description
+ "Node SRLG";
+ }
+ enum srlg {
+ value 2;
+ description
+ "SRLG here is also referred as fiber SRLG";
+ }
+ enum link {
+ value 3;
+ description
+ "Link SRLG";
+ }
+ }
+ }
+}
--- /dev/null
+module org-openroadm-otn-common-types {
+ namespace "http://org/openroadm/otn-common-types";
+ prefix org-openroadm-otn-common-types;
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions for common otn related type definitions.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+ Also contains code components extracted from IETF Interfaces. These code components
+ are copyrighted and licensed as follows:
+
+ Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+ All rights reserved.
+
+ This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+ to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+ publication of this document. Please review these documents carefully, as they
+ describe your rights and restrictions with respect to this document. Code Components
+ extracted from this document must include Simplified BSD License text as described in
+ Section 4.e of the Trust Legal Provisions and are provided without warranty as
+ described in the Simplified BSD License.";
+
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2019-09-27 {
+ description
+ "Version 6.0.0";
+ }
+ revision 2018-11-30 {
+ description
+ "Version 4.1.0";
+ }
+ revision 2018-09-28 {
+ description
+ "Version 4.0.0";
+ }
+ revision 2018-03-30 {
+ description
+ "Version 3.0.0";
+ }
+ revision 2017-12-15 {
+ description
+ "Version 2.2";
+ }
+ revision 2017-09-29 {
+ description
+ "Version 2.1";
+ }
+
+ identity otu-rate-identity {
+ description
+ "A unique rate identification of the OTU.";
+ }
+
+ identity OTUCn {
+ base otu-rate-identity;
+ description
+ "Identity for an OTUCn";
+ }
+
+ identity OTU4 {
+ base otu-rate-identity;
+ description
+ "Identity for an OTU4";
+ }
+
+ identity OTU3 {
+ base otu-rate-identity;
+ description
+ "Identity for an OTU3";
+ }
+
+ identity OTU2 {
+ base otu-rate-identity;
+ description
+ "Identity for an OTU2";
+ }
+
+ identity OTU2e {
+ base otu-rate-identity;
+ description
+ "Identity for an OTU2e";
+ }
+
+ identity OTU1 {
+ base otu-rate-identity;
+ description
+ "Identity for an OTU1";
+ }
+
+ identity OTU0 {
+ base otu-rate-identity;
+ description
+ "Identity for an OTU0";
+ }
+
+ identity OTUflex {
+ base otu-rate-identity;
+ description
+ "Identity for an OTUflex";
+ }
+
+ identity odu-rate-identity {
+ description
+ "A unique rate identification of the ODU.";
+ }
+
+ identity ODUCn {
+ base odu-rate-identity;
+ description
+ "Identity for an ODUCn";
+ }
+
+ identity ODU4 {
+ base odu-rate-identity;
+ description
+ "Identity for an ODU4";
+ }
+
+ identity ODU3 {
+ base odu-rate-identity;
+ description
+ "Identity for an ODU3";
+ }
+
+ identity ODU2 {
+ base odu-rate-identity;
+ description
+ "Identity for an ODU2";
+ }
+
+ identity ODU2e {
+ base odu-rate-identity;
+ description
+ "Identity for an ODU2e";
+ }
+
+ identity ODU1 {
+ base odu-rate-identity;
+ description
+ "Identity for an ODU1";
+ }
+
+ identity ODU0 {
+ base odu-rate-identity;
+ description
+ "Identity for an ODU0";
+ }
+
+ identity ODUflex-cbr {
+ base odu-rate-identity;
+ description
+ "ODUFlex for CBR client signals (G.709)";
+ }
+
+ identity ODUflex-cbr-identity {
+ description
+ "Service type for ODUflex (CBR)";
+ }
+
+ identity ODUflex-cbr-25G {
+ base ODUflex-cbr-identity;
+ description
+ "ODUFlex for CBR client signals 25G (G.709 17.13.1)";
+ }
+
+ identity ODUflex-cbr-200G {
+ base ODUflex-cbr-identity;
+ description
+ "ODUFlex for CBR client signals 200G (G.709 17.13.2)";
+ }
+
+ identity ODUflex-cbr-400G {
+ base ODUflex-cbr-identity;
+ description
+ "ODUFlex for CBR client signals 400G (G.709 17.13.2)";
+ }
+
+ identity ODUflex-imp {
+ base odu-rate-identity;
+ description
+ "ODUFlex for IMP (Idle insertion Mapping Procedure) mapped client signals (G.709)";
+ }
+
+ identity ODUflex-flexe {
+ base odu-rate-identity;
+ description
+ "ODUflex for FlexE-aware client signals (G.709)";
+ }
+
+ identity ODUflex-gfp {
+ base odu-rate-identity;
+ description
+ "ODUflex for GFP-F mapped client signals (G.709)";
+ }
+
+ identity odtu-type-identity {
+ description
+ "A unique identification for the MSI odtu type.";
+ }
+
+ identity ODTUCn.ts {
+ base odtu-type-identity;
+ description
+ "ODTUCn.ts - OPUCn MSI type (G.709 clause 20.2)";
+ }
+
+ identity ODTU4.ts-Allocated {
+ base odtu-type-identity;
+ description
+ "OPU4 MSI - ODTU4.ts, OPU4 MSI TS is occupied/allocated.
+ Applies to all ODTU4.x mappings";
+ }
+
+ identity ODTU01 {
+ base odtu-type-identity;
+ description
+ "ODTU01 MSI type";
+ }
+
+ identity ODTU12 {
+ base odtu-type-identity;
+ description
+ "ODTU12 MSI type";
+ }
+
+ identity ODTU13 {
+ base odtu-type-identity;
+ description
+ "ODTU13 MSI type";
+ }
+
+ identity ODTU23 {
+ base odtu-type-identity;
+ description
+ "ODTU23 MSI type";
+ }
+
+ identity ODTU2.ts {
+ base odtu-type-identity;
+ description
+ "ODTU2.ts MSI type";
+ }
+
+ identity ODTU3.ts {
+ base odtu-type-identity;
+ description
+ "ODTU3.ts MSI type";
+ }
+
+ identity ODTU4.ts {
+ base odtu-type-identity;
+ description
+ "ODTU4.ts MSI type";
+ }
+
+ identity unallocated {
+ base odtu-type-identity;
+ description
+ "Unallocated MSI type";
+ }
+
+ identity odu-function-identity {
+ description
+ "A unique identification of the ODUk interface function.";
+ }
+
+ identity ODU-TTP {
+ base odu-function-identity;
+ description
+ "ODU TTP facility facing trail termination";
+ }
+
+ identity ODU-CTP {
+ base odu-function-identity;
+ description
+ "ODU CTP connection termination";
+ }
+
+ identity ODU-TTP-CTP {
+ base odu-function-identity;
+ description
+ "ODU CTP mapper level connection termination with trail termination and client adaptation";
+ }
+
+ typedef payload-type-def {
+ type string {
+ length "2";
+ pattern '[0-9a-fA-F]*';
+ }
+ description
+ "Common type definition for odu payload-type";
+ }
+
+ typedef flexo-payload-type-def {
+ type string {
+ length "2";
+ pattern '[0-9a-fA-F]*';
+ }
+ description
+ "Common type definition for flexo payload-type (Section 9.2.6.2,
+ G.709.1 2020-12)";
+ }
+
+ typedef opucn-trib-slot-def {
+ type string;
+ description
+ "OPUCn trib slot in the form of 'A.B' with
+ A = 1..n
+ B = 1..20";
+ }
+
+ typedef tcm-direction-enum {
+ type enumeration {
+ enum up-tcm {
+ description
+ "TCM termination direction faces the switch fabric.";
+ }
+ enum down-tcm {
+ description
+ "TCM termination direction faces the facility";
+ }
+ }
+ description
+ "Enumeration type for TCM direction";
+ }
+}
--- /dev/null
+module org-openroadm-resource-types {
+ namespace "http://org/openroadm/resource/types";
+ prefix org-openroadm-resource-types;
+
+ import org-openroadm-common-node-types {
+ prefix org-openroadm-common-node-types;
+ revision-date 2021-05-28;
+ }
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of common resource types.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2018-11-30 {
+ description
+ "Version 4.1.0";
+ }
+ revision 2018-09-28 {
+ description
+ "Version 4.0.0";
+ }
+ revision 2018-03-30 {
+ description
+ "Version 3.0.0";
+ }
+ revision 2017-12-15 {
+ description
+ "Version 2.2";
+ }
+ revision 2017-09-29 {
+ description
+ "Version 2.1";
+ }
+ revision 2017-06-26 {
+ description
+ "Version 2.0";
+ }
+ revision 2016-10-14 {
+ description
+ "Version 1.2";
+ }
+
+ typedef resource-type-enum {
+ type enumeration {
+ enum other {
+ value 1;
+ description
+ "Resource of type not found in list.";
+ }
+ enum device {
+ value 2;
+ description
+ "device - ROAMD, Xponder, etc";
+ }
+ enum degree {
+ value 3;
+ description
+ "degree";
+ }
+ enum shared-risk-group {
+ value 4;
+ description
+ "shared-risk-group";
+ }
+ enum connection {
+ value 5;
+ description
+ "connection - this is used by roadm-connection and odu-connection
+ since they are mutually exclusive in the model";
+ }
+ enum connection-map {
+ value 6;
+ description
+ "connection-map";
+ }
+ enum port {
+ value 7;
+ description
+ "port";
+ }
+ enum circuit-pack {
+ value 8;
+ description
+ "circuit pack";
+ }
+ enum internal-link {
+ value 9;
+ description
+ "internal-link";
+ }
+ enum physical-link {
+ value 10;
+ description
+ "physical-link";
+ }
+ enum interface {
+ value 11;
+ description
+ "interface";
+ }
+ enum shelf {
+ value 12;
+ description
+ "shelf";
+ }
+ enum service {
+ value 13;
+ description
+ "service";
+ }
+ enum odu-sncp-pg {
+ value 14;
+ description
+ "odu-sncp-pg";
+ }
+ enum line-amplifier {
+ value 15;
+ description
+ "line-amplifier";
+ }
+ enum xponder {
+ value 16;
+ description
+ "xponder";
+ }
+ enum versioned-service {
+ value 17;
+ description
+ "versioned-service";
+ }
+ enum temp-service {
+ value 18;
+ description
+ "temp-service";
+ }
+ enum client-sncp-pg {
+ value 19;
+ description
+ "client-sncp-pg";
+ }
+ }
+ }
+
+ typedef resource-notification-type {
+ type enumeration {
+ enum resourceCreation {
+ value 1;
+ description
+ "A new instance of a resource has been created.";
+ }
+ enum resourceModification {
+ value 2;
+ description
+ "An existing instance of a resource has been modified. This shall be triggered by changes in configuration, state, status etc.
+ It shall not be triggered by changes in performance measurements, power and temperature readings or any other data that is highly volatile. ";
+ }
+ enum resourceDeletion {
+ value 3;
+ description
+ "An existing instance of a resource has been removed.";
+ }
+ }
+ description
+ "Type of notification about a resource";
+ }
+
+ grouping resource-type {
+ leaf type {
+ type resource-type-enum;
+ mandatory true;
+ }
+ leaf extension {
+ type string;
+ mandatory false;
+ }
+ }
+
+ grouping device-id {
+ description
+ "Device identifier. Unique within the Controller.";
+ leaf node-id {
+ type org-openroadm-common-node-types:node-id-type;
+ description
+ "Node Id is a globally unique identifier for a device.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping circuit-pack-name {
+ leaf circuit-pack-name {
+ type string;
+ mandatory true;
+ description
+ "Circuit-Pack identifier. Unique within the context of a device.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping port-name {
+ uses circuit-pack-name;
+ leaf port-name {
+ type string;
+ description
+ "Port identifier. Unique within the context of a circuit-pack.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping physical-link-name {
+ leaf physical-link-name {
+ type string;
+ mandatory true;
+ description
+ "Physical Link identifier. Unique within the context of a device.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping internal-link-name {
+ leaf internal-link-name {
+ type string;
+ mandatory true;
+ description
+ "Internal Link identifier. Unique within the context of a device.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping connection-name {
+ leaf connection-name {
+ type string;
+ description
+ "Connection name. Unique within the context of a device.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping degree-number {
+ leaf degree-number {
+ type uint16;
+ description
+ "Degree identifier. Unique within the context of a device.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping srg-number {
+ leaf srg-number {
+ type uint16;
+ description
+ "Shared Risk Group identifier. Unique within the context of a device.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping shelf-name {
+ leaf shelf-name {
+ type string;
+ mandatory true;
+ description
+ "Shelf-id identifier. Unique within the context of a device.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping service-name {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Service identifier. Unique within the context of a network.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping versioned-service-name {
+ leaf versioned-service-name {
+ type string;
+ mandatory true;
+ description
+ "Service identifier. Unique within the context of a network.
+ Same as leafref value in model, if applicable.";
+ }
+ leaf version-number {
+ type uint64;
+ mandatory true;
+ description
+ "version-number of the service";
+ }
+ }
+
+ grouping temp-service-name {
+ leaf common-id {
+ type string;
+ mandatory true;
+ description
+ "Service identifier. Unique within the context of a network.
+ Same as leafref value in model, if applicable.";
+ }
+ }
+
+ grouping interface-name {
+ leaf interface-name {
+ type string;
+ mandatory true;
+ description
+ "Interface identifier.";
+ }
+ }
+
+ grouping other-resource-id {
+ leaf other-resource-id {
+ type string;
+ mandatory true;
+ description
+ "resource-id for other.";
+ }
+ }
+
+ grouping odu-sncp-pg-name {
+ leaf odu-sncp-pg-name {
+ type string;
+ mandatory true;
+ description
+ "name of the odu-snc-pg";
+ }
+ }
+
+ grouping client-sncp-pg-name {
+ leaf client-sncp-pg-name {
+ type string;
+ mandatory true;
+ description
+ "name of the client-snc-pg";
+ }
+ }
+
+ grouping amp-number {
+ leaf amp-number {
+ type uint8;
+ mandatory true;
+ description
+ "number of the line-amplifier";
+ }
+ }
+
+ grouping xpdr-number {
+ leaf xpdr-number {
+ type uint16;
+ mandatory true;
+ description
+ "number of the xponder";
+ }
+ }
+}
--- /dev/null
+module org-openroadm-resource {
+ namespace "http://org/openroadm/resource";
+ prefix org-openroadm-resource;
+
+ import org-openroadm-interfaces {
+ prefix org-openroadm-interfaces;
+ revision-date 2019-11-29;
+ }
+ import org-openroadm-otn-common-types {
+ prefix org-openroadm-otn-common-types;
+ revision-date 2021-09-24;
+ }
+ import org-openroadm-common-optical-channel-types {
+ prefix org-openroadm-common-optical-channel-types;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-resource-types {
+ prefix org-openroadm-resource-types;
+ revision-date 2021-09-24;
+ }
+ import org-openroadm-common-link-types {
+ prefix org-openroadm-common-link-types;
+ revision-date 2019-11-29;
+ }
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of resources.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2021-03-26 {
+ description
+ "Version 9.0";
+ }
+ revision 2020-09-25 {
+ description
+ "Version 8.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2019-09-27 {
+ description
+ "Version 6.0.0";
+ }
+ revision 2019-05-31 {
+ description
+ "Version 5.1.0";
+ }
+ revision 2019-03-29 {
+ description
+ "Version 5.0.0";
+ }
+ revision 2018-11-30 {
+ description
+ "Version 4.1.0";
+ }
+ revision 2018-09-28 {
+ description
+ "Version 4.0.0";
+ }
+ revision 2018-03-30 {
+ description
+ "Version 3.0.0";
+ }
+ revision 2017-12-15 {
+ description
+ "Version 2.2";
+ }
+ revision 2017-09-29 {
+ description
+ "Version 2.1";
+ }
+ revision 2017-07-28 {
+ description
+ "Version 2.0.1 - added revision-date to imports";
+ }
+ revision 2017-06-26 {
+ description
+ "Version 2.0";
+ }
+ revision 2016-10-14 {
+ description
+ "Version 1.2";
+ }
+
+ grouping eth-attributes {
+ leaf speed {
+ type uint32;
+ description
+ "Set speed of the interface, unit mbps.
+ This is for ETH facility. ";
+ }
+ }
+
+ grouping mc-ttp-attributes {
+ description
+ "Media channel termination point. Models bandwidth allocation in physical media. Network media channels may be provisioned in the spectrum characterized by the frequency limits.";
+ leaf min-freq {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ config true;
+ description
+ "Minimum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
+ }
+ leaf max-freq {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ config true;
+ description
+ "Maximum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
+ }
+ }
+
+ grouping nmc-ctp-attributes {
+ description
+ "Network Media Channel attributes";
+ leaf frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ config true;
+ description
+ "Center Frequency in THz. This is not constrained by mc-capabilities. It must fit (when combined with width) inside any containing media channel.";
+ }
+ leaf width {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ config true;
+ description
+ "Frequency width in GHz. This is not constrained by mc-capabilities. It must fit (when combined with frequency) inside any containing media channel.";
+ }
+ }
+
+ grouping common-och-otsi-attributes {
+ description
+ "Optical Channel and otsi common attributes";
+ leaf frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ description
+ "Center Frequency in THz.";
+ }
+ leaf width {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ description
+ "Frequency width in GHz.";
+ }
+ leaf optical-operational-mode {
+ type string;
+ description
+ "The path was calculated according to the supported operational modes.
+ Selected mode can be either a specific or an openROADM operational-mode";
+ }
+ }
+
+ grouping path-computation-outputs {
+ description
+ "Parameters resulting of path computation";
+ leaf rx-estimated-osnr {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "estimated OSNR for the path";
+ }
+ leaf rx-estimated-gsnr {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "estimated Generalized SNR (including non linear impairments) for the path";
+ }
+ leaf max-output-power {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "maximum output-power";
+ }
+ leaf min-output-power {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "minimum output-power";
+ }
+ }
+
+ grouping och-attributes {
+ description
+ "Optical Channel attributes";
+ leaf rate {
+ type identityref {
+ base org-openroadm-common-optical-channel-types:och-rate-identity;
+ }
+ description
+ "rate";
+ }
+ leaf modulation-format {
+ type org-openroadm-common-optical-channel-types:modulation-format;
+ description
+ "Modulation format";
+ }
+ uses common-och-otsi-attributes;
+ }
+
+ grouping odu-attributes {
+ description
+ "ODU attributes";
+ leaf rate {
+ type identityref {
+ base org-openroadm-otn-common-types:odu-rate-identity;
+ }
+ description
+ "rate identity of the ODU. 'identityref' is used
+ to allow to extend for future higher rates";
+ }
+ leaf oducn-n-rate {
+ when "../rate = 'org-openroadm-otn-common-types:ODUCn'";
+ type uint16;
+ description
+ "ODUCn rate";
+ }
+ leaf oduflex-cbr-service {
+ type identityref {
+ base org-openroadm-otn-common-types:ODUflex-cbr-identity;
+ }
+ description
+ "ODUflex for CBR client signals (G.709)";
+ }
+ leaf oduflex-gfp-num-ts {
+ type uint16;
+ description
+ "For ODUflex GFP-F mapped client signals (G.709), the number of
+ tributary slot as per G.709 Table 7-8";
+ }
+ leaf oduflex-gfp-ts-bandwidth {
+ type uint16;
+ description
+ "The tributary slot minimum bit rates in the approximated value [Mbps]
+ given ODUflex (GFP) 100 ppm (G.709 Table 7-8) :
+ 1249 Mbps [1 249 052.312 277 kbps] (n = 1 to 8) (ODU2.ts)
+ 1254 Mbps [1 254 344.906 9646 kbps] (n = 9 to 32) ODU3.ts)
+ 1301 Mbps [1 301 336.986 2867 kbps] (n = 33 to 80) (ODU4.ts)";
+ }
+ leaf oduflex-imp-s {
+ type uint16;
+ description
+ "For ODUflex IMP (Idle insertion Mapping Procedure) mapped client signals,
+ s = 2, 8, n x 5 with N >= 1 (G.709 12.2.6 & Table 7-3)";
+ }
+ leaf oduflex-flexe-n {
+ type uint16;
+ description
+ "For ODUflex for FlexE-aware client signals, n in the range of 1 to 20*254
+ (G.709 17.12)";
+ }
+ container parent-odu-allocation {
+ description
+ "parent odu allocation";
+ leaf trib-port-number {
+ type uint16 {
+ range "1 .. 80";
+ }
+ description
+ "Assigned tributary port number in parent OPU";
+ }
+ choice trib-slots-choice {
+ description
+ "trib slot selection";
+ case opu {
+ leaf-list trib-slots {
+ type uint16 {
+ range "1 .. 80";
+ }
+ min-elements 1;
+ max-elements 80;
+ description
+ "Assigned trib slots occupied in parent OPU MSI";
+ }
+ }
+ case opucn {
+ leaf-list opucn-trib-slots {
+ type org-openroadm-otn-common-types:opucn-trib-slot-def;
+ description
+ "Specify the list of OPUCn 5G tributary slots in the form of
+ TS #A.B (G.709 Figure 20-9) in the case of provisioning the low
+ order ODUk to the parent server ODUCn";
+ }
+ }
+ }
+ }
+ }
+
+ grouping otu-attributes {
+ description
+ "OTU attributes";
+ leaf rate {
+ type identityref {
+ base org-openroadm-otn-common-types:otu-rate-identity;
+ }
+ description
+ "rate identity of the OTU. 'identityref' is used
+ to allow to extend for future higher rates";
+ }
+ leaf otu4-member-id {
+ when "../rate = 'org-openroadm-otn-common-types:OTU4'";
+ type uint16;
+ description
+ "To uniquely identify each member of an OTSi group and the order of each member in the group.
+ Similar to FlexO PHY-ID in the FlexO Group (PID in G.709.1/3)";
+ }
+ leaf otucn-n-rate {
+ when "../rate = 'org-openroadm-otn-common-types:OTUCn'";
+ type uint16;
+ description
+ "Specify the N associated with OTUCn, e.g. N = 2,3,4 for 200G/300G/400G respectively";
+ }
+ leaf otucn-M-subrate {
+ when "../rate = 'org-openroadm-otn-common-types:OTUCn'";
+ type uint16;
+ description
+ "OTUCn subrate (OTUCn-M), value of M specifies the number of active
+ 5 Gbit/s OPUCn tributary slots (G.709 Annex H)";
+ }
+ }
+
+ grouping otsi-attributes {
+ description
+ "Optical Channel attributes";
+ leaf otsi-rate {
+ type identityref {
+ base org-openroadm-common-optical-channel-types:otsi-rate-identity;
+ }
+ description
+ "OTSi rate";
+ }
+ leaf modulation-format {
+ type org-openroadm-common-optical-channel-types:modulation-format;
+ description
+ "Modulation format";
+ }
+ uses common-och-otsi-attributes;
+ }
+
+ grouping otsi-group-attributes {
+ description
+ "Optical Channel attributes";
+ leaf group-rate {
+ type identityref {
+ base org-openroadm-common-optical-channel-types:otsi-rate-identity;
+ }
+ description
+ "Supported group rate";
+ }
+ leaf group-id {
+ type uint32;
+ description
+ "Mandatory for FlexO B100G. Not required for Non-FlexO B100G.";
+ }
+ }
+
+ grouping resource-reporting {
+ leaf type {
+ type identityref {
+ base org-openroadm-interfaces:interface-type;
+ }
+ mandatory true;
+ description
+ "The type of the interface.";
+ }
+ container ethernet {
+ when "../type = 'ethernetCsmacd'";
+ description
+ "Ethernet Interfaces";
+ uses eth-attributes;
+ }
+ container mc-ttp {
+ when "../type = 'mediaChannelTrailTerminationPoint'";
+ description
+ "Media Channel Trail Termination Point (MC-TTP)";
+ uses mc-ttp-attributes;
+ }
+ container nmc-ctp {
+ when "../type = 'networkMediaChannelConnectionTerminationPoint'";
+ description
+ "Network Media Channel Connection Termination Point (NMC-CTP)";
+ uses nmc-ctp-attributes;
+ }
+ container och {
+ when "../type = 'opticalChannel'";
+ description
+ "Optical Channel (OCh):
+ Models the optical channel interfaces for an Optical White Box.";
+ uses och-attributes;
+ }
+ container odu {
+ when "../type = 'otnOdu'";
+ presence "Attribute Nodes for Optical Data Unit (ODU)";
+ description
+ "Optical Channel Data Unit (ODU)";
+ uses odu-attributes;
+ }
+ container otu {
+ when "../type = 'otnOtu'";
+ description
+ "Optical Channel Transport Unit (OTU)";
+ uses otu-attributes;
+ }
+ container otsi {
+ when "../type = 'otsi'";
+ description
+ "OTSI";
+ uses otsi-attributes;
+ }
+ container otsi-group {
+ when "../type = 'otsi-group'";
+ description
+ "OTSI-Group";
+ uses otsi-group-attributes;
+ }
+ }
+
+ grouping resource {
+ description
+ "This resource identifier is intended to provide a generic identifier
+ for any resource that can be used without specific knowledge of
+ the resource.";
+ container device {
+ description
+ "Device of the resource, used only when the system using this
+ model report on more than one device. ";
+ uses org-openroadm-resource-types:device-id;
+ }
+ container resource {
+ choice resource {
+ case circuit-pack {
+ uses org-openroadm-resource-types:circuit-pack-name;
+ }
+ case port {
+ container port {
+ uses org-openroadm-resource-types:port-name;
+ }
+ }
+ case connection {
+ uses org-openroadm-resource-types:connection-name {
+ refine "connection-name" {
+ mandatory true;
+ }
+ }
+ }
+ case physical-link {
+ uses org-openroadm-resource-types:physical-link-name;
+ }
+ case internal-link {
+ uses org-openroadm-resource-types:internal-link-name;
+ }
+ case shelf {
+ uses org-openroadm-resource-types:shelf-name;
+ }
+ case srg {
+ uses org-openroadm-resource-types:srg-number {
+ refine "srg-number" {
+ mandatory true;
+ }
+ }
+ }
+ case degree {
+ uses org-openroadm-resource-types:degree-number {
+ refine "degree-number" {
+ mandatory true;
+ }
+ }
+ }
+ case service {
+ uses org-openroadm-resource-types:service-name;
+ }
+ case interface {
+ uses org-openroadm-resource-types:interface-name;
+ }
+ case odu-sncp-pg {
+ uses org-openroadm-resource-types:odu-sncp-pg-name;
+ }
+ case client-sncp-pg {
+ uses org-openroadm-resource-types:client-sncp-pg-name;
+ }
+ case other {
+ uses org-openroadm-resource-types:other-resource-id;
+ }
+ case device {
+ uses org-openroadm-resource-types:device-id {
+ refine "node-id" {
+ mandatory true;
+ }
+ }
+ }
+ case line-amplifier {
+ uses org-openroadm-resource-types:amp-number;
+ }
+ case xponder {
+ uses org-openroadm-resource-types:xpdr-number;
+ }
+ case versioned-service {
+ uses org-openroadm-resource-types:versioned-service-name;
+ }
+ case temp-service {
+ uses org-openroadm-resource-types:temp-service-name;
+ }
+ }
+ }
+ container resourceType {
+ uses org-openroadm-resource-types:resource-type;
+ }
+ }
+}
import org-openroadm-common-service-types {
prefix org-openroadm-common-service-types;
- revision-date 2019-05-31;
+ revision-date 2021-12-10;
}
import org-openroadm-common-ber-test {
prefix org-openroadm-common-ber-test;
- revision-date 2018-11-30;
+ revision-date 2020-05-29;
}
import ietf-yang-types {
prefix yang;
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE";
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2021-03-26 {
+ description
+ "Version 9.0";
+ }
+ revision 2020-12-11 {
+ description
+ "Version 8.1";
+ }
+ revision 2020-09-25 {
+ description
+ "Version 8.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2019-09-27 {
+ description
+ "Version 6.0.0";
+ }
revision 2019-05-31 {
description
"Version 5.1.0";
}
}
}
+
grouping ber-test-complex-result-details-container {
container ber-test-result-details {
list supporting-service-details {
}
}
}
+
grouping ber-test-complex-result-container {
container ber-results {
uses org-openroadm-common-ber-test:ber-test-options-container;
uses ber-test-complex-result-details-container;
}
}
+
rpc ber-test {
description
"This is the ber-test rpc. It is supported for a service in the service-list.";
uses org-openroadm-common-service-types:configuration-response-common;
}
}
-rpc complex-ber-test {
+
+ rpc complex-ber-test {
description
"This is the complex-ber-test rpc. It is supported for a service in the service-list.";
input {
uses org-openroadm-common-service-types:configuration-response-common;
}
}
+
rpc service-rpc-ber-test-async-callback {
description
"This is the callback notification that the controller invokes on the carrier system.";
uses org-openroadm-common-service-types:configuration-response-common;
}
}
+
rpc complex-service-rpc-ber-test-async-callback {
description
"This is the callback notification that the controller invokes on the carrier system.";
uses org-openroadm-common-service-types:configuration-response-common;
}
}
+
notification service-notification-ber-test {
description
"This is the callback notification that the controller invokes on the carrier system.";
}
uses ber-test-result-details-container;
}
+
notification complex-service-notification-ber-test {
description
"This is the callback notification that the controller invokes on the carrier system.";
uses ber-test-complex-result-details-container;
}
}
-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE";
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
revision 2018-11-30 {
description
"Version 4.1.0";
container ber-options {
leaf target-prefec-ber {
type decimal64 {
- fraction-digits 4;
+ fraction-digits 18;
}
}
leaf duration {
}
}
}
+
grouping complex-ber-test-options-container {
container complex-ber-options {
uses ber-test-options-container;
- leaf is-complex-result{
+ leaf is-complex-result {
type boolean;
default "false";
description
}
import org-openroadm-routing-constraints {
prefix org-openroadm-routing-constraints;
- revision-date 2019-03-29;
+ revision-date 2021-12-10;
}
import org-openroadm-topology {
prefix org-openroadm-topology;
- revision-date 2019-05-31;
+ revision-date 2021-12-10;
}
import org-openroadm-common-equipment-types {
prefix org-openroadm-common-equipment-types;
- revision-date 2018-11-30;
+ revision-date 2019-11-29;
}
import org-openroadm-common-state-types {
prefix org-openroadm-common-state-types;
- revision-date 2018-11-30;
+ revision-date 2019-11-29;
}
import org-openroadm-common-node-types {
prefix org-openroadm-common-node-types;
- revision-date 2018-11-30;
+ revision-date 2021-05-28;
}
import org-openroadm-resource-types {
prefix org-openroadm-resource-types;
- revision-date 2018-11-30;
+ revision-date 2021-09-24;
}
import org-openroadm-otn-common-types {
prefix org-openroadm-otn-common-types;
- revision-date 2018-11-30;
+ revision-date 2021-09-24;
}
import org-openroadm-common-types {
prefix org-openroadm-common-types;
- revision-date 2019-05-31;
+ revision-date 2021-12-10;
}
import org-openroadm-equipment-states-types {
prefix org-openroadm-equipment-states-types;
- revision-date 2018-11-30;
+ revision-date 2019-11-29;
}
import org-openroadm-service-format {
prefix org-openroadm-service-format;
- revision-date 2019-05-31;
+ revision-date 2019-11-29;
}
+ import org-openroadm-common-attributes {
+ prefix org-openroadm-common-attributes;
+ revision-date 2021-09-24;
+ }
+ import org-openroadm-common-phy-codes {
+ prefix org-openroadm-common-phy-codes;
+ revision-date 2021-05-28;
+ }
+ import org-openroadm-common-optical-channel-types {
+ prefix org-openroadm-common-optical-channel-types;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-resource {
+ prefix org-openroadm-resource;
+ revision-date 2021-12-10;
+ }
+
organization
"Open ROADM MSA";
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE";
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2021-03-26 {
+ description
+ "Version 9.0";
+ }
+ revision 2020-12-11 {
+ description
+ "Version 8.1";
+ }
+ revision 2020-09-25 {
+ description
+ "Version 8.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2019-09-27 {
+ description
+ "Version 6.0.0";
+ }
revision 2019-05-31 {
description
"Version 5.1.0";
typedef rpc-actions {
type enumeration {
- enum "service-create" {
+ enum service-create {
value 1;
}
- enum "service-feasibility-check" {
+ enum service-feasibility-check {
value 2;
}
- enum "service-delete" {
+ enum service-delete {
value 3;
}
- enum "equipment-notification" {
+ enum equipment-notification {
value 4;
}
- enum "temp-service-create" {
+ enum temp-service-create {
value 5;
}
- enum "temp-service-delete" {
+ enum temp-service-delete {
value 6;
}
- enum "service-roll" {
+ enum service-roll {
value 7;
}
- enum "service-reconfigure" {
+ enum service-reconfigure {
value 8;
}
- enum "service-restoration" {
+ enum service-restoration {
value 9;
}
- enum "service-reversion" {
+ enum service-reversion {
value 10;
}
- enum "service-reroute" {
+ enum service-reroute {
value 11;
}
- enum "service-reroute-confirm" {
+ enum service-reroute-confirm {
value 12;
}
- enum "network-re-optimization" {
+ enum network-re-optimization {
value 13;
}
- enum "service-feasibility-check-bulk" {
+ enum service-feasibility-check-bulk {
value 14;
}
- enum "ber-test" {
+ enum ber-test {
value 15;
}
+ enum controller-parameters-setting {
+ value 16;
+ }
+ enum optical-tunnel-create {
+ value 17;
+ }
+ enum optical-tunnel-request-cancel {
+ value 18;
+ }
+ enum fill-catalog-with-or-operational-modes {
+ value 19;
+ }
+ enum fill-catalog-with-specific-operational-modes {
+ value 20;
+ }
}
description
"rpc-actions include all the rpc methods";
typedef ethernet-encoding-type {
type enumeration {
- enum "10GBASE-W" {
+ enum 10GBASE-W {
value 1;
}
- enum "10GBASE-R" {
+ enum 10GBASE-R {
value 2;
}
}
typedef mapping-mode-type {
type enumeration {
- enum "GFP-F" {
+ enum GFP-F {
value 1;
- reference "GFP-F - ITU-T G.7041 SubClause 7.1, Payload Only";
+ reference
+ "GFP-F - ITU-T G.7041 SubClause 7.1, Payload Only";
}
- enum "GFP-E" {
+ enum GFP-E {
value 2;
- reference "GFP-E - ITU-T G.7041 SubClause 7.9, Payload + Preamble + Ordered Sets";
+ reference
+ "GFP-E - ITU-T G.7041 SubClause 7.9, Payload + Preamble + Ordered Sets";
}
- enum "PCS-Transparent" {
+ enum PCS-Transparent {
value 3;
- reference "PCS-Transparent - ITU-T G.709 Subclause 17.2 , CBR10G3 mapping to ODU2e";
+ reference
+ "PCS-Transparent - ITU-T G.709 Subclause 17.2 , CBR10G3 mapping to ODU2e";
}
}
}
typedef service-layer-type {
type enumeration {
- enum "wdm" {
+ enum wdm {
value 1;
}
- enum "otn" {
+ enum otn {
value 2;
}
}
typedef service-notification-types {
type enumeration {
- enum "service-create-result" {
+ enum service-create-result {
value 1;
}
- enum "service-reconfigure-result" {
+ enum service-reconfigure-result {
value 2;
}
- enum "service-delete-result" {
+ enum service-delete-result {
value 3;
}
- enum "service-roll-result" {
+ enum service-roll-result {
value 4;
}
- enum "service-revert-result" {
+ enum service-revert-result {
value 5;
}
- enum "service-reroute-result" {
+ enum service-reroute-result {
value 6;
}
- enum "service-restoration-result" {
+ enum service-restoration-result {
value 7;
}
+ enum successful-path-computation-resource-reserved {
+ value 8;
+ }
+ enum path-computation-failed {
+ value 9;
+ }
}
}
typedef connection-type {
type enumeration {
- enum "service" {
+ enum service {
+ value 1;
+ }
+ enum infrastructure {
+ value 2;
+ }
+ enum roadm-line {
+ value 3;
+ }
+ enum optical-tunnel {
+ value 4;
+ }
+ }
+ }
+
+ typedef resource-status-type {
+ type enumeration {
+ enum deployed {
value 1;
+ description
+ "find the best route using deployed network resources,
+ regardless of network failures; lifecycle-state must
+ be deployed and operational-state is ignored.";
}
- enum "infrastructure" {
+ enum in-service {
value 2;
+ description
+ "find the best route using deployed network resources,
+ but route around failed resources; lifecycle-state
+ must be deployed and operational-state must be
+ inService.";
}
- enum "roadm-line" {
+ enum planned {
value 3;
+ description
+ "find the best route using both deployed and planned
+ network resources; lifecycle-state must be planned
+ or deployed (deploying, deployed-updating, deployed-
+ augmented, and deploy-failed may be considered
+ planned states) and operational-state is ignored. if
+ planned is selected, due-date must be specified in
+ the service request.";
}
}
+ default "deployed";
+ description
+ "identifies the state of network resources required to
+ complete a service request. default is deployed";
}
typedef service-condition {
type enumeration {
- enum "restored-temporarily" {
+ enum restored-temporarily {
value 1;
}
- enum "re-routed-temporarily" {
+ enum re-routed-temporarily {
value 2;
}
- enum "activated-for-service" {
+ enum activated-for-service {
value 3;
}
- enum "activated-for-further-check" {
+ enum activated-for-further-check {
value 4;
}
- enum "activated-for-troubleshooting-failure" {
+ enum activated-for-troubleshooting-failure {
value 5;
}
}
grouping service-and-supporting-services {
description
- "Service identifiers and supporting services details";
+ "Service identifiers and supporting services details";
uses service-identifiers-container;
uses supporting-services-identifiers-and-ends;
}
}
}
+ grouping trail-trace {
+ description
+ "Trail trace grouping";
+ uses org-openroadm-common-attributes:trail-trace-tx;
+ uses org-openroadm-common-attributes:trail-trace-other;
+ }
+
+ grouping tcm-attributes {
+ description
+ "Tandem Connection Monitoring (TCM) attributes";
+ leaf layer {
+ type uint8 {
+ range "1..6";
+ }
+ description
+ "TCM layer";
+ }
+ leaf monitoring-mode {
+ type enumeration {
+ enum not-terminated {
+ description
+ "Not Terminated: no detection or generation.
+ Overhead is passed through the interface transparently in receive direction
+ unless extension is set for erase";
+ }
+ enum terminated {
+ description
+ "Terminated: detection and generation enabled.
+ Overhead is erased (replaced with all zeros) in receive direction, unless
+ extension is set to passthrough";
+ }
+ enum monitored {
+ description
+ "Monitored: detection enabled.
+ Overhead is passed through the interface transparently in receive direction
+ unless extension is set for erase";
+ }
+ }
+ description
+ "Monitoring mode of the TCM layer";
+ }
+ leaf ltc-act-enabled {
+ type boolean;
+ description
+ "enable/disable alarm transfer on detection of Loss of Tandem Connection (LTC)";
+ }
+ leaf proactive-delay-measurement-enabled {
+ type boolean;
+ description
+ "enable/disable proactive Delay Measurement for TCM";
+ }
+ leaf tcm-direction {
+ type org-openroadm-otn-common-types:tcm-direction-enum;
+ description
+ "Direction of TCM.";
+ }
+ uses trail-trace;
+ uses org-openroadm-common-attributes:deg-threshold;
+ }
+
+ grouping otn-attributes-grp {
+ container otn-attributes {
+ when "(../service-format='OTU' or ../service-format='ODU')" {
+ description
+ "For any OTN services (OTU and OTN)";
+ }
+ uses org-openroadm-common-attributes:parent-odu-allocation;
+ uses org-openroadm-common-types:fec-grouping {
+ description
+ "OTN FEC / Forward Error Correction";
+ }
+ uses org-openroadm-common-attributes:trail-trace-tx;
+ uses org-openroadm-common-attributes:trail-trace-other;
+ uses org-openroadm-common-attributes:deg-threshold;
+ leaf-list reserved-tcm-layer {
+ type uint8;
+ }
+ list tcm {
+ key "layer tcm-direction";
+ max-elements 12;
+ description
+ "Tandem Connection Management";
+ uses tcm-attributes;
+ }
+ }
+ }
+
+ grouping ethernet-subrate-attributes-grp {
+ container ethernet-attributes {
+ when "(../service-format='Ethernet')" {
+ description
+ "For any Ethernet services";
+ }
+ uses org-openroadm-common-types:fec-grouping {
+ description
+ "ETH FEC / Forward Error Correction";
+ }
+ uses org-openroadm-common-service-types:subrate-eth-sla;
+ }
+ }
+
grouping service-ends-container {
container service-a-end {
uses service-endpoint-summary;
grouping service-endpoint-summary {
description
- "Brief form of service-endpoint";
+ "Brief form of service-endpoint";
container service-endpoint-details {
leaf clli {
type string;
}
}
+ grouping intermediate-site-container {
+ description
+ "Intermediate site used in the service feasibility check output.
+ This is different from the service-endpoint structure";
+ list intermediate-site {
+ key "clli";
+ description
+ "List of intermediate sites in the service feasiblity check
+ output response";
+ leaf clli {
+ type string;
+ }
+ list node {
+ key "node-id";
+ leaf node-id {
+ type org-openroadm-common-node-types:node-id-type;
+ description
+ "List of nodes within a CLLI";
+ }
+ list equipment-required {
+ key "equipment-identifier";
+ description
+ "List of required equipment, including equipment type, state and
+ quantity";
+ uses equipment-info;
+ }
+ }
+ }
+ }
+
grouping service-identifiers-container {
container service-identifiers {
leaf service-name {
}
}
+ grouping external-interface-characteristics {
+ list supported-operational-modes {
+ key "preference";
+ description
+ "list of supported operational modes associated to a preference
+ for their selection by the Path Computation Engine (1 is the highest priority)
+ only one operational mode shall be associated to a preference. 2 leaves present
+ since this mode could be either specific or an openROADM operational-mode";
+ leaf preference {
+ type int16;
+ description
+ "preference/priority associated to the operational mode";
+ }
+ leaf operational-mode-id {
+ type string;
+ description
+ "the supported operational mode : either openROADM or specific ";
+ }
+ }
+ leaf min-frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ description
+ "Minimum acceptable Frequency in THz.";
+ }
+ leaf max-frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ description
+ "Minimum acceptable Frequency in THz.";
+ }
+ leaf min-granularity {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ description
+ "Minimum grid granularity in GHz.";
+ }
+ }
+
grouping service-endpoint {
leaf service-format {
type org-openroadm-service-format:service-format;
description
"Rate of the requested service in GBps";
}
+ leaf is-split-lambda {
+ type boolean;
+ default "false";
+ description
+ "This flag allows to specify whether to use split-lambda. It can be user controlled
+ (or specified) or controller initiated. This is only applicable for line-service or
+ network ports";
+ }
+ leaf split-lambda-service-rate {
+ when "../is-split-lambda = 'true' and
+ ../service-format != 'OMS' and
+ ../service-format != 'ODU'";
+ type uint32;
+ description
+ "This service rate is only applicable when the split-lambda is enabled.
+ It will help to identify how many wavelengths to use. Only applicable
+ to the WDM layer and OTUCn services.";
+ }
leaf other-service-format-and-rate {
type string;
description
"ODU Rate of the requested service";
}
leaf ethernet-encoding {
- when
- "(../service-format='Ethernet')
- and
- (../service-rate=10)" {
+ when "(../service-format='Ethernet')
+ and
+ (../service-rate=10)" {
description
"Applicable only to Ethernet 10G services";
}
"Ethernet encoding type";
}
leaf mapping-mode {
- when
- "(../service-format='Ethernet')
- and
- (../service-rate=10)" {
+ when "(../service-format='Ethernet')
+ and
+ (../service-rate=10)" {
description
"Mapping Mode, currently only defined for Ethernet 10G services";
}
description
"Mapping mode.";
}
+ leaf client-phy-code {
+ type identityref {
+ base org-openroadm-common-phy-codes:client-phy-code-identity;
+ }
+ description
+ "Client PHY Code for the service end point.";
+ }
+ uses otn-attributes-grp;
leaf clli {
type string;
mandatory true;
endpoint";
}
uses org-openroadm-resource-types:device-id;
- container tx-direction {
+ list tx-direction {
+ key "index";
+ leaf index {
+ type uint8;
+ description
+ "Used to list tx-direction attributes for each split-lambda wavelength/service";
+ }
uses service-port;
uses service-lgx;
uses service-tail;
}
- container rx-direction {
+ list rx-direction {
+ key "index";
+ leaf index {
+ type uint8;
+ description
+ "used to list rx-direction attributes for each split-lambda wavelength/service";
+ }
uses service-port;
uses service-lgx;
uses service-tail;
description
"Label for service endpoint, defined by the user";
}
- container subrate-eth-sla {
- when "(../service-format='Ethernet')" {
+ uses ethernet-subrate-attributes-grp;
+ leaf project-id {
+ type string;
description
- "For any Ethernet services";
+ "Project identifier for the service end point";
+ }
+ leaf project-note {
+ type string;
+ description
+ "Additional details associated with the service end point project";
+ }
+ }
+
+ typedef existing-resource-reuse-type {
+ description
+ "Used to indicate the type of resource that the existing service
+ can reuse wherever possible (best-effort)";
+ type enumeration {
+ enum regenerator {
+ description
+ "Indicates reuse regenerator";
+ value 1;
+ }
+ enum wavelength {
+ description
+ "Indicates reuse of wavelength";
+ value 2;
+ }
+ enum spectrum-portion {
+ description
+ "Indicates reuse of frequency slot(s). Reuse the exact
+ or partial portion of the spectrum of the original service
+ specturm";
+ value 3;
+ }
+ enum xponder {
+ description
+ "This could be a transponder/muxponder/switchponder";
+ value 4;
+ }
+ enum all {
+ description
+ "Reuse all possible options";
+ value 99;
+ }
+ }
+ }
+
+ grouping existing-service-grouping {
+ container existing-service-attributes {
+ description
+ "This consists of all the attributes related to the existing service";
+ leaf is-existing {
+ type boolean;
+ description
+ "This is set true if feasibility check is on an existing service with or
+ without new constraints. Feasibility is done as if current service
+ and its resources are released";
+ }
+ leaf existing-service-name {
+ when "../is-existing = 'true'";
+ type string;
+ description
+ "Name of the existing service";
+ }
+ leaf reuse-existing-resources {
+ type boolean;
+ description
+ "If true reuse the existing equipment wherever possible";
+ }
+ leaf-list reusable-existing-resources {
+ when "../reuse-existing-resources = 'true'";
+ type existing-resource-reuse-type;
+ description
+ "List of existing resources that can be reused;
+ This list is enabled only when the reuse-existing-equipment
+ is set true";
}
- uses org-openroadm-common-service-types:subrate-eth-sla;
}
}
leaf port-circuit-pack-name {
type string;
}
+ leaf port-circuit-pack-type {
+ type string;
+ }
leaf port-type {
type string;
}
leaf due-date {
type yang:date-and-time;
description
- "Date and time service to be turn up. If time is not specified for a given date, default to midnight. Service turned up immediately if no due date is specified";
+ "Date and time service to be turn up. If time is not specified for a given date,
+ default to midnight. Service turned up immediately if no due date is specified";
}
leaf end-date {
type yang:date-and-time;
leaf nc-code {
type string;
description
- "NC code applied to wavelength service only. This is reported against the service, but may not get reflected in the service in the network.";
+ "NC code applied to wavelength service only. This is reported against the service,
+ but may not get reflected in the service in the network.";
}
leaf nci-code {
type string;
description
- "NCI code applied to wavelength service only. This is reported against the service, but may not get reflected in the service in the network.";
+ "NCI code applied to wavelength service only. This is reported against the service,
+ but may not get reflected in the service in the network.";
}
leaf secondary-nci-code {
type string;
description
- "NC code applied to wavelength service only. This is reported against the service, but may not get reflected in the service in the network.";
+ "NC code applied to wavelength service only. This is reported against the service,
+ but may not get reflected in the service in the network.";
}
leaf customer {
type string;
description
- "To be included in ticket information. This is reported against the service, but may not get reflected in the service in the network.";
+ "To be included in ticket information. This is reported against the service,
+ but may not get reflected in the service in the network.";
}
leaf customer-contact {
type string;
description
- "Customer contact information to be included in ticket information. This is reported against the service, but may not get reflected in the service in the network.";
+ "Customer contact information to be included in ticket information.
+ This is reported against the service, but may not get reflected in the service
+ in the network.";
}
leaf operator-contact {
type string;
description
- "Operator contact information to be included in ticket information. This is reported against the service, but may not get reflected in the service in the network.";
+ "Operator contact information to be included in ticket information.
+ This is reported against the service, but may not get reflected in the service
+ in the network.";
}
leaf service-layer {
type service-layer-type;
Reference to the network-id of either the openroadm-topology
or the otn-topology layer depending upon service-layer (wdm or otn).";
}
+ leaf sla-id {
+ type string;
+ description
+ "Service Level Agreement";
+ }
leaf bandwidth-calendaring {
type boolean;
description
}
leaf-list day-of-the-week {
type enumeration {
- enum "Monday" {
+ enum Monday {
value 1;
}
- enum "Tuesday" {
+ enum Tuesday {
value 2;
}
- enum "Wednesday" {
+ enum Wednesday {
value 3;
}
- enum "Thursday" {
+ enum Thursday {
value 4;
}
- enum "Friday" {
+ enum Friday {
value 5;
}
- enum "Saturday" {
+ enum Saturday {
value 6;
}
- enum "Sunday" {
+ enum Sunday {
value 7;
}
}
}
leaf start-time {
type string {
- pattern "\\d{2}:\\d{2}:\\d{2}";
+ pattern '\d{2}:\d{2}:\d{2}';
}
description
"start time expressed as hour:min:seconds";
}
leaf end-time {
type string {
- pattern "\\d{2}:\\d{2}:\\d{2}";
+ pattern '\d{2}:\d{2}:\d{2}';
}
description
"end time expressed as hour:min:seconds";
}
}
+ grouping service-order {
+ description
+ "Service Order information for service";
+ leaf order-id {
+ type string;
+ description
+ "Order identifier for this service";
+ }
+ leaf order-note {
+ type string;
+ description
+ "Additional details associated with the service order";
+ }
+ }
+
+ grouping resource-status {
+ description
+ "Grouping used to consisistenty apply resource-status
+ naming to appropriate RPC.";
+ leaf resource-status {
+ type resource-status-type;
+ description
+ "identifies the state of network resources required
+ to complete a service request.";
+ }
+ }
+
grouping service {
leaf service-name {
type string;
"To be used by the ROADM controller to identify the routing
constraints received from planning application (PED).";
}
+ uses service-order;
uses sdnc-request-header;
uses service-resiliency;
uses routing-metric;
description
"Lifecycle State of service. Whether it is planned, deployed, in maintenance, etc.";
}
+ uses resource-status;
leaf administrative-state {
type org-openroadm-equipment-states-types:admin-states;
description
uses org-openroadm-routing-constraints:routing-constraints;
uses service-information;
leaf latency {
- type uint32;
+ type decimal64 {
+ fraction-digits 3;
+ }
description
- "Latency on service";
+ "One-way latency (in milliseconds) on service";
+ units "milliseconds";
}
leaf-list fiber-span-srlgs {
type string;
}
}
- grouping equipment-info {
- leaf equipment-identifier {
- type string;
+ grouping service-port-list {
+ list port {
+ key "circuit-pack-name port-name";
+ description
+ "List allows to output more than one piece of equipment per CLLI;
+ Port-name is unique in the context of circuit-pack";
+ leaf circuit-pack-name {
+ type string;
+ }
+ leaf port-name {
+ type string;
+ }
+ leaf lifecycle-state {
+ type org-openroadm-common-state-types:lifecycle-state;
+ }
}
+ }
+
+ grouping equipment-info {
leaf equipment-type {
type string;
description
"The set of valid value is derived from the equipment-type grouping used in the device model.";
}
- leaf equipment-quantity {
- type uint32;
+ leaf equipment-identifier {
+ type string;
}
leaf lifecycle-state {
type org-openroadm-common-state-types:lifecycle-state;
}
+ leaf equipment-rack {
+ type string;
+ }
+ leaf equipment-shelf {
+ type string;
+ }
+ leaf equipment-slot {
+ type string;
+ }
+ leaf equipment-sub-slot {
+ type string;
+ }
+ leaf is-reused {
+ type boolean;
+ description
+ "This is set true if the equipment-required is being reused for
+ service roll";
+ }
+ uses service-port-list;
}
grouping eventHorizon {
be considered reserved until this time. If not provided, defaults to end-date.";
}
}
+
+ grouping service-hierarchy {
+ leaf service-identifier {
+ type string;
+ description
+ "Based on the level in the service hierarchy, this indentifier can be for the
+ proposed or existing service";
+ }
+ leaf service-layer {
+ type service-layer-type;
+ default "wdm";
+ description
+ "Layer associated with service (e.g. wdm or otn)";
+ }
+ container service-a-end {
+ leaf clli {
+ type string;
+ description
+ "Based on the level in the service hierarchy, A-end CLLI of the
+ proposed or existing service.";
+ }
+ }
+ container service-z-end {
+ leaf clli {
+ type string;
+ description
+ "Based on the level in the service hierarchy, Z-end CLLI of the
+ proposed or existing service.";
+ }
+ }
+ list supporting-service {
+ key "id";
+ uses supporting-service;
+ }
+ container transport-assignment {
+ container mc-ttp {
+ description
+ "Media Channel Trail Termination Point (MC-TTP)";
+ uses org-openroadm-resource:mc-ttp-attributes;
+ }
+ list nmc-ctp {
+ key "id";
+ description
+ "List of Network Media Channel Connection Termination Point (NMC-CTP)";
+ leaf id {
+ type string;
+ description
+ "This used to indentify the NMC in the MC. For example split-lambda would
+ have two NMCs";
+ }
+ uses org-openroadm-resource:nmc-ctp-attributes;
+ }
+ container odu-allocation {
+ description
+ "parent odu allocation";
+ leaf trib-port-number {
+ type uint16 {
+ range "1 .. 80";
+ }
+ description
+ "Assigned tributary port number in parent OPU";
+ }
+ choice trib-slots-choice {
+ description
+ "trib slot selection";
+ case opu {
+ leaf min-trib-slot {
+ type uint16;
+ description
+ "Minimum assigned trib slots occupied in parent OPU MSI";
+ }
+ leaf max-trib-slot {
+ type uint16;
+ description
+ "Maximum assigned trib slots occupied in parent OPU MSI";
+ }
+ }
+ case opucn {
+ leaf opucn-min-trib-slot {
+ type org-openroadm-otn-common-types:opucn-trib-slot-def;
+ description
+ "Minimum OPUCn 5G trib slots in the form of TS #A.B (G.709)";
+ }
+ leaf opucn-max-trib-slot {
+ type org-openroadm-otn-common-types:opucn-trib-slot-def;
+ description
+ "Maximum OPUCn 5G trib slots in the form of TS #A.B (G.709)";
+ }
+ }
+ }
+ }
+ leaf is-reused {
+ type boolean;
+ description
+ "This flag is true if the spectral assignment overlaps--in part or in full--with
+ that of the active instance of the service. A determination whether the overlap
+ is full or partial requires a detailed comparison of spectral assignments; it
+ is not indicated here.";
+ }
+ }
+ }
+
+ grouping supporting-service {
+ leaf service-identifier {
+ type string;
+ }
+ leaf id {
+ type string;
+ }
+ container service-a-end {
+ uses supporting-service-detail;
+ }
+ container service-z-end {
+ uses supporting-service-detail;
+ }
+ }
+
+ grouping supporting-service-detail {
+ leaf service-format {
+ type org-openroadm-service-format:service-format;
+ mandatory true;
+ description
+ "Format of the requested service: Ethernet, OTU, etc.";
+ }
+ leaf service-rate {
+ when "../service-format != 'OMS' and ../service-format != 'ODU'" {
+ description
+ "service rate not applicable when service
+ format is roadmline or ODU; valid for OTU since service-rate has
+ already been supported for wdm layer OTU services (100 for OTU4)";
+ }
+ type uint32;
+ description
+ "Rate of the requested service in GBps";
+ }
+ leaf other-service-format-and-rate {
+ type string;
+ description
+ "Used when service-format is set to other in the bookend xponder use case.
+ The use of other-service-format-and-rate is not standardized in the Open ROADM MSA
+ and intended to allow the controller to support non-Open ROADM service formats.
+ This value encodes both the service format and the rate supported.
+ This field should not be specified when service format != other.";
+ }
+ leaf otu-service-rate {
+ when "../service-format = 'OTU'" {
+ description
+ "only applicable for OTU services";
+ }
+ type identityref {
+ base org-openroadm-otn-common-types:otu-rate-identity;
+ }
+ description
+ "OTU Rate of the requested service";
+ }
+ leaf odu-service-rate {
+ when "../service-format = 'ODU'" {
+ description
+ "only applicable for ODU services";
+ }
+ type identityref {
+ base org-openroadm-otn-common-types:odu-rate-identity;
+ }
+ description
+ "ODU Rate of the requested service";
+ }
+ leaf clli {
+ type string;
+ description
+ "CLLI of the supporting service";
+ }
+ leaf node-id {
+ type org-openroadm-common-node-types:node-id-type;
+ description
+ "Node id. This is reported against the service, but may not get
+ reflected in the service in the network.";
+ }
+ }
+
+ grouping max-regeneration-options {
+ leaf max-regeneration-options {
+ type uint8;
+ default "1";
+ description
+ "Max regeneration options, is maximum number of regeneration-option-list elements requested in
+ service-feasibility output. RNC can return less number of regeneration-options based on it's
+ calculation but should not return more than max-regeneration-options. The goal of this field
+ is to avoid RNC from having performance issues.";
+ }
+ }
+
+ grouping regeneration-option-list {
+ list regeneration-option-list {
+ key "regeneration-option-rank";
+ leaf regeneration-option-rank {
+ type uint8;
+ description
+ "Regen option rank is derived rank based on optical performance or based on other metrics.";
+ }
+ list regeneration-clli-list {
+ key "sequence-id";
+ leaf sequence-id {
+ type uint8;
+ description
+ "Sequence id will define order of regeneration location for output path in A to Z direction.";
+ }
+ leaf regeneration-clli {
+ type string;
+ description
+ "CLLI for the site where regeneraton is located or bring proposed.";
+ }
+ leaf lifecycle-state {
+ type org-openroadm-common-state-types:lifecycle-state;
+ description
+ "Lifecycle State for regeneration CLLI indicating whether regen is already deployed or being proposed
+ for at this site.";
+ }
+ }
+ }
+ }
}
--- /dev/null
+module org-openroadm-controller-customization {
+ yang-version 1.1;
+ namespace "http://org/openroadm/controller/customization";
+ prefix org-openroadm-controller-customization;
+
+ import org-openroadm-common-link-types {
+ prefix org-openroadm-common-link-types;
+ revision-date 2019-11-29;
+ }
+ import org-openroadm-common-node-types {
+ prefix org-openroadm-common-node-types;
+ revision-date 2021-05-28;
+ }
+ import org-openroadm-common-service-types {
+ prefix org-openroadm-common-service-types;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-common-optical-channel-types {
+ prefix org-openroadm-common-optical-channel-types;
+ revision-date 2021-12-10;
+ }
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of services.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2021-03-26 {
+ description
+ "Version 9.0";
+ }
+ revision 2020-12-11 {
+ description
+ "Version 8.1";
+ }
+ revision 2020-09-25 {
+ description
+ "Version 8.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+
+ typedef notification-events {
+ type enumeration {
+ enum roadm-to-roadm-link-creation {
+ value 1;
+ }
+ enum roadm-to-roadm-link-deletion {
+ value 2;
+ }
+ enum otn-link-creation {
+ value 3;
+ }
+ enum otn-link-deletion {
+ value 4;
+ }
+ enum xpdr-in-out-link-creation {
+ value 5;
+ }
+ enum xpdr-in-out-link-deletion {
+ value 6;
+ }
+ enum link-state-change {
+ value 7;
+ }
+ enum otn-link-bandwidth-usage-change {
+ value 8;
+ }
+ enum node-creation {
+ value 9;
+ }
+ enum node-deletion {
+ value 10;
+ }
+ enum node-state-change {
+ value 11;
+ }
+ enum tp-creation {
+ value 12;
+ }
+ enum tp-deletion {
+ value 13;
+ }
+ enum tp-state-change {
+ value 14;
+ }
+ enum ila-state-change {
+ value 15;
+ }
+ enum none {
+ value 16;
+ }
+ enum all {
+ value 17;
+ }
+ }
+ description
+ "Define possible notification events.";
+ }
+
+ typedef rmsa-policy {
+ type enumeration {
+ enum maximize-capacity {
+ value 1;
+ }
+ enum maximize-reach {
+ value 2;
+ }
+ enum minimize-margins {
+ value 3;
+ }
+ enum maximize-margins {
+ value 4;
+ }
+ enum customer-spectrum-partitioning {
+ value 5;
+ }
+ enum fragmentation-limiting-partitioning {
+ value 6;
+ }
+ }
+ description
+ "Defines Routing Modulation and and Spectrum Allocation policies.";
+ }
+
+ typedef non-rpc-related-notification-type {
+ type enumeration {
+ enum service-state-change {
+ value 1;
+ }
+ enum topology-change {
+ value 2;
+ }
+ enum exceeded-attenuation-crossing-warning {
+ value 3;
+ }
+ enum insufficient-margin-crossing-alarm {
+ value 4;
+ }
+ enum autonomous-optical-restoration-triggered {
+ value 5;
+ }
+ }
+ description
+ "Defines notification types for non rpc related notifications.";
+ }
+
+ typedef restriction-scope {
+ description
+ "Used to indicate the scope of global restrictions";
+ type enumeration {
+ enum service-create {
+ value 1;
+ }
+ enum service-create-bulk {
+ value 2;
+ }
+ enum temp-service-create {
+ value 3;
+ }
+ enum temp-service-create-bulk {
+ value 4;
+ }
+ enum service-feasibility-check {
+ value 5;
+ }
+ enum service-feasibility-check-bulk {
+ value 6;
+ }
+ enum service-roll {
+ value 7;
+ }
+ enum service-reconfigure {
+ value 8;
+ }
+ enum service-restoration {
+ value 9;
+ }
+ enum service-reroute {
+ value 10;
+ }
+ enum network-re-optimization {
+ value 11;
+ }
+ enum all {
+ value 12;
+ }
+ }
+ }
+
+ typedef restriction-type {
+ description
+ "Used to indicate type of restriction for site or node";
+ type enumeration {
+ enum add-drop {
+ value 1;
+ description
+ "Add/drops are forbidden at the associated node (or site).
+ No service may add or drop at site/node";
+ }
+ enum pass-through {
+ value 2;
+ description
+ "Routing through the associated node (or site) is forbidden.
+ No service may pass-through at site/node";
+ }
+ enum both {
+ value 3;
+ description
+ "Both adds/drops and through routing are forbidden for
+ the associated node (or site).";
+ }
+ }
+ }
+
+ typedef regeneration-restriction-type {
+ description
+ "Used to indicate the type of restriction for the regeneration type";
+ type enumeration {
+ enum do-not-propose {
+ value 1;
+ description
+ "Proposing new regens (via a feasibility check)
+ at the associated node (or site) is forbidden.";
+ }
+ enum do-not-use-existing {
+ value 2;
+ description
+ "Use of an existing regen at the associated node
+ (or site) is forbidden.";
+ }
+ enum both {
+ value 3;
+ description
+ "Both use of existing regens and proposal of new regens
+ are forbidden at the associated node (or site).";
+ }
+ }
+ }
+
+ grouping spectrum-portion {
+ description
+ "Specifies a portion of the spectrum and its characteristics.";
+ leaf spectrum-portion-id {
+ type uint8;
+ description
+ "Identifies a spectrum portion with specific characteristics.";
+ }
+ leaf start-edge-frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ description
+ "If present, this parameter states the lowest frequency to start
+ filling the spectrum, or a spectrum portion if stop-bandwidth
+ is also defined.";
+ }
+ leaf stop-edge-frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ description
+ "If present and associated with a start frequency, this parameter
+ states the upper frequency broundary to fill the spectrum portion.
+ If present, in the absence of a start frequency, this parameter
+ states the highest frequency to start filling the spectrum.";
+ }
+ leaf-list dedicated-customer {
+ type string;
+ description
+ "Applies only to spectrum-portion (both start and stop edge frequencies
+ defined), when the spectrum-portion is dedicated to some customers.
+ This list shall includes customer-codes identifying specific customers.
+ No customer out of this list can share the bandwidth of this spectrum
+ portion";
+ }
+ leaf-list non-authorized-customer {
+ type string;
+ description
+ "Applies only to spectrum-portion (both start and stop edge frequencies
+ defined), when the spectrum-portion is dedicated to some customers.
+ This list shall includes customer-codes identifying specific customers,
+ that are not allowed to share the bandwidth of this spectrum portion";
+ }
+ }
+
+ grouping controller-parameters {
+ description
+ "Defines the structure of Service/controller-behaviour-settings container,
+ as well as the structure of controller-parameters-setting rpc input";
+ container non-rpc-related-notification-settings {
+ description
+ "Defines url, notification-type and type of events that shall / shall not
+ trigger notifications";
+ list non-rpc-related-notification-url-list {
+ key "non-rpc-related-notification-type";
+ description
+ "Used to record url to be used when forwarding non rpc related
+ notifications.";
+ leaf non-rpc-related-notification-type {
+ type non-rpc-related-notification-type;
+ description
+ "Type of notification will trigger specific leaves.";
+ }
+ leaf notification-url {
+ type string;
+ description
+ "Defines the url the notification is sent to.";
+ }
+ leaf-list events-disabling-notification {
+ when "../non-rpc-related-notification-type = 'topology-change'";
+ type notification-events;
+ description
+ "List of events for which notifications to SDN-Controller are
+ not desirabled. The filtering is currently activated only on topological
+ changes which could lead to large volumes of data.";
+ }
+ leaf-list events-triggering-notification {
+ when "../non-rpc-related-notification-type = 'topology-change'";
+ type notification-events;
+ description
+ "List of events for which notifications to SDN-Controller are
+ desirabled. Has the priority with regards to events-disabling-notification.
+ As an example if events-disabling-notification is set to all,
+ events set in events-triggering-notification will be the only
+ events to be notified";
+ }
+ }
+ }
+ container spectrum-filling {
+ description
+ "Spectrum may be filled according to specific rules to limit partitionning
+ or to dedicate part of the spectrum to some specific clients (customer-code)";
+ list spectrum-filling-rules {
+ key "rule-id";
+ description
+ "Defines a set of rules used to fill the spectrum";
+ leaf rule-id {
+ type uint16;
+ description
+ "defines the rule identifier";
+ }
+ leaf priority {
+ type uint8;
+ description
+ "The rules shall be applied sequentially according to their defined
+ priority (Highest:1, lowest:255). Rules with highest priority
+ will be applied first";
+ }
+ leaf RMSA-policy {
+ type rmsa-policy;
+ description
+ "Defines the Routing, Spectrum & Mode assignment policy to be applied";
+ }
+ container spectrum-range-of-appliance {
+ when "../RMSA-policy = 'customer-spectrum-partitioning' or ../RMSA-policy
+ = 'fragmentation-limiting-partitioning'";
+ description
+ "Defines, when needed, the spectrum range to which the rule applies";
+ uses spectrum-portion;
+ leaf dedicated-signal-bandwidth-multiple {
+ when "../../RMSA-policy = 'fragmentation-limiting-partitioning'" {
+ description
+ "For fragmentation partitioning, defines which part of the spectrum
+ will be used according to the signal spectral occupation";
+ }
+ type uint8;
+ description
+ "Used for spectrum partitioning to reduce fragmentation. Defines
+ the width of the service to be provisioned in the spectrum portion.
+ As an example a spectrum portion can be dedicated to signals with
+ a 50 GHz multiple spectral occupation, whereas another portion
+ of the spectrum is dedicated to signal with a 75 GHz multiple
+ spectral occupation";
+ }
+ }
+ }
+ }
+ container margins {
+ description
+ "defines all margins operator may want to specify";
+ leaf minimum-fiber-attenuation-bol-margin {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "Minimum fiber-attenuation margin to be considered for path calculation
+ at begining of life. The path calculation shall be made considering on
+ each link the engineered-spanloss (provided by an external sytem)
+ _The RNC shall raise an ALARM to the northbound Controller through
+ an insufficient-margin-crossing-alarm as soon as:
+ (span-loss-base + minimum-fiber-attenuation-bol-margin) - engineered-spanloss >
+ threshold-observed-vs-design-margin
+ _The RNC shall raise a WARNING to the northbound Controller through
+ an exceeded-attenuation-crossing-warning as soon as : (engineered-spanloss
+ - spanloss-current) < threshold-observed-vs-design-attenuation.";
+ }
+ leaf threshold-observed-vs-design-attenuation {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "Defines the threshold used to raise an alarm when fiber initial attenuation
+ is too close to the engineered-spanloss, meaning the value accounted for the
+ design has been underestimated and a new design shall triggered.";
+ }
+ leaf threshold-observed-vs-design-margin {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "Defines the threshold used to raise a warning when fiber measured attenuation
+ comes too close to the engineered-spanloss, so that remaining margin is considered
+ as too limited.";
+ }
+ list minimum-osnr-margins {
+ key "margin-id";
+ description
+ "osnr margins to be considered may differ according to the rate and the modulation format";
+ leaf margin-id {
+ type string;
+ description
+ "defines a margin for specific line-rates and modulation formats";
+ }
+ leaf minimum-osnr-margin-value {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "Minimum OSNR margin to be considered to keep an acceptable OSNR value
+ at end of life for the associated line-rates and modulation-formats";
+ }
+ leaf-list line-rates {
+ type uint64;
+ description
+ "Line-rates to which the osnr-margin applies";
+ }
+ leaf-list modulation-formats {
+ type org-openroadm-common-optical-channel-types:modulation-format;
+ description
+ "Modulation-formats to which the osnr-margin applies";
+ }
+ }
+ }
+ container metrics-policy {
+ description
+ "Defines how the RNC shall interpret the routing-metrics";
+ leaf composite-metric-versus-selective {
+ type boolean;
+ description
+ "Defines the way the RNC shall interpret the priorities defined
+ for the metrics: _ True corresponds to a weighted composite metric,
+ _ False corresponds to a selective priority based metric";
+ }
+ }
+ container regeneration-policy {
+ description
+ "Defines rules to place regenerators when a service-feasibility-check
+ rpc is invoked, or when a service-create rpc is invoked if spare
+ regenerators are already in place";
+ leaf global-placement {
+ type enumeration {
+ enum regenerator-banks {
+ value 1;
+ }
+ enum distributed {
+ value 2;
+ }
+ }
+ description
+ "To priviledge the positioning in specific locations";
+ }
+ leaf on-path-positioning {
+ type enumeration {
+ enum maximize-rate {
+ value 1;
+ }
+ enum latest-convenient-hop {
+ value 2;
+ }
+ }
+ description
+ "To position regenerators as far as possible on the path or optimizing
+ performances";
+ }
+ leaf path-symmetry {
+ type boolean;
+ description
+ "True corresponds to same location on A to Z and Z to A paths
+ False allows positioning regenerators in different nodes for A
+ to Z and Z to A paths";
+ }
+ leaf-list preferred-sites {
+ type string;
+ description
+ "CLLI's of the sites to be privileged when positioning regenerators
+ in specific locations";
+ }
+ }
+ container global-restriction {
+ container site-restriction {
+ leaf-list restriction-scopes {
+ description
+ "Set of the restriction scopes applicable for the site-restriction.
+ Default scope is set to all RPCs";
+ type restriction-scope;
+ default "all";
+ }
+ list site {
+ key "site-id";
+ description
+ "List of sites to be excluded from paths when routing.";
+ leaf site-id {
+ type string;
+ }
+ leaf restriction-type {
+ type restriction-type;
+ default "both";
+ }
+ }
+ }
+ container node-restriction {
+ leaf-list restriction-scopes {
+ description
+ "Set of the restriction scopes applicable for the node-restriction.
+ Default scope is set to all RPCs";
+ type restriction-scope;
+ default "all";
+ }
+ list node {
+ key "node-id";
+ description
+ "List of equipment nodes to be excluded from paths when routing.";
+ leaf node-id {
+ type org-openroadm-common-node-types:node-id-type;
+ }
+ leaf restriction-type {
+ type restriction-type;
+ default "both";
+ }
+ }
+ }
+ container regeneration-site-restriction {
+ leaf-list restriction-scopes {
+ description
+ "Set of the restriction scopes applicable for the regeneration-restriction.
+ Default scope is set to all RPCs";
+ type restriction-scope;
+ default "all";
+ }
+ list forbidden-site {
+ key "site-id";
+ description
+ "List of forbidden sites where regenerators shall not be placed";
+ leaf site-id {
+ type string;
+ }
+ leaf regeneration-restriction-type {
+ type regeneration-restriction-type;
+ default "both";
+ }
+ }
+ }
+ container regeneration-node-restriction {
+ leaf-list restriction-scopes {
+ description
+ "Set of the restriction scopes applicable for the regeneration-restriction.
+ Default scope is set to all RPCs";
+ type restriction-scope;
+ default "all";
+ }
+ list forbidden-node {
+ key "node-id";
+ description
+ "List of forbidden nodes where regenerators shall not be placed";
+ leaf node-id {
+ type org-openroadm-common-node-types:node-id-type;
+ }
+ leaf regeneration-restriction-type {
+ type regeneration-restriction-type;
+ default "both";
+ }
+ }
+ }
+ container link-restriction {
+ leaf-list restriction-scopes {
+ description
+ "Set of the resctriction scopes applicable for the link-restriction.
+ Default scope is set to all RPCs";
+ type restriction-scope;
+ default "all";
+ }
+ leaf-list link-id {
+ type string;
+ description
+ "List of links to be excluded from paths when routing.";
+ }
+ }
+ container supporting-service-restriction {
+ leaf-list restriction-scopes {
+ description
+ "Set of the resctriction scopes applicable for the supporting-services.
+ Default scope is set to all RPCs";
+ type restriction-scope;
+ default "all";
+ }
+ leaf-list supporting-services {
+ type string;
+ description
+ "List of supporting services to be excluded from paths when routing";
+ }
+ }
+ }
+ container default-behaviour {
+ description
+ "Parameters in this container are used to define default behaviour
+ in case optional parameters in rpc have not been defined";
+ leaf default-backup-path-number {
+ type uint16;
+ description
+ "0 means on the fly path calculation. Higher number corresponds
+ to backup path pre-calculation, and states the number of paths
+ to be calculated";
+ }
+ leaf reversion {
+ type boolean;
+ description
+ "Concerns reversion for service that have a resiliency defined
+ as restorable (restoration handled autonomously by the controller
+ at the WDM/OTN layer)";
+ }
+ leaf wait-to-restore {
+ type uint64;
+ units "ms";
+ description
+ "time delay to revert to initial path after conditions for reversion
+ are satisfied";
+ }
+ leaf holdoff-time {
+ type uint64;
+ units "ms";
+ description
+ "time delay to initiate a protection or restoration event";
+ }
+ }
+ container sla-definition {
+ description
+ "Definition of Service Level Agreements parameters";
+ list sla-parameters {
+ key "sla-id";
+ description
+ "Defines several SLA profiles and associated expected behaviour";
+ leaf sla-id {
+ type string;
+ description
+ "sla-id as defined by the operator";
+ }
+ leaf preemption {
+ type boolean;
+ description
+ "False : service shall never be preempted True : preemption of
+ the service is allowed";
+ }
+ leaf restoration-priority {
+ type uint8;
+ description
+ "The service shall be restored according to the defined priority
+ (First:1, latest:255). Services with highest priority will be restored first";
+ }
+ }
+ }
+ container failure-case-list {
+ description
+ "Use to provide information on failure cases associated with backup-path
+ pre-calculation: If PCE supports the calculation of multiple backup-paths,
+ these might be identified through a failure case-id corresponding
+ to a node, physical-link or logical-link failure";
+ list failure-case {
+ key "failure-case-id";
+ description
+ "Describes and identifies different failure-cases. Each of them can be
+ associated with one or several backup-paths in the context of backup-path
+ pre-calculation";
+ leaf failure-case-id {
+ type uint32;
+ description
+ "Identifies a failure case";
+ }
+ leaf failure-type {
+ type enumeration {
+ enum node-failure {
+ value 1;
+ }
+ enum logical-link-failure {
+ value 2;
+ }
+ enum physiscal-link-failure {
+ value 3;
+ }
+ }
+ description
+ "describes failure type that can be simulated in a planner or by a PCE
+ to calculate a backup path";
+ }
+ leaf-list nodes {
+ when "../failure-type = 'node-failure'" {
+ description
+ "List of nodes impacted by the failure (not only single failures
+ may be envisaged).";
+ }
+ type string;
+ description
+ "Nodes as they appear in the openroadm-topology or otn-topology
+ layer";
+ }
+ leaf-list logical-links {
+ when "../failure-type = 'logical-link-failure'" {
+ description
+ "List of logical links impacted by the failure (not only single
+ failures may be envisaged).";
+ }
+ type string;
+ description
+ "logical links as they appear in the otn-topology layer";
+ }
+ leaf-list physical-links {
+ when "../failure-type = 'physical-link-failure'" {
+ description
+ "List of physical links impacted by the failure (not only single
+ failures may be envisaged).";
+ }
+ type string;
+ description
+ "physical-links as they appear in the openroadm-topology layer";
+ }
+ }
+ }
+ }
+
+ rpc controller-parameters-setting {
+ description
+ "Rpc used to populate controller parameters in the Data Store
+ of the RNC.";
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ uses controller-parameters;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ leaf-list unsupported-customization-options {
+ type string;
+ description
+ "Provides a list of customization parameters that are not supported by
+ the RNC controller. Leaflist items corresponds to the yang nodes of
+ controller-parameters that the RNC does not handle. It is assumed that
+ for a yang node provided in the list, all nodes/leaves at a lower level
+ in the hierarchy are also not supported by the RNC";
+ }
+ }
+ }
+}
--- /dev/null
+module org-openroadm-operational-mode-catalog {
+ namespace "http://org/openroadm/operational-mode-catalog";
+ prefix org-openroadm-operational-mode-catalog;
+
+ import org-openroadm-common-optical-channel-types {
+ prefix org-openroadm-common-optical-channel-types;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-common-link-types {
+ prefix org-openroadm-common-link-types;
+ revision-date 2019-11-29;
+ }
+ import org-openroadm-common-types {
+ prefix org-openroadm-common-types;
+ revision-date 2021-12-10;
+ }
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of common attributes.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10";
+ }
+
+ typedef impairment-type {
+ type enumeration {
+ enum CD-ps/nm;
+ enum PDL-dB;
+ enum PMD-ps;
+ enum power-dBm;
+ enum cross-talk-total-power-dB;
+ enum colorless-drop-adjacent-channel-crosstalk-GHz;
+ }
+ description
+ "definition of impairment type and unit used in penaty list";
+ }
+
+ grouping operational-mode-grid-parameters {
+ description
+ "main parameters required to describe grid usage";
+ leaf min-central-frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ mandatory true;
+ description
+ "min supported frequency";
+ }
+ leaf max-central-frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ mandatory true;
+ description
+ "max supported frequency";
+ }
+ leaf central-frequency-granularity {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ mandatory true;
+ description
+ "granularity supported for the central frequency setting";
+ }
+ leaf min-spacing {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ mandatory true;
+ description
+ "minimum spacing required between 2 channels";
+ }
+ }
+
+ grouping operational-mode-roadm-base-parameters {
+ description
+ "main parameters used to qualify amplifier and ROADM (express/add/drop)";
+ leaf per-channel-Pin-min {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "minimum input power";
+ }
+ leaf per-channel-Pin-max {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "maximum output power";
+ }
+ leaf max-introduced-pdl {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "polarization dependent gain/loss";
+ }
+ leaf max-introduced-dgd {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units "ps/nm";
+ description
+ "Maximum diferential group delay";
+ }
+ leaf max-introduced-cd {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units "ps";
+ description
+ "Maximum introduced chromatic dispersion";
+ }
+ }
+
+ grouping polynomial-fit {
+ description
+ "polynomial fit used to model noise mask";
+ container osnr-polynomial-fit {
+ description
+ "describe the osnr contribution of amplifier/roadm
+ OSNR (dB/0.1nm) = A*Pin^3+B*Pin^2+C*Pin+D, Pin (dBm) ";
+ leaf A {
+ type decimal64 {
+ fraction-digits 8;
+ }
+ description
+ "A*Pin^3";
+ }
+ leaf B {
+ type decimal64 {
+ fraction-digits 8;
+ }
+ description
+ "B*Pin^2";
+ }
+ leaf C {
+ type decimal64 {
+ fraction-digits 8;
+ }
+ description
+ "C*Pin";
+ }
+ leaf D {
+ type decimal64 {
+ fraction-digits 8;
+ }
+ description
+ "Constant";
+ }
+ }
+ }
+
+ grouping power-mask {
+ description
+ "describes how power shall be set according preceeding span loss";
+ list mask-power-vs-pin {
+ key "lower-boundary upper-boundary";
+ description
+ "for power range provides C and D parameter : Pout[50GHz BW] (dBm) = C*span-loss (dBm)+ D";
+ leaf lower-boundary {
+ type uint32;
+ description
+ "defines the lower Power boundary for which C & Dparameters apply";
+ }
+ leaf upper-boundary {
+ type uint32;
+ description
+ "defines the upper Power boundary for which C & Dparameters apply";
+ }
+ leaf C {
+ type decimal64 {
+ fraction-digits 8;
+ }
+ description
+ "C*span-loss";
+ }
+ leaf D {
+ type decimal64 {
+ fraction-digits 8;
+ }
+ description
+ "Constant";
+ }
+ leaf fiber-type {
+ type enumeration {
+ enum smf {
+ value 0;
+ description
+ "Single Mode Fiber";
+ }
+ enum eleaf {
+ value 1;
+ description
+ "ELEAF";
+ }
+ enum oleaf {
+ value 2;
+ description
+ "OLEAF";
+ }
+ enum dsf {
+ value 3;
+ description
+ "DSF";
+ }
+ enum truewave {
+ value 4;
+ description
+ "TRUEWAVE Reduced Slope";
+ }
+ enum truewavec {
+ value 5;
+ description
+ "TRUEWAVE Classic";
+ }
+ enum nz-dsf {
+ value 6;
+ description
+ "NZ-DSF";
+ }
+ enum ull {
+ value 7;
+ description
+ "Ultra Low Loss (ULL)";
+ }
+ }
+ description
+ "enumeration of the different existing fiber type";
+ }
+ }
+ }
+
+ grouping operational-mode-roadm-add-parameters {
+ description
+ "includes parameters to be used for specification modeling";
+ container Add {
+ description
+ "add block-specification";
+ list add-openroadm-operational-mode {
+ key "openroadm-operational-mode-id";
+ description
+ "defines the openroadm operational mode pointing to an official specification ";
+ leaf openroadm-operational-mode-id {
+ type string;
+ description
+ "openroadm operational mode which points to a specific spreadsheet of optical specifications";
+ }
+ leaf incremental-osnr {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "incremental osnr considering noisless input at 0dBm";
+ }
+ uses operational-mode-roadm-base-parameters;
+ uses power-mask;
+ }
+ }
+ }
+
+ grouping operational-mode-common-amplifier-drop-parameters {
+ description
+ "includes parameters to be used for specification modeling";
+ list openroadm-operational-mode {
+ key "openroadm-operational-mode-id";
+ description
+ "defines the openroadm operational mode pointing to an official specification ";
+ leaf openroadm-operational-mode-id {
+ type string;
+ description
+ "openroadm operational mode which points to a specific spreadsheet of optical specifications";
+ }
+ uses operational-mode-roadm-base-parameters;
+ uses polynomial-fit;
+ leaf per-channel-Pout-min {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "Minimum output power";
+ }
+ leaf per-channel-Pout-max {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "Maximum output power";
+ }
+ }
+ }
+
+ grouping operational-mode-roadm-drop-parameters {
+ description
+ "includes parameters to be used for specification modeling";
+ container Drop {
+ description
+ "drop block-specification";
+ uses operational-mode-common-amplifier-drop-parameters;
+ }
+ }
+
+ grouping operational-mode-roadm-express-parameters {
+ description
+ "includes parameters to be used for specification modeling";
+ container Express {
+ description
+ "Express specifications";
+ list openroadm-operational-mode {
+ key "openroadm-operational-mode-id";
+ description
+ "defines the openroadm operational mode pointing to an official specification ";
+ leaf openroadm-operational-mode-id {
+ type string;
+ description
+ "openroadm operational mode which points to a specific spreadsheet of optical specifications";
+ }
+ uses operational-mode-roadm-base-parameters;
+ uses polynomial-fit;
+ uses power-mask;
+ }
+ }
+ }
+
+ grouping operational-mode-amplifier-parameters {
+ description
+ "includes parameters to be used for specification modeling";
+ container Amplifier {
+ description
+ "drop block-specification";
+ uses operational-mode-common-amplifier-drop-parameters;
+ leaf min-gain {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "minimum gain of nominal gain range";
+ }
+ leaf max-gain {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "maximum gain of nominal gain range";
+ }
+ leaf max-extended-gain {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "maximum gain of extended gain range";
+ }
+ list mask-gain-ripple-vs-tilt {
+ key "lower-boundary upper-boundary";
+ description
+ "for gain ripple, provides C and D parameter : Max-gain-ripple (dB) = C*target-tilt (dB)+ D.
+ Tilt applies to extended gain range";
+ leaf lower-boundary {
+ type int32;
+ description
+ "defines the lower tilt boundary for which C & Dparameters apply";
+ }
+ leaf upper-boundary {
+ type int32;
+ description
+ "defines the upper tilt boundary for which C & Dparameters apply";
+ }
+ leaf C {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ description
+ "C*span-loss";
+ }
+ leaf D {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ description
+ "Constant";
+ }
+ }
+ }
+ }
+
+ grouping operational-mode-transponder-parameters {
+ description
+ "describes parameters used to qualify xponders line performances";
+ leaf baud-rate {
+ type decimal64 {
+ fraction-digits 1;
+ }
+ units "Gbauds";
+ description
+ "baud-rate in Gbauds";
+ }
+ leaf line-rate {
+ type decimal64 {
+ fraction-digits 1;
+ }
+ units "Gbps";
+ mandatory true;
+ description
+ "line coding rate in Gbps";
+ }
+ leaf modulation-format {
+ type org-openroadm-common-optical-channel-types:modulation-format;
+ mandatory true;
+ description
+ "modulation format as defined in openroadm";
+ }
+ leaf min-TX-osnr {
+ type org-openroadm-common-link-types:ratio-dB;
+ mandatory true;
+ description
+ "Defined in 0.1 nm @ 193.6 Thz bandwidth";
+ }
+ list TX-OOB-osnr {
+ key "WR-openroadm-operational-mode-id";
+ description
+ "describe noise contribution associated with a specific transponder
+ according to the multiplexing architecture of the SRG it is connected to";
+ leaf WR-openroadm-operational-mode-id {
+ type string;
+ description
+ "openroadm operational mode of the multiplexor which the transponder is connected to";
+ }
+ leaf min-OOB-osnr-multi-channel-value {
+ type org-openroadm-common-link-types:ratio-dB;
+ mandatory true;
+ description
+ "Measured outside +/-150GHz BW, including SMSR, and 15 channels worst case contribution";
+ }
+ leaf min-OOB-osnr-single-channel-value {
+ type org-openroadm-common-link-types:ratio-dB;
+ mandatory true;
+ description
+ "Measured outside +/-150GHz BW, excluding SMSR, single channel";
+ }
+ }
+ list output-power-range {
+ key "WR-openroadm-operational-mode-id";
+ description
+ "describe output power range associated with a specific transponder
+ according to the multiplexing architecture of the SRG it is connected to";
+ leaf WR-openroadm-operational-mode-id {
+ type string;
+ description
+ "openroadm operational mode of the multiplexor which the transponder is connected to";
+ }
+ leaf min-output-power {
+ type org-openroadm-common-link-types:ratio-dB;
+ mandatory true;
+ description
+ "minimum supported output-power";
+ }
+ leaf max-output-power {
+ type org-openroadm-common-link-types:ratio-dB;
+ mandatory true;
+ description
+ "maximum supported output-power";
+ }
+ }
+ leaf min-RX-osnr-tolerance {
+ type org-openroadm-common-link-types:ratio-dB;
+ mandatory true;
+ description
+ "Defined in 0.1 nm @ 193.6 Thz bandwidth";
+ }
+ leaf min-input-power-at-RX-osnr {
+ type org-openroadm-common-link-types:ratio-dB;
+ mandatory true;
+ description
+ "minimum input-power for given osnr tolerance";
+ }
+ leaf max-input-power {
+ type org-openroadm-common-link-types:ratio-dB;
+ mandatory true;
+ description
+ "maximum supported intput-power causing either an overload or the damage of the receiver";
+ }
+ leaf channel-width {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ description
+ "-20 dB channel width, required for target power calculation";
+ }
+ leaf fec-type {
+ type identityref {
+ base org-openroadm-common-types:fec-identity;
+ }
+ description
+ "fec type";
+ }
+ leaf min-roll-off {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units "dB/decade";
+ description
+ "Minimum Roll-off factor";
+ }
+ leaf max-roll-off {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units "dB/decade";
+ description
+ "Maximum Roll-off factor";
+ }
+ list penalties {
+ key "parameter-and-unit up-to-boundary";
+ description
+ "Penalties includes contributions from different impairments including
+ cd, pmd, low RX Power, pdl,...";
+ leaf parameter-and-unit {
+ type impairment-type;
+ description
+ "impairment leading to the penalty";
+ }
+ leaf up-to-boundary {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ description
+ "defines the upper (for positive values) and lower (for negative values)
+ limit for which the penalty value is valid";
+ }
+ leaf penalty-value {
+ type org-openroadm-common-link-types:ratio-dB;
+ description
+ "defined penalty in dB";
+ }
+ }
+ }
+
+ grouping operational-mode-catalog {
+ description
+ "this catalog is used to store data related to operational modes and related specifications
+ for OpenROADM operational modes this allows translating official specifications
+ for other Operational modes this provides the controller with the specifications
+ of bookended/alien transponders
+ The catalog shall be fed using operational-mode-setting rpc";
+ container openroadm-operational-modes {
+ description
+ "All operational modes corresponding to official OpenROAM specifications";
+ container grid-parameters {
+ description
+ "Parameters associated with global spectrum use";
+ uses operational-mode-grid-parameters;
+ }
+ container xponders-pluggables {
+ presence "Container includes mandatory nodes but may however not be present
+ in the rpc used to feed the catalog (merge operation)";
+ description
+ "Parameters associated with xponders and pluggables";
+ list xponder-pluggable-openroadm-operational-mode {
+ key "openroadm-operational-mode-id";
+ description
+ "defines the openroadm operational mode pointing to an official specification ";
+ leaf openroadm-operational-mode-id {
+ type string;
+ description
+ "openroadm operational mode which points to a specific spreadsheet of optical specifications";
+ }
+ uses operational-mode-transponder-parameters;
+ }
+ }
+ container roadms {
+ description
+ "Parameters associated with roadms";
+ uses operational-mode-roadm-express-parameters;
+ uses operational-mode-roadm-add-parameters;
+ uses operational-mode-roadm-drop-parameters;
+ }
+ container amplifiers {
+ description
+ "Parameters associated with amplifiers";
+ uses operational-mode-amplifier-parameters;
+ }
+ }
+ container specific-operational-modes {
+ description
+ "All specific operational modes corresponding to bookended or alien units";
+ list specific-operational-mode {
+ key "operational-mode-id";
+ description
+ "List of all declared specific operationnal modes";
+ leaf operational-mode-id {
+ type string;
+ description
+ "unique identifier which identifies the operational mode";
+ }
+ leaf originator {
+ type string;
+ description
+ "identifies the system vendor which originated associated specification";
+ }
+ leaf sponsor {
+ type string;
+ description
+ "identifies the service provider which reviewed and sponsored associated specification";
+ }
+ uses operational-mode-grid-parameters;
+ uses operational-mode-transponder-parameters;
+ leaf configurable-output-power {
+ type boolean;
+ mandatory true;
+ description
+ "defines whether the output power can be set or not";
+ }
+ }
+ }
+ }
+}
module org-openroadm-routing-constraints {
- namespace "http://org/openroadm/routing/constrains";
+ namespace "http://org/openroadm/routing/constraints";
prefix org-openroadm-routing-constraints;
import org-openroadm-common-node-types {
prefix org-openroadm-common-node-types;
- revision-date 2018-11-30;
+ revision-date 2021-05-28;
}
import org-openroadm-network-resource {
prefix org-openroadm-network-resource;
- revision-date 2018-11-30;
+ revision-date 2019-11-29;
}
organization
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE";
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2020-12-11 {
+ description
+ "Version 8.1";
+ }
+ revision 2020-09-25 {
+ description
+ "Version 8.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
revision 2019-03-29 {
description
"Version 5.0.0";
leaf-list customer-code {
type string;
}
- choice co-routing-or-general {
- case general {
- container diversity {
- uses diversity-existing-service-constraints;
- }
- container exclude {
- uses common-constraints;
- leaf-list supporting-service-name {
- type string;
- description
- "Supporting service(s) to exclude from this route.";
- }
- }
- container include {
- uses common-constraints;
- leaf-list supporting-service-name {
- type string;
- description
- "Supporting service(s) to include in this route.";
- }
- }
- container latency {
- description
- "Maximum latency allowed";
- leaf max-latency {
- type uint32;
- units "ms";
- }
+ leaf-list operational-mode {
+ type string;
+ }
+ container diversity {
+ uses diversity-existing-service-constraints;
+ uses diversity-constraints;
+ description
+ "Diversity constraints for single or bulk requests.
+ diversity-constraints provides more options for bulk requests";
+ }
+ container exclude {
+ uses common-constraints;
+ leaf-list supporting-service-name {
+ type string;
+ description
+ "Supporting service(s) to exclude from this route.";
+ }
+ }
+ container include {
+ uses common-constraints;
+ leaf-list supporting-service-name {
+ type string;
+ description
+ "Supporting service(s) to include in this route.";
+ }
+ }
+ container latency {
+ description
+ "Maximum allowed one-way latency in milliseconds";
+ leaf max-latency {
+ type decimal64 {
+ fraction-digits 3;
}
+ units "milliseconds";
+ }
+ }
container hop-count {
- description
- "Maximum hops allowed";
- leaf max-wdm-hop-count {
- type uint8;
- }
+ description
+ "Maximum hops allowed";
+ leaf max-wdm-hop-count {
+ type uint8;
+ }
leaf max-otn-hop-count {
- type uint8;
- }
- }
+ type uint8;
+ }
+ }
container TE-metric {
- description
- "Maximum cost allowed";
- leaf max-wdm-TE-metric {
- type uint32;
- }
- leaf max-otn-TE-metric {
- type uint32;
- }
- }
+ description
+ "Maximum cost allowed";
+ leaf max-wdm-TE-metric {
+ type uint32;
+ }
+ leaf max-otn-TE-metric {
+ type uint32;
+ }
+ }
container distance {
- description
- "Maximum distance allowed";
- leaf max-distance {
- type decimal64 {
- fraction-digits 2;
- }
- units "km";
- }
+ description
+ "Maximum distance allowed";
+ leaf max-distance {
+ type decimal64 {
+ fraction-digits 2;
}
+ units "km";
}
- case co-routing {
- container co-routing {
- leaf-list existing-service {
- type string;
- description
- "Diverse from existing services identified by facility CLFI";
- }
+ }
+ container co-routing {
+ list service-identifier-list {
+ description
+ "Indicates that new services that are part of the bulk service request
+ should be co-routed";
+ key "service-identifier";
+ leaf service-identifier {
+ type string;
+ description
+ "This can be a service-name or a common-id";
}
+ uses service-applicability-g;
}
}
}
+
grouping common-constraints {
leaf-list fiber-bundle {
type string;
}
}
- grouping diversity-existing-service-constraints {
- leaf-list existing-service {
- type string;
+ grouping equipment{
+ container equipment {
+ leaf roadm-srg {
+ type boolean;
+ description "ROADM shared-risk-group diversity";
+ }
+ leaf xponder-srg {
+ type boolean;
+ description "xponder eqpt-srg-id diversity";
+ }
description
- "Diverse from existing services identified by facility CLFI";
+ "Equipment Diversity Contraints";
}
+ }
+
+ grouping existing-service-applicability-g {
container existing-service-applicability {
leaf site {
type boolean;
leaf link {
type boolean;
}
+ uses equipment;
+ }
+ }
+
+ grouping service-applicability-g {
+ container service-applicability {
+ leaf site {
+ type boolean;
+ }
+ leaf node {
+ type boolean;
+ }
+ leaf srlg {
+ type boolean;
+ }
+ leaf link {
+ type boolean;
+ }
+ uses equipment;
+ }
+ }
+
+ grouping diversity-existing-service-constraints {
+ list service-identifier-list {
+ description
+ "Indicates that new services that are part of the bulk service request
+ should be co-routed";
+ key "service-indentifier";
+ leaf service-indentifier {
+ type string;
+ description
+ "This can be a service-name or a common-id";
+ }
+ uses service-applicability-g;
+ }
+ /*
+ leaf-list existing-service {
+ type string;
+ description
+ "Diverse from existing services identified by facility CLFI";
+ }
+ uses existing-service-applicability-g;
+ */
+ }
+
+ grouping diversity-constraints {
+ leaf diversity-type {
+ type enumeration {
+ enum serial {
+ value 1;
+ description
+ "Indicates that new services that are part of the bulk service request
+ should be routed serially for diversity.";
+ }
+ enum synchronous {
+ value 2;
+ description
+ "Indicates that new services that are part of the bulk service request
+ should be routed synchronously for diversity.";
+ }
+ }
+ description
+ "This is only used when creating services using service-create-bulk.
+ It is expected that 'diversity-type' should be same for all services,
+ within the group. Which means it can be either 'serial' or 'synchronous'
+ but not both.";
}
}
}
+++ /dev/null
-module org-openroadm-service {
- namespace "http://org/openroadm/service";
- prefix org-openroadm-service;
-
- import ietf-yang-types {
- prefix yang;
- revision-date 2013-07-15;
- }
- import org-openroadm-routing-constraints {
- prefix org-openroadm-routing-constraints;
- revision-date 2019-03-29;
- }
- import org-openroadm-common-types {
- prefix org-openroadm-common-types;
- revision-date 2019-05-31;
- }
- import org-openroadm-resource-types {
- prefix org-openroadm-resource-types;
- revision-date 2018-11-30;
- }
- import org-openroadm-common-service-types {
- prefix org-openroadm-common-service-types;
- revision-date 2019-05-31;
- }
-
- organization
- "Open ROADM MSA";
- contact
- "OpenROADM.org";
- description
- "YANG definitions of services.
-
- Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
- All other rights reserved.
-
- Redistribution and use in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
- * Neither the Members of the Open ROADM MSA Agreement nor the names of its
- contributors may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE";
-
- revision 2019-05-31 {
- description
- "Version 5.1.0";
- }
- revision 2019-03-29 {
- description
- "Version 5.0.0";
- }
- revision 2018-11-30 {
- description
- "Version 4.1.0";
- }
- revision 2018-09-28 {
- description
- "Version 4.0.0";
- }
- revision 2018-05-30 {
- description
- "Version 3.1.0";
- }
- revision 2018-03-30 {
- description
- "Version 3.0.0";
- }
- revision 2017-12-15 {
- description
- "Version 2.2";
- }
- revision 2017-09-29 {
- description
- "Version 2.1";
- }
- revision 2017-07-28 {
- description
- "Version 2.0.1 - added revision-date to imports";
- }
- revision 2017-06-26 {
- description
- "Version 2.0";
- }
- revision 2016-10-14 {
- description
- "Version 1.2";
- }
-
- grouping service-feasibility-check-inputs {
- leaf connection-type {
- type org-openroadm-common-service-types:connection-type;
- }
- container service-a-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- container service-z-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- uses org-openroadm-routing-constraints:routing-constraints;
- uses org-openroadm-common-service-types:routing-metric;
- uses org-openroadm-common-service-types:service-resiliency;
- leaf propose-equipment {
- type enumeration {
- enum "never" {
- value 1;
- }
- enum "ifNeeded" {
- value 2;
- }
- enum "always" {
- value 3;
- }
- }
- default "ifNeeded";
- description
- "Whether or not this request can propose new equipment that could
- be used to fulfill this request. If never, the request will just
- use existing deployed and planned equipment. If ifNeeded, routes using existing equipment
- will be preferred. If always, a route with proposed equipment shall be returned, if possible";
- }
- uses org-openroadm-common-service-types:service-information;
- }
-
- grouping service-feasibility-check-outputs {
- uses org-openroadm-common-service-types:response-parameters;
- container service-a-end {
- uses org-openroadm-common-service-types:service-endpoint;
- list equipment-required {
- key "equipment-identifier";
- description
- "List of required equipment, including equipment type, state and
- quantity";
- uses org-openroadm-common-service-types:equipment-info;
- }
- }
- container service-z-end {
- uses org-openroadm-common-service-types:service-endpoint;
- list equipment-required {
- key "equipment-identifier";
- description
- "List of required equipment, including equipment type, state and
- quantity";
- uses org-openroadm-common-service-types:equipment-info;
- }
- }
- list intermediate-sites {
- key "clli";
- uses org-openroadm-common-service-types:service-endpoint;
- list equipment-required {
- key "equipment-identifier";
- description
- "List of required equipment, including equipment type, state and
- quantity over entire route of service";
- uses org-openroadm-common-service-types:equipment-info;
- }
- }
- }
-
- rpc service-create {
- description
- "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
- service-rpc-result Notification shall be sent.";
- input {
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be created in
- the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
- }
- leaf common-id {
- type string;
- description
- "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
- }
- uses org-openroadm-common-service-types:sdnc-request-header;
- uses org-openroadm-common-service-types:routing-metric;
- uses org-openroadm-common-service-types:service-resiliency;
- leaf connection-type {
- type org-openroadm-common-service-types:connection-type;
- mandatory true;
- }
- container service-a-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- container service-z-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- uses org-openroadm-routing-constraints:routing-constraints;
- uses org-openroadm-common-service-types:service-information;
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- uses org-openroadm-common-service-types:response-parameters;
- }
- }
- rpc service-create-result-notification-request {
- description
- "This is the callback notification that the controller invokes on the carrier system.";
- input {
- uses org-openroadm-common-service-types:configuration-response-common;
- uses org-openroadm-common-service-types:service-identifiers-container;
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- }
- }
- rpc service-create-complex-result-notification-request {
- description
- "This is the callback notification that the controller invokes on the carrier system.";
- input {
- uses org-openroadm-common-service-types:configuration-response-common;
- uses org-openroadm-common-service-types:service-and-supporting-services;
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- }
- }
- rpc service-delete-result-notification-request {
- description
- "This is the callback notification that the controller invokes on the carrier system.";
- input {
- uses org-openroadm-common-service-types:configuration-response-common;
- uses org-openroadm-common-service-types:service-identifiers-container;
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- }
- }
- rpc service-delete-complex-result-notification-request {
- description
- "This is the callback notification that the controller invokes on the carrier system.";
- input {
- uses org-openroadm-common-service-types:configuration-response-common;
- uses org-openroadm-common-service-types:service-and-supporting-services;
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- }
- }
- rpc service-feasibility-check {
- description
- "Whether a service was possible to be created, and if so
- the routing constraints match and the a and z end connection that have
- to match
- Takes a potential service and determines if it is possible in the network
- using equipment that is installed on the network, formally planned or proposed for planning.
- No resources are reserved, provisioned or planned as a result of this operation";
- input {
- leaf common-id {
- type string;
- mandatory true;
- description
- "To be used by the ROADM controller to identify the routing constraints
- received from planning application (PED).";
- }
- uses org-openroadm-common-service-types:sdnc-request-header;
- uses service-feasibility-check-inputs;
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- uses service-feasibility-check-outputs;
- }
- }
- rpc service-feasibility-check-bulk {
- description
- "Whether a service was possible to be created, and if so
- the routing constraints match and the a and z end connection that have
- to match
-
- Takes a list of potential services and determines if they are possible in the network
- using equipment that is installed on the network, formally planned or proposed for planning.
- All services are treated collectively to ensure that a given resource is not used more than once.
- No resources are reserved, provisioned or planned as a result of this operation";
- input {
- uses org-openroadm-common-service-types:sdnc-request-header;
- list service-request-list {
- leaf common-id {
- type string;
- mandatory true;
- description
- "To be used by the ROADM controller to identify the routing constraints
- received from planning application (PED).";
- }
- uses service-feasibility-check-inputs;
- }
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- list service-response-list {
- uses service-feasibility-check-outputs;
- }
- }
- }
- rpc service-delete {
- description
- "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
- service-rpc-result Notification shall be sent. Once the service has been deleted, it no longer will appear in the service list";
- input {
- uses org-openroadm-common-service-types:sdnc-request-header;
- container service-delete-req-info {
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be deleted in
- the ROADM network, e.g., CLFI, CLCI, etc.";
- }
- leaf due-date {
- type yang:date-and-time;
- description
- "date and time service to be turned down. If missing, now.";
- }
- leaf tail-retention {
- type enumeration {
- enum "yes" {
- value 1;
- description
- "tails are left intact ";
- }
- enum "no" {
- value 2;
- description
- "tails are deleted";
- }
- }
- mandatory true;
- }
- }
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- }
- }
- rpc equipment-notification {
- input {
- uses org-openroadm-common-service-types:sdnc-request-header;
- leaf equipment-id {
- type string;
- mandatory true;
- }
- leaf equipment-name {
- type string;
- }
- leaf equipment-type {
- type string;
- mandatory true;
- description
- "The set of valid value is derived from the equipment-type grouping used in the device model.";
- }
- leaf equipment-vendor {
- type string;
- mandatory true;
- }
- leaf equipment-customer {
- type string;
- }
- leaf equipment-clli {
- type string;
- mandatory true;
- }
- leaf equipment-ip {
- type string;
- }
- leaf controller-id {
- type string;
- mandatory true;
- }
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- }
- }
- rpc temp-service-create {
- input {
- leaf common-id {
- type string;
- mandatory true;
- description
- "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
- }
- uses org-openroadm-common-service-types:sdnc-request-header;
- leaf connection-type {
- type org-openroadm-common-service-types:connection-type;
- mandatory true;
- }
- container service-a-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- container service-z-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- uses org-openroadm-routing-constraints:routing-constraints;
- uses org-openroadm-common-service-types:service-information;
- uses org-openroadm-common-service-types:routing-metric;
- uses org-openroadm-common-service-types:service-resiliency;
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- uses org-openroadm-common-service-types:response-parameters;
- }
- }
- rpc temp-service-delete {
- input {
- leaf common-id {
- type string;
- mandatory true;
- }
- }
- output {
- uses org-openroadm-common-service-types:configuration-response-common;
- }
- }
- rpc service-roll {
- description
- "This rpc can be use to roll a service according to 2 possible options :
- A new path may (no path pre-calculation) or may not be calculated according
- to the parameters provided (which includes metrics). If path computation has been triggered
- and is successful, a new path is provided, and the service can be rolled according to that path.";
- input {
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be rolled in
- the ROADM network, e.g., CLFI, CLCI, etc.";
- }
- leaf due-date {
- type yang:date-and-time;
- description
- "date and time service to be rolled";
- }
- uses org-openroadm-common-service-types:routing-metric;
- }
- output {
- uses org-openroadm-common-types:rpc-response-status;
- }
- }
- rpc service-reconfigure {
- description
- "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
- service-rpc-result Notification shall be sent.";
- input {
- leaf service-name {
- type string;
- mandatory true;
- description
- "Existing identifier for the service to be
- reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
- }
- leaf new-service-name {
- type string;
- description
- "New identifier for the service to be
- reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
- }
- leaf common-id {
- type string;
- description
- "To be used by the ROADM controller to identify the routing
- constraints received from planning application (PED).";
- }
- leaf connection-type {
- type org-openroadm-common-service-types:connection-type;
- }
- container service-a-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- container service-z-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- uses org-openroadm-routing-constraints:routing-constraints;
- uses org-openroadm-common-service-types:service-information;
- uses org-openroadm-common-service-types:routing-metric;
- uses org-openroadm-common-service-types:service-resiliency;
- }
- output {
- uses org-openroadm-common-types:rpc-response-status;
- }
- }
- rpc service-restoration {
- description
- "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
- service-rpc-result Notification shall be sent.
- This rpc can be use to reroute a service according to 2 possible options :
- \t_Option1 : neither the backup-path-id nor the failure-case-id are provided, a new path shall be
- calculated according to the parameters provided (which includes metrics). If path computation
- is successful, a new path is provided, and the service is rerouted according to that path.
- \t_Option2 : if a backup-path-id or a failure-case-id are provided, the service shall
- be rerouted according to the corresponding path. If path computation is triggered and successful,
- a new path is provided, and the service is rerouted according to that path.";
- input {
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be restored in
- the ROADM network, e.g., CLFI, CLCI, etc.";
- }
- leaf option {
- type enumeration {
- enum "permanent" {
- value 1;
- description
- "A spare regen can be used to restore the
- service permanently without reverting back to the
- original regen";
- }
- enum "temporary" {
- value 2;
- description
- "a spare regen can be used to restore the
- service temporarily. The service needs to be reverted
- back to the original regen transponder";
- }
- }
- mandatory true;
- }
- leaf backup-path-id {
- type uint8 {
- range "1..255";
- }
- description
- "When present, states that the service shall be rerouted according to a specific backup path";
- }
- leaf failure-case-id {
- type string;
- description
- "When present, states that the service shall be rerouted according to a specific backup path.
- This last corresponds to the provided failure case id";
- }
- uses org-openroadm-common-service-types:routing-metric;
- }
- output {
- uses org-openroadm-common-types:rpc-response-status;
- }
- }
- rpc service-reversion {
- description
- "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
- service-rpc-result Notification shall be sent.";
- input {
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be reverted
- in the ROADM network, e.g., CLFI, CLCI, etc. ";
- }
- leaf due-date {
- type yang:date-and-time;
- description
- "date and time service to be reverted";
- }
- }
- output {
- uses org-openroadm-common-types:rpc-response-status;
- }
- }
- rpc service-reroute {
- description
- "Whether this request was validated and processed correctly. If successful, it returns the proposed new route.
- If acceptable, this request should be followed by a service-reroute-confirm to complete the reroute operation.";
- input {
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be re-routed in
- the ROADM network, e.g., CLFI, CLCI, etc.";
- }
- uses org-openroadm-common-service-types:routing-metric;
- uses org-openroadm-common-service-types:service-resiliency;
- }
- output {
- uses org-openroadm-common-types:rpc-response-status;
- uses org-openroadm-routing-constraints:routing-constraints;
- }
- }
- rpc service-reroute-confirm {
- description
- "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
- service-rpc-result Notification shall be sent.";
- input {
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be re-routed in
- the ROADM network, e.g., CLFI, CLCI, etc.";
- }
- uses org-openroadm-routing-constraints:routing-constraints;
- }
- output {
- uses org-openroadm-common-types:rpc-response-status;
- }
- }
- rpc network-re-optimization {
- input {
- leaf service-name {
- type string;
- description
- "Identifier for the service in the ROADM network,
- e.g., CLFI, CLCI, etc. whose path is to be checked by the RNC
- for re-optimization";
- }
- leaf a-end {
- type string;
- description
- "Services whose A-ends are terminated at the
- specified office location are to be checked by the RNC for
- re-optimization";
- }
- leaf z-end {
- type string;
- description
- "Services whose Z-ends are terminated at the
- specified office location are to be checked by the RNC for
- re-optimization ";
- }
- leaf pass-through {
- type string;
- description
- "Services that are pass-through (either via
- regen or express) at the specified office location are to
- be checked by the RNC for re-optimization";
- }
- leaf customer-code {
- type string;
- description
- "Services that belong to the specified customer
- are to be checked by the RNC for re-optimization ";
- }
- uses org-openroadm-common-service-types:routing-metric;
- }
- output {
- uses org-openroadm-common-types:rpc-response-status;
- leaf optimization-candidate {
- type string;
- }
- }
- }
- notification service-rpc-result {
- description
- "This Notification indicates result of service RPC";
- leaf notification-type {
- type org-openroadm-common-service-types:service-notification-types;
- }
- uses org-openroadm-common-types:rpc-response-status;
- uses org-openroadm-common-service-types:service-notification-result;
- }
- notification service-traffic-flow {
- description
- "This Notification indicates that traffic is flowing again on the service after an administrative action has completed";
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service being reported on";
- }
- leaf version-number {
- type uint64;
- description
- "Identifier for the versioned service";
- }
- leaf actual-date {
- type yang:date-and-time;
- description
- "Actual date and time traffic started flowing";
- }
- }
- notification service-notification {
- description
- "This Notification that a service has been added, modified or removed.
- A resourceCreation notification shall contain the created service in its entirety.
- A resourceModified notification shall contain just the modified field, plus the service identifier
- A resourceDeleted notification shall just contain the service identifier";
- leaf notificationType {
- type org-openroadm-resource-types:resource-notification-type;
- description
- "Whether this notification indicates a service creation, service modification or service deletion.";
- }
- leaf version-number {
- type uint64;
- description
- "Identifier for the versioned service";
- }
- uses org-openroadm-common-service-types:service;
- }
- container service-list {
- description
- "List of service. Can only be created, deleted, modified, etc. using special RPCs. Will only contain one service with a given name.
- Does not contain historical (deleted or rather those passed their end time) or draft services. If two services exist with the same
- name (with non-lapping start-end times for example), this table will contain the current one. If only planned services exist for
- the name, the one with the earliest start time will be present
- ";
- list services {
- key "service-name";
- uses org-openroadm-common-service-types:service;
- }
- }
- container versioned-service-list {
- description
- "List of service, regardless of lifecycle state. Can only be created, deleted, modified, etc. using special RPCs. Can report more than one
- version of a service, if supported by the implementation. May contain deleted services, multiple versions of the same service, as identified
- by its name, etc.";
- list services {
- key "service-name version-number";
- leaf version-number {
- type uint64;
- }
- uses org-openroadm-common-service-types:service;
- }
- }
- container temp-service-list {
- description
- "List of temporary services Can only be created, deleted, modified, etc. using special RPCs.";
- list services {
- key "common-id";
- uses org-openroadm-common-service-types:service {
- refine "service-name" {
- mandatory false;
- }
- }
- }
- }
-}
--- /dev/null
+module org-openroadm-service {
+ yang-version 1.1;
+ namespace "http://org/openroadm/service";
+ prefix org-openroadm-service;
+
+ import ietf-yang-types {
+ prefix yang;
+ revision-date 2013-07-15;
+ }
+ import org-openroadm-routing-constraints {
+ prefix org-openroadm-routing-constraints;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-common-types {
+ prefix org-openroadm-common-types;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-resource-types {
+ prefix org-openroadm-resource-types;
+ revision-date 2021-09-24;
+ }
+ import org-openroadm-resource {
+ prefix org-openroadm-resource;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-common-service-types {
+ prefix org-openroadm-common-service-types;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-controller-customization {
+ prefix org-openroadm-controller-customization;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-topology {
+ prefix org-openroadm-topology;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-operational-mode-catalog {
+ prefix org-openroadm-operational-mode-catalog;
+ revision-date 2021-12-10;
+ }
+ import org-openroadm-common-optical-channel-types {
+ prefix org-openroadm-common-optical-channel-types;
+ revision-date 2021-12-10;
+ }
+
+ organization
+ "Open ROADM MSA";
+ contact
+ "OpenROADM.org";
+ description
+ "YANG definitions of services.
+
+ Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+ All other rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+ contributors may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE";
+
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2021-03-26 {
+ description
+ "Version 9.0";
+ }
+ revision 2020-12-11 {
+ description
+ "Version 8.1";
+ }
+ revision 2020-09-25 {
+ description
+ "Version 8.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2019-09-27 {
+ description
+ "Version 6.0.0";
+ }
+ revision 2019-05-31 {
+ description
+ "Version 5.1.0";
+ }
+ revision 2019-03-29 {
+ description
+ "Version 5.0.0";
+ }
+ revision 2018-11-30 {
+ description
+ "Version 4.1.0";
+ }
+ revision 2018-09-28 {
+ description
+ "Version 4.0.0";
+ }
+ revision 2018-05-30 {
+ description
+ "Version 3.1.0";
+ }
+ revision 2018-03-30 {
+ description
+ "Version 3.0.0";
+ }
+ revision 2017-12-15 {
+ description
+ "Version 2.2";
+ }
+ revision 2017-09-29 {
+ description
+ "Version 2.1";
+ }
+ revision 2017-07-28 {
+ description
+ "Version 2.0.1 - added revision-date to imports";
+ }
+ revision 2017-06-26 {
+ description
+ "Version 2.0";
+ }
+ revision 2016-10-14 {
+ description
+ "Version 1.2";
+ }
+
+ grouping proposed-equipment-g {
+ leaf propose-equipment {
+ type enumeration {
+ enum never {
+ value 1;
+ }
+ enum ifNeeded {
+ value 2;
+ }
+ enum always {
+ value 3;
+ }
+ }
+ default "ifNeeded";
+ description
+ "Whether or not this request can propose new equipment that could
+ be used to fulfill this request. If never, the request will just
+ use existing deployed and planned equipment. If ifNeeded, routes using existing equipment
+ will be preferred. If always, a route with proposed equipment shall be returned, if possible";
+ }
+ }
+
+ grouping service-feasibility-check-inputs {
+ leaf connection-type {
+ type org-openroadm-common-service-types:connection-type;
+ }
+ uses org-openroadm-common-service-types:resource-status;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ uses proposed-equipment-g;
+ container service-a-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ container requesting-interface-properties {
+ when "../../connection-type = 'optical-tunnel'" {
+ description
+ "an optical-tunnel service creation request triggers a container
+ that includes the description of the characteristics of the
+ external optical transceiver handled by a 3rd party controller";
+ }
+ uses org-openroadm-common-service-types:external-interface-characteristics;
+ }
+ }
+ container service-z-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ container requesting-interface-properties {
+ when "../../connection-type = 'optical-tunnel'" {
+ description
+ "an optical-tunnel service creation request triggers a container
+ that includes the description of the characteristics of the
+ external optical transceiver handled by a 3rd party controller";
+ }
+ uses org-openroadm-common-service-types:external-interface-characteristics;
+ }
+ }
+ uses org-openroadm-routing-constraints:routing-constraints;
+ uses org-openroadm-common-service-types:service-information;
+ uses org-openroadm-common-service-types:max-regeneration-options;
+ uses org-openroadm-common-service-types:existing-service-grouping {
+ refine "existing-service-attributes/reusable-existing-resources" {
+ default "all";
+ }
+ }
+ }
+
+ grouping service-feasibility-check-outputs {
+ leaf connection-type {
+ type org-openroadm-common-service-types:connection-type;
+ }
+ uses org-openroadm-common-service-types:resource-status;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ uses proposed-equipment-g;
+ uses org-openroadm-common-service-types:service-information;
+ container service-a-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ list equipment-required {
+ key "equipment-identifier";
+ description
+ "List of required equipment, including equipment type, state and
+ quantity";
+ uses org-openroadm-common-service-types:equipment-info;
+ }
+ container expected-settings-and-performances {
+ when "(../../connection-type = 'optical-tunnel' or ../../connection-type = 'infrastructure')" {
+ description
+ "Performances and settings are provided for wavelength services
+ whether they are based on end to end services or optical-tunnels";
+ }
+ uses org-openroadm-resource:common-och-otsi-attributes;
+ uses org-openroadm-resource:path-computation-outputs;
+ }
+ }
+ container service-z-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ list equipment-required {
+ key "equipment-identifier";
+ description
+ "List of required equipment, including equipment type, state and
+ quantity";
+ uses org-openroadm-common-service-types:equipment-info;
+ }
+ container expected-settings-and-performances {
+ when "(../../connection-type = 'optical-tunnel' or ../../connection-type = 'infrastructure')" {
+ description
+ "Performances and settings are provided for wavelength services
+ whether they are based on end to end services or optical-tunnels";
+ }
+ uses org-openroadm-resource:common-och-otsi-attributes;
+ uses org-openroadm-resource:path-computation-outputs;
+ }
+ }
+ uses org-openroadm-common-service-types:intermediate-site-container;
+ container requested-service-topology {
+ description
+ "This corresponds to the topology of the service requested. Includes all the
+ containers: topology, backup topology, network topology, and
+ network backup-topology";
+ container topology {
+ description
+ "topology corresponds to working-path which is the default path. It defines the initial path
+ to which services defined as revertive may revert to when the failure condition disappear";
+ uses org-openroadm-topology:topology;
+ }
+ container backup-topology {
+ list backup-path {
+ key "backup-path-id";
+ leaf backup-path-id {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Several backup paths may be used when backup-paths are pre-calculated.
+ Backup-path-id avoids 0 which is associated with working path in current-active-path";
+ }
+ leaf failure-case-id {
+ type string;
+ description
+ "A failure case Id can be used to associate a backup-path to a specific failure (srlg, OMS,...)";
+ }
+ uses org-openroadm-topology:topology;
+ }
+ }
+ container network-topology {
+ uses org-openroadm-topology:network-topology;
+ }
+ container network-backup-topology {
+ list backup-path {
+ key "backup-path-id";
+ leaf backup-path-id {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Several backup paths may be used when backup-paths are pre-calculated.
+ Backup-path-id avoids 0 which is associated with working path in current-active-path";
+ }
+ leaf failure-case-id {
+ type string;
+ description
+ "A failure case Id can be used to associate a backup-path to a specific failure (srlg, OMS,...)";
+ }
+ uses org-openroadm-topology:network-topology;
+ }
+ }
+ }
+ list supporting-service-hierarchy {
+ key "service-identifier";
+ description
+ "This lists all the supporting services and their respective hierarchy, includes the
+ proposed one";
+ uses org-openroadm-common-service-types:service-hierarchy;
+ }
+ uses service-path-metrics;
+ uses org-openroadm-common-service-types:max-regeneration-options;
+ uses org-openroadm-common-service-types:regeneration-option-list;
+ uses org-openroadm-common-service-types:existing-service-grouping {
+ refine "existing-service-attributes/reusable-existing-resources" {
+ default "all";
+ }
+ }
+ }
+
+ grouping service-path-metrics {
+ container primary-path-metrics {
+ description
+ "These service metrics are associated with primary
+ service path";
+ uses service-metrics;
+ }
+ list backup-path-metrics {
+ key "backup-path-id";
+ description
+ "These service metrics are associated with the backup
+ service path";
+ leaf backup-path-id {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Unique identifier for the backup service path";
+ }
+ uses service-metrics;
+ }
+ }
+
+ grouping service-metrics {
+ container service-metrics {
+ description
+ "All the metrics associated with end-to-end service feasibility
+ This container will have all the metrics that have'max' contraint in
+ org-openroadm-routing-constraints";
+ leaf latency {
+ description
+ "Provides one-way end-to-end latency (in milliseconds) of a service-path;
+ It can be measured or estimated";
+ type decimal64 {
+ fraction-digits 3;
+ }
+ units "milliseconds";
+ }
+ leaf distance {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units "km";
+ description
+ "Provides end-to-end distance of a service-path";
+ }
+ container hop-count {
+ description
+ "Maximum hops allowed";
+ leaf wdm-hop-count {
+ type uint8;
+ }
+ leaf otn-hop-count {
+ type uint8;
+ }
+ }
+ container TE-metric {
+ description
+ "Maximum cost allowed";
+ leaf wdm-TE-metric {
+ type uint32;
+ }
+ leaf otn-TE-metric {
+ type uint32;
+ }
+ }
+ }
+ }
+
+ rpc service-create {
+ description
+ "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+ service-rpc-result Notification shall be sent.";
+ input {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service to be created in
+ the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
+ }
+ leaf common-id {
+ type string;
+ description
+ "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:service-order;
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ leaf connection-type {
+ type org-openroadm-common-service-types:connection-type;
+ mandatory true;
+ }
+ uses org-openroadm-common-service-types:resource-status;
+ container service-a-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ }
+ container service-z-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ }
+ uses org-openroadm-routing-constraints:routing-constraints;
+ uses org-openroadm-common-service-types:service-information;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:response-parameters;
+ }
+ }
+
+ rpc service-create-bulk {
+ description
+ "Whether this request passed initial validation and was accepted for processing.
+ Once the request completes processing, a service-rpc-result Notification shall be
+ sent. This is 'all' or 'nothing' operation, which means that either all services
+ are created or none of them will be created.";
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ list service-request-list {
+ key "service-name";
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service to be created in
+ the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
+ }
+ leaf common-id {
+ type string;
+ description
+ "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:service-order;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ leaf connection-type {
+ type org-openroadm-common-service-types:connection-type;
+ mandatory true;
+ }
+ uses org-openroadm-common-service-types:resource-status;
+ container service-a-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ }
+ container service-z-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ }
+ uses org-openroadm-routing-constraints:routing-constraints;
+ uses org-openroadm-common-service-types:service-information;
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ list service-response-list {
+ key "service-name";
+ leaf service-name {
+ type string;
+ mandatory true;
+ }
+ uses org-openroadm-common-service-types:response-parameters;
+ }
+ }
+ }
+
+ rpc temp-service-create-bulk {
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ list service-request-list {
+ key "common-id";
+ leaf common-id {
+ type string;
+ mandatory true;
+ description
+ "To be used by the ROADM controller to identify the routing constraints
+ received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:service-order;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ leaf connection-type {
+ type org-openroadm-common-service-types:connection-type;
+ mandatory true;
+ }
+ uses org-openroadm-common-service-types:resource-status;
+ container service-a-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ }
+ container service-z-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ }
+ uses org-openroadm-routing-constraints:routing-constraints;
+ uses org-openroadm-common-service-types:service-information;
+ uses org-openroadm-common-service-types:existing-service-grouping {
+ refine "existing-service-attributes/reusable-existing-resources" {
+ default "all";
+ }
+ }
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ list service-response-list {
+ key "common-id";
+ leaf common-id {
+ type string;
+ mandatory true;
+ }
+ uses org-openroadm-common-service-types:response-parameters;
+ uses org-openroadm-common-service-types:existing-service-grouping {
+ refine "existing-service-attributes/reusable-existing-resources" {
+ default "all";
+ }
+ }
+ }
+ }
+ }
+
+ rpc service-create-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-identifiers-container;
+ uses service-path-metrics;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-create-complex-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-and-supporting-services;
+ uses service-path-metrics;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-delete-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-identifiers-container;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-delete-complex-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-and-supporting-services;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-feasibility-check {
+ description
+ "Whether a service was possible to be created, and if so
+ the routing constraints match and the a and z end connection that have
+ to match
+ Takes a potential service and determines if it is possible in the network
+ using equipment that is installed on the network, formally planned or proposed for planning.
+ No resources are reserved, provisioned or planned as a result of this operation";
+ input {
+ leaf common-id {
+ type string;
+ mandatory true;
+ description
+ "To be used by the ROADM controller to identify the routing constraints
+ received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ uses service-feasibility-check-inputs;
+ }
+ output {
+ leaf common-id {
+ type string;
+ mandatory true;
+ description
+ "To be used by the ROADM controller to identify the routing constraints
+ received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:response-parameters;
+ uses service-feasibility-check-outputs;
+ }
+ }
+
+ rpc service-feasibility-check-bulk {
+ description
+ "Whether a service was possible to be created, and if so
+ the routing constraints match and the a and z end connection that have
+ to match
+
+ Takes a list of potential services and determines if they are possible in the network
+ using equipment that is installed on the network, formally planned or proposed for planning.
+ All services are treated collectively to ensure that a given resource is not used more than once.
+ No resources are reserved, provisioned or planned as a result of this operation";
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ list service-request-list {
+ key "common-id";
+ leaf common-id {
+ type string;
+ mandatory true;
+ description
+ "To be used by the ROADM controller to identify the routing constraints
+ received from planning application (PED).";
+ }
+ uses service-feasibility-check-inputs;
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ list service-response-list {
+ key "common-id";
+ leaf common-id {
+ type string;
+ mandatory true;
+ description
+ "To be used by the ROADM controller to identify the routing constraints
+ received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:response-parameters;
+ uses service-feasibility-check-outputs;
+ }
+ }
+ }
+
+ rpc service-delete {
+ description
+ "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+ service-rpc-result Notification shall be sent. Once the service has been deleted, it no longer will appear in the service list";
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ container service-delete-req-info {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service to be deleted in
+ the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ leaf due-date {
+ type yang:date-and-time;
+ description
+ "date and time service to be turned down. If missing, now.";
+ }
+ leaf tail-retention {
+ type enumeration {
+ enum yes {
+ value 1;
+ description
+ "tails are left intact ";
+ }
+ enum no {
+ value 2;
+ description
+ "tails are deleted";
+ }
+ }
+ mandatory true;
+ }
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc equipment-notification {
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ leaf equipment-id {
+ type string;
+ mandatory true;
+ }
+ leaf equipment-name {
+ type string;
+ }
+ leaf equipment-type {
+ type string;
+ mandatory true;
+ description
+ "The set of valid value is derived from the equipment-type grouping used in the device model.";
+ }
+ leaf equipment-vendor {
+ type string;
+ mandatory true;
+ }
+ leaf equipment-customer {
+ type string;
+ }
+ leaf equipment-clli {
+ type string;
+ mandatory true;
+ }
+ leaf equipment-ip {
+ type string;
+ }
+ leaf controller-id {
+ type string;
+ mandatory true;
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc temp-service-create {
+ input {
+ leaf common-id {
+ type string;
+ mandatory true;
+ description
+ "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:service-order;
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ leaf connection-type {
+ type org-openroadm-common-service-types:connection-type;
+ mandatory true;
+ }
+ uses org-openroadm-common-service-types:resource-status;
+ container service-a-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ container requesting-interface-properties {
+ when "../../connection-type = 'optical-tunnel'" {
+ description
+ "an optical-tunnel service creation request triggers a container
+ that includes the description of the characteristics of the
+ external optical transceiver handled by a 3rd party controller";
+ }
+ uses org-openroadm-common-service-types:external-interface-characteristics;
+ }
+ }
+ container service-z-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ container requesting-interface-properties {
+ when "../../connection-type = 'optical-tunnel'" {
+ description
+ "an optical-tunnel service creation request triggers a container
+ that includes the description of the characteristics of the
+ external optical transceiver handled by a 3rd party controller";
+ }
+ uses org-openroadm-common-service-types:external-interface-characteristics;
+ }
+ }
+ uses org-openroadm-routing-constraints:routing-constraints;
+ uses org-openroadm-common-service-types:service-information;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ uses org-openroadm-common-service-types:existing-service-grouping {
+ refine "existing-service-attributes/reusable-existing-resources" {
+ default "all";
+ }
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:response-parameters;
+ uses org-openroadm-common-service-types:existing-service-grouping {
+ refine "existing-service-attributes/reusable-existing-resources" {
+ default "all";
+ }
+ }
+ }
+ }
+
+ rpc temp-service-delete {
+ input {
+ leaf common-id {
+ type string;
+ mandatory true;
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-roll {
+ description
+ "This rpc can be use to roll a service according to 2 possible options :
+ A new path may (no path pre-calculation) or may not be calculated according
+ to the parameters provided (which includes metrics). If path computation has been triggered
+ and is successful, a new path is provided, and the service can be rolled according to that path.";
+ input {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service to be rolled in
+ the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ leaf due-date {
+ type yang:date-and-time;
+ description
+ "date and time service to be rolled";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ uses org-openroadm-common-service-types:routing-metric;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-roll-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-identifiers-container;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-reconfigure {
+ description
+ "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+ service-rpc-result Notification shall be sent.";
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Existing identifier for the service to be
+ reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ leaf new-service-name {
+ type string;
+ description
+ "New identifier for the service to be
+ reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ leaf data-reload {
+ type boolean;
+ description
+ "Indicates whether the data of existing service needs to be refreshed or
+ reloaded. No reprovisioning/reconfiguration should be done to the service,
+ only data is updated. May generate data conflict to existing service
+ after reload. If set true, the data of existing service will be refreshed";
+ }
+ leaf common-id {
+ type string;
+ description
+ "To be used by the ROADM controller to identify the routing
+ constraints received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:service-order;
+ leaf connection-type {
+ type org-openroadm-common-service-types:connection-type;
+ }
+ uses org-openroadm-common-service-types:resource-status;
+ container service-a-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ container requesting-interface-properties {
+ when "../../connection-type = 'optical-tunnel'" {
+ description
+ "an optical-tunnel service creation request triggers a container
+ that includes the description of the characteristics of the
+ external optical transceiver handled by a 3rd party controller";
+ }
+ uses org-openroadm-common-service-types:external-interface-characteristics;
+ }
+ }
+ container service-z-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ container requesting-interface-properties {
+ when "../../connection-type = 'optical-tunnel'" {
+ description
+ "an optical-tunnel service creation request triggers a container
+ that includes the description of the characteristics of the
+ external optical transceiver handled by a 3rd party controller";
+ }
+ uses org-openroadm-common-service-types:external-interface-characteristics;
+ }
+ }
+ uses org-openroadm-routing-constraints:routing-constraints;
+ uses org-openroadm-common-service-types:service-information;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ }
+ output {
+ // Augment the reconfigure response with the data-reload
+ uses org-openroadm-common-service-types:configuration-response-common {
+ augment "configuration-response-common" {
+ leaf ack-data-reload-indicator {
+ type string;
+ description
+ "This optional, meaning this will be populated only when
+ the data-reload indicator is set true";
+ }
+ }
+ }
+ uses org-openroadm-common-service-types:response-parameters;
+ }
+ }
+
+ rpc service-reconfigure-bulk {
+ description
+ "Whether bulk of requests passed initial validation and was accepted for
+ processing. Once the request completes processing, a service-rpc-result
+ Notification shall be sent.";
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ list service-reconfigure-list {
+ key "service-name";
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Existing identifier for the service to be
+ reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ leaf new-service-name {
+ type string;
+ description
+ "New identifier for the service to be
+ reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ leaf data-reload {
+ type boolean;
+ description
+ "Indicates whether the data of existing service needs to be refreshed or
+ reloaded. No reprovisioning/reconfiguration should be done to the service,
+ only data is updated. May generate data conflict to existing service
+ after reload. If set true, the data of existing service will be refreshed";
+ }
+ leaf common-id {
+ type string;
+ description
+ "To be used by the ROADM controller to identify the routing
+ constraints received from planning application (PED).";
+ }
+ uses org-openroadm-common-service-types:service-order;
+ leaf connection-type {
+ type org-openroadm-common-service-types:connection-type;
+ }
+ uses org-openroadm-common-service-types:resource-status;
+ container service-a-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ }
+ container service-z-end {
+ uses org-openroadm-common-service-types:service-endpoint;
+ }
+ uses org-openroadm-routing-constraints:routing-constraints;
+ uses org-openroadm-common-service-types:service-information;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common {
+ augment "configuration-response-common" {
+ leaf ack-data-reload-indicator {
+ type string;
+ description
+ "This optional, meaning this will be populated only when
+ the data-reload indicator is set true";
+ }
+ }
+ }
+ list service-reconfigure-response-list {
+ key "service-name";
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Existing identifier for the service to be
+ reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ }
+ uses org-openroadm-common-service-types:response-parameters;
+ }
+ }
+
+
+
+
+ rpc service-reconfigure-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-identifiers-container;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-restoration {
+ description
+ "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+ service-rpc-result Notification shall be sent.
+ This rpc can be use to reroute a service according to 2 possible options :
+ \t_Option1 : neither the backup-path-id nor the failure-case-id are provided, a new path shall be
+ calculated according to the parameters provided (which includes metrics). If path computation
+ is successful, a new path is provided, and the service is rerouted according to that path.
+ \t_Option2 : if a backup-path-id or a failure-case-id are provided, the service shall
+ be rerouted according to the corresponding path. If path computation is triggered and successful,
+ a new path is provided, and the service is rerouted according to that path.";
+ input {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service to be restored in
+ the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ leaf option {
+ type enumeration {
+ enum permanent {
+ value 1;
+ description
+ "A spare regen can be used to restore the
+ service permanently without reverting back to the
+ original regen";
+ }
+ enum temporary {
+ value 2;
+ description
+ "a spare regen can be used to restore the
+ service temporarily. The service needs to be reverted
+ back to the original regen transponder";
+ }
+ }
+ mandatory true;
+ }
+ leaf backup-path-id {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "When present, states that the service shall be rerouted according to a specific backup path";
+ }
+ leaf failure-case-id {
+ type string;
+ description
+ "When present, states that the service shall be rerouted according to a specific backup path.
+ This last corresponds to the provided failure case id";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ uses org-openroadm-common-service-types:routing-metric;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-restoration-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-identifiers-container;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-reversion {
+ description
+ "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+ service-rpc-result Notification shall be sent.";
+ input {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service to be reverted
+ in the ROADM network, e.g., CLFI, CLCI, etc. ";
+ }
+ leaf due-date {
+ type yang:date-and-time;
+ description
+ "date and time service to be reverted";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-reversion-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-identifiers-container;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-reroute {
+ description
+ "Whether this request was validated and processed correctly. If successful, it returns the proposed new route.
+ If acceptable, this request should be followed by a service-reroute-confirm to complete the reroute operation.";
+ input {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service to be re-routed in
+ the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ uses org-openroadm-common-service-types:routing-metric;
+ uses org-openroadm-common-service-types:service-resiliency;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-routing-constraints:routing-constraints;
+ }
+ }
+
+ rpc service-reroute-confirm {
+ description
+ "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+ service-rpc-result Notification shall be sent.";
+ input {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service to be re-routed in
+ the ROADM network, e.g., CLFI, CLCI, etc.";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ uses org-openroadm-routing-constraints:routing-constraints;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-reroute-confirm-result-notification-request {
+ description
+ "This is the callback notification that the controller invokes on the carrier system.";
+ input {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ uses org-openroadm-common-service-types:service-identifiers-container;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc optical-tunnel-create {
+ description
+ "This rpc is used in a second step of service creation when the connection-type is
+ an optical-tunnel. The optical tunnel rendering implies that end terminals optical
+ interfaces such as router pluggables are tuned to the a correct wavelength and that
+ the output power is set so that control loop can operate during connection setting.
+ The rpc is invoked to confirm the optical tunnel can be established.";
+ input {
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier used in the second step of the optical-tunnel service creation.
+ Identifies the service (optical tunnel between SRG PPs) to be created
+ in the ROADM network.";
+ }
+ leaf common-id {
+ type string;
+ mandatory true;
+ description
+ "Identifier used in the first step of optical-tunnelservice creation using
+ temp-service-create rpc. Identifies the temporary service for which resources
+ have been reserved after a successful path computation";
+ }
+ leaf set-frequency {
+ type org-openroadm-common-optical-channel-types:frequency-THz;
+ mandatory true;
+ description
+ "Center Frequency in THz.";
+ }
+ leaf full-bandwidth-at-3dB {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ mandatory true;
+ description
+ "Signal full bandwidth at 3dB bellow the peak in GHz.";
+ }
+ leaf full-bandwidth-at-10dB {
+ type org-openroadm-common-optical-channel-types:frequency-GHz;
+ mandatory true;
+ description
+ "Signal full bandwidth at 10dB bellow the peak in GHz.";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc optical-tunnel-request-cancel {
+ description
+ "This rpc is used to abort service creation when the connection-type is
+ an optical-tunnel, if the conditions required to set-up the end to end service
+ can not be met by the end terminals optical interfaces such as router pluggables.
+ When the rpc is invoked, any resource temporary reserved for the second step of
+ service creation shall be released : this rpc cancels service path rendering between
+ SRG PPs.";
+ input {
+ leaf service-name {
+ type string;
+ description
+ "Identifier used in the first step of service creation using service create rpc.";
+ }
+ leaf common-id {
+ type string;
+ description
+ "Identifier used in the first step of optical-tunnelservice creation using
+ temp-service-create rpc. Identifies the temporary service for which resources
+ have been reserved after a successful path computation";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc network-re-optimization {
+ input {
+ leaf service-name {
+ type string;
+ description
+ "Identifier for the service in the ROADM network,
+ e.g., CLFI, CLCI, etc. whose path is to be checked by the RNC
+ for re-optimization";
+ }
+ leaf a-end {
+ type string;
+ description
+ "Services whose A-ends are terminated at the
+ specified office location are to be checked by the RNC for
+ re-optimization";
+ }
+ leaf z-end {
+ type string;
+ description
+ "Services whose Z-ends are terminated at the
+ specified office location are to be checked by the RNC for
+ re-optimization ";
+ }
+ leaf pass-through {
+ type string;
+ description
+ "Services that are pass-through (either via
+ regen or express) at the specified office location are to
+ be checked by the RNC for re-optimization";
+ }
+ leaf customer-code {
+ type string;
+ description
+ "Services that belong to the specified customer
+ are to be checked by the RNC for re-optimization ";
+ }
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ uses org-openroadm-common-service-types:routing-metric;
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ leaf optimization-candidate {
+ type string;
+ }
+ }
+ }
+
+rpc add-openroadm-operational-modes-to-catalog {
+ description
+ "This rpc is used to feed the operational mode catalog with openroadm operational modes";
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ container operational-mode-info {
+ container grid-parameters {
+ description
+ "Parameters associated with global spectrum use";
+ uses org-openroadm-operational-mode-catalog:operational-mode-grid-parameters;
+ }
+ container xponders-pluggables {
+ description
+ "Parameters associated with xponders and pluggables";
+ list xponder-pluggable-openroadm-operational-mode {
+ key "openroadm-operational-mode-id";
+ description
+ "defines the openroadm operational mode pointing to an official specification ";
+ leaf openroadm-operational-mode-id {
+ type string;
+ description
+ "openroadm operational mode which points to a specific spreadsheet of optical specifications";
+ }
+ uses org-openroadm-operational-mode-catalog:operational-mode-transponder-parameters;
+ }
+ }
+ container roadms {
+ description
+ "Parameters associated with roadms";
+ uses org-openroadm-operational-mode-catalog:operational-mode-roadm-express-parameters;
+ uses org-openroadm-operational-mode-catalog:operational-mode-roadm-add-parameters;
+ uses org-openroadm-operational-mode-catalog:operational-mode-roadm-drop-parameters;
+ }
+ container amplifiers {
+ description
+ "Parameters associated with amplifiers";
+ uses org-openroadm-operational-mode-catalog:operational-mode-amplifier-parameters;
+ }
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc add-specific-operational-modes-to-catalog {
+ description
+ "This rpc is used to feed the operational mode catalog with specific operational modes for
+ \txponders or external pluggables";
+ input {
+ uses org-openroadm-common-service-types:sdnc-request-header;
+ container operational-mode-info {
+ container specific-operational-modes {
+ description
+ "All specific operational modes corresponding to bookended or alien units";
+ list specific-operational-mode {
+ key "operational-mode-id";
+ description
+ "List of all declared specific operationnal modes";
+ leaf operational-mode-id {
+ type string;
+ description
+ "unique identifier which identifies the operational mode";
+ }
+ uses org-openroadm-operational-mode-catalog:operational-mode-grid-parameters;
+ uses org-openroadm-operational-mode-catalog:operational-mode-transponder-parameters;
+ }
+ }
+ }
+ }
+ output {
+ uses org-openroadm-common-service-types:configuration-response-common;
+ }
+ }
+
+ rpc service-srlg-get {
+ input {
+ leaf service-name {
+ type string;
+ description
+ "Identifier for the service in the ROADM network,
+ e.g., CLFI, CLCI, etc. whose path or other risks must be evaluated by the RNC";
+ }
+ leaf SRLG-type {
+ type org-openroadm-common-types:SRLG-type;
+ description
+ "Type of SRLG, Site SRLG, Node SRLG, Fiber SRLG or Link SRLG. If SRLG-type is not provided
+ in input, output should include all types of SRLGs for a given service-name";
+ }
+ leaf due-date {
+ type yang:date-and-time;
+ description
+ "Due-date is required to get list of SRLGs for specific validity period. If Due-date is not
+ provited in the input, RPC should return list of current/active SRLGS";
+ }
+ }
+ output {
+ list SRLG-list {
+ key "SRLG-Id";
+ leaf SRLG-Id {
+ type uint32;
+ description
+ "unique identifier for SRLG";
+ }
+ leaf SRLG-name {
+ type string;
+ description
+ "Name of the SRLG";
+ }
+ leaf SRLG-type {
+ type org-openroadm-common-types:SRLG-type;
+ description
+ "Type of SRLG, Site SRLG, Node SRLG, Fiber SRLG or Link SRLG";
+ }
+ leaf SRLG-length {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ description
+ "Fiber length in desired distance unit of measure";
+ }
+ }
+ }
+ }
+
+ notification service-rpc-result {
+ description
+ "This Notification indicates result of service RPC";
+ leaf notification-type {
+ type org-openroadm-common-service-types:service-notification-types;
+ }
+ uses org-openroadm-common-types:rpc-response-status;
+ uses org-openroadm-common-service-types:service-notification-result;
+ container path-computation-result {
+ when "../notification-type = 'path-computation-result'" {
+ description
+ "an optical-tunnel service triggers the leaf providing
+ information on the operationnal mode selected by the pce";
+ }
+ container aToZ {
+ description
+ "Describes the settings and the performances for the A to Z path";
+ uses org-openroadm-resource:common-och-otsi-attributes;
+ uses org-openroadm-resource:path-computation-outputs;
+ }
+ container zToA {
+ description
+ "Describes the settings and the performances for the Z to A path";
+ uses org-openroadm-resource:common-och-otsi-attributes;
+ uses org-openroadm-resource:path-computation-outputs;
+ }
+ }
+ }
+
+ notification service-traffic-flow {
+ description
+ "This Notification indicates that traffic is flowing again on the service after an administrative action has completed";
+ leaf service-name {
+ type string;
+ mandatory true;
+ description
+ "Identifier for the service being reported on";
+ }
+ leaf version-number {
+ type uint64;
+ description
+ "Identifier for the versioned service";
+ }
+ leaf actual-date {
+ type yang:date-and-time;
+ description
+ "Actual date and time traffic started flowing";
+ }
+ }
+
+ notification service-notification {
+ description
+ "This Notification that a service has been added, modified or removed.
+ A resourceCreation notification shall contain the created service in its entirety.
+ A resourceModified notification shall contain just the modified field, plus the service identifier
+ A resourceDeleted notification shall just contain the service identifier";
+ leaf notificationType {
+ type org-openroadm-resource-types:resource-notification-type;
+ description
+ "Whether this notification indicates a service creation, service modification or service deletion.";
+ }
+ leaf version-number {
+ type uint64;
+ description
+ "Identifier for the versioned service";
+ }
+ uses org-openroadm-common-service-types:service;
+ }
+
+ notification optical-tunnel-created {
+ description
+ "This Notification is used to confirm that an optical-tunnel service has been created.
+ It shall contain the created service in its entirety";
+ leaf notificationType {
+ type org-openroadm-resource-types:resource-notification-type;
+ description
+ "Whether this notification indicates a service creation, or service-reconfigure.";
+ }
+ leaf version-number {
+ type uint64;
+ description
+ "Identifier for the versioned service";
+ }
+ leaf actual-date {
+ type yang:date-and-time;
+ description
+ "Actual date and time traffic started flowing";
+ }
+ uses org-openroadm-common-service-types:service;
+ }
+
+ notification non-rpc-related-notification {
+ description
+ "Used to notify SDN controller that :
+ _a change occured in the data tree associated with the topology or the service Datastore of the RNC
+ _the attenuation on a ROADM to ROADM link as exceeded the value that can be accepted with current design
+ _the restoration of an optical OTN/WDM service";
+ leaf notificationType {
+ type org-openroadm-controller-customization:non-rpc-related-notification-type;
+ description
+ "This notification indicates whether a change occured in the data tree
+ associated with the topology or the service Datastore, an out of limit
+ attenuation on a WDM link, or the restoration of an optical WDM/OTN service.";
+ }
+ leaf notificationId {
+ type string;
+ description
+ "Unique identifier for the notification.";
+ }
+ leaf notification-time {
+ type yang:date-and-time;
+ description
+ "Time at which notification is raised";
+ }
+ leaf service-name {
+ when "../notificationType = 'service-state-change' or ../notificationType = 'autonomous-optical-restoration-triggered'" {
+ description
+ "When Service Data store is modified, or a restoration has been triggered
+ service-name is provided";
+ }
+ type string;
+ }
+ leaf impacted-resource-type {
+ when "../notificationType = 'topology-change' or ../notificationType = 'service-state-change'" {
+ description
+ "Used to provide additional information on the type of resource impacted by the
+ change in the data-store, to target more effectively consecutive request";
+ }
+ type string;
+ }
+ leaf impacted-resource-id {
+ when "../notificationType = 'topology-change' or ../notificationType = 'service-state-change'" {
+ description
+ "Identifies the resource impacted by the change in the data-store";
+ }
+ type string;
+ }
+ leaf topology-layer {
+ when "../notificationType = 'topology-change'" {
+ description
+ "indicates the layer associated with the topological change";
+ }
+ type enumeration {
+ enum openroadm-topology {
+ value 1;
+ }
+ enum otn-topology {
+ value 2;
+ }
+ }
+ }
+ }
+
+ container service-list {
+ description
+ "List of service. Can only be created, deleted, modified, etc. using special RPCs. Will only contain one service with a given name.
+ Does not contain historical (deleted or rather those passed their end time) or draft services. If two services exist with the same
+ name (with non-lapping start-end times for example), this table will contain the current one. If only planned services exist for
+ the name, the one with the earliest start time will be present
+ ";
+ list services {
+ key "service-name";
+ uses org-openroadm-common-service-types:service;
+ }
+ }
+ container versioned-service-list {
+ description
+ "List of service, regardless of lifecycle state. Can only be created, deleted, modified, etc. using special RPCs. Can report more than one
+ version of a service, if supported by the implementation. May contain deleted services, multiple versions of the same service, as identified
+ by its name, etc.";
+ list services {
+ key "service-name version-number";
+ leaf version-number {
+ type uint64;
+ }
+ uses org-openroadm-common-service-types:service;
+ }
+ }
+ container temp-service-list {
+ description
+ "List of temporary services Can only be created, deleted, modified, etc. using special RPCs.";
+ list services {
+ key "common-id";
+ uses org-openroadm-common-service-types:service {
+ refine "service-name" {
+ mandatory false;
+ }
+ augment "service-a-end" {
+ list equipment-required {
+ key "equipment-identifier";
+ description
+ "List of required equipment, including equipment type, state and
+ quantity";
+ uses org-openroadm-common-service-types:equipment-info;
+ }
+ }
+ augment "service-z-end" {
+ list equipment-required {
+ key "equipment-identifier";
+ description
+ "List of required equipment, including equipment type, state and
+ quantity";
+ uses org-openroadm-common-service-types:equipment-info;
+ }
+ }
+ }
+ uses org-openroadm-common-service-types:intermediate-site-container;
+ list supporting-service-hierarchy {
+ key "service-identifier";
+ uses org-openroadm-common-service-types:service-hierarchy;
+ description
+ "This lists all the supporting services and their respective hierarchy, includes the
+ proposed one";
+ }
+ uses org-openroadm-common-service-types:existing-service-grouping {
+ refine "existing-service-attributes/reusable-existing-resources" {
+ default "all";
+ }
+ }
+ }
+ }
+ container controller-behaviour-settings {
+ description
+ "Parameters allowing to set the controller behaviour";
+ uses org-openroadm-controller-customization:controller-parameters;
+ }
+ container operational-mode-catalog {
+ description
+ "Store parameters associated with openroadm specifications and specific operational modes";
+ uses org-openroadm-operational-mode-catalog:operational-mode-catalog;
+ }
+}
import org-openroadm-resource {
prefix org-openroadm-resource;
- revision-date 2019-05-31;
+ revision-date 2021-12-10;
}
import org-openroadm-network-resource {
prefix org-openroadm-network-resource;
- revision-date 2018-11-30;
+ revision-date 2019-11-29;
}
organization
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE";
+ revision 2021-12-10 {
+ description
+ "Version 10.1";
+ }
+ revision 2021-09-24 {
+ description
+ "Version 10.0";
+ }
+ revision 2021-05-28 {
+ description
+ "Version 9.1";
+ }
+ revision 2021-03-26 {
+ description
+ "Version 9.0";
+ }
+ revision 2020-05-29 {
+ description
+ "Version 7.1.0";
+ }
+ revision 2020-03-27 {
+ description
+ "Version 7.0.0";
+ }
+ revision 2019-11-29 {
+ description
+ "Version 6.1.0";
+ }
+ revision 2019-09-27 {
+ description
+ "Version 6.0.0";
+ }
revision 2019-05-31 {
description
"Version 5.1.0";
description
"Unique identifier for this topology component within this service";
}
+ container computation-results {
+ description
+ "parameters resulting of path computation";
+ uses org-openroadm-resource:path-computation-outputs;
+ }
+ uses route_info;
uses hop;
}
list zToA {
description
"Unique identifier for this topology component within this service";
}
+ container computation-results {
+ description
+ "parameters resulting of path computation";
+ uses org-openroadm-resource:path-computation-outputs;
+ }
+ uses route_info;
uses hop;
}
}
+ grouping route_info {
+ leaf subroute_id {
+ type string;
+ description
+ "Unique identifier for the subroute or segment of the topology";
+ }
+ leaf-list previous_ids {
+ type string;
+ description
+ "Pointer to the previous id or set of ids that allows reconstruction
+ of the end-to-end route from the segments. Can be omitted if the
+ previous-id = current-id – 1 (if id is a number-based string) or if
+ each subroute is already representing an end-to-end route.";
+ }
+ }
+
grouping hop {
leaf hop-type {
type enumeration {
- enum "node-external" {
+ enum node-external {
value 1;
description
"The given resource is on the edge of the node, and used in relationships to resources outside of the node.";
}
- enum "node-internal" {
+ enum node-internal {
value 2;
description
"The given resource is internally to the node";
augment "resource/resource/interface" {
uses org-openroadm-resource:resource-reporting;
}
+ augment "resource/resource/circuit-pack" {
+ leaf circuit-pack-type {
+ type string;
+ description
+ "Type of circuit-pack";
+ }
+ leaf circuit-pack-product-code {
+ type string;
+ description
+ "Product code of the circuit-pack";
+ }
+ }
}
}
description
"Unique identifier for this network-topology component within this service";
}
+ uses route_info;
uses org-openroadm-network-resource:network-resource;
}
list z-to-a {
description
"Unigue identifier for this network-topology component within this service";
}
+ uses route_info;
uses org-openroadm-network-resource:network-resource;
}
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestInputBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.service.path.rpc.result.PathDescriptionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.PceMetric;
package org.opendaylight.transportpce.pce.constraints;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
+import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.opendaylight.transportpce.pce.constraints.PceConstraints.ResourcePair;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.CoRoutingOrGeneral;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.CoRouting;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.General;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Diversity;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Exclude;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Include;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Latency;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.diversity.existing.service.constraints.ExistingServiceApplicability;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.Constraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.CoRouting;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.Diversity;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.Exclude;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.Include;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.diversity.existing.service.constraints.ServiceIdentifierList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.diversity.existing.service.constraints.ServiceIdentifierListKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.service.applicability.g.ServiceApplicability;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.pce.resource.resource.resource.Link;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
public class PceConstraintsCalc {
/* Logging. */
private static final Logger LOG = LoggerFactory.getLogger(PceConstraintsCalc.class);
LOG.info("In calcHardconstraints: no hard constraints.");
return;
}
-
- CoRoutingOrGeneral coRoutingOrGeneral = servicePathHardConstraints.getCoRoutingOrGeneral();
- readconstraints(coRoutingOrGeneral, pceHardConstraints);
-
+ readConstraints(servicePathHardConstraints, pceHardConstraints);
}
private void calcSoftconstraints(PathComputationRequestInput input) {
LOG.info("In calcSoftconstraints: no soft constraints.");
return;
}
-
- CoRoutingOrGeneral coRoutingOrGeneral = servicePathSoftConstraints.getCoRoutingOrGeneral();
- readconstraints(coRoutingOrGeneral, pceSoftConstraints);
-
+ readConstraints(servicePathSoftConstraints, pceSoftConstraints);
}
- private void readconstraints(CoRoutingOrGeneral coRoutingOrGeneral, PceConstraints constraints) {
- LOG.debug("In readconstraints start");
-
- if (coRoutingOrGeneral == null) {
- LOG.info("In readHardconstraints: no CoRoutingOrGeneral constraints.");
- return;
- }
-
- General tmpGeneral = null;
- CoRouting tmpCoRouting = null;
-
- if (coRoutingOrGeneral instanceof General) {
- LOG.info("In readconstraints General {}", coRoutingOrGeneral);
- tmpGeneral = (General) coRoutingOrGeneral;
- readGeneralContrains(tmpGeneral, constraints);
- return;
- }
+ private void readConstraints(Constraints hardConstraints, PceConstraints constraints) {
+ LOG.debug("In readHardconstraints start");
- if (coRoutingOrGeneral instanceof CoRouting) {
- LOG.info("In readconstraints CoRouting {}", coRoutingOrGeneral);
- tmpCoRouting = (CoRouting) coRoutingOrGeneral;
- readCoRoutingContrains(tmpCoRouting, constraints);
+ if (hardConstraints.getInclude() != null) {
+ readInclude(hardConstraints.getInclude(), constraints);
}
- }
-
- private void readGeneralContrains(General tmpGeneral, PceConstraints constraints) {
- LOG.debug("In readGeneralContrains start");
-
- if (tmpGeneral == null) {
- LOG.info("In readGeneralContrains: no General constraints.");
- return;
+ if (hardConstraints.getExclude() != null) {
+ readExclude(hardConstraints.getExclude(), constraints);
}
-
- Latency latency = tmpGeneral.getLatency();
- if (latency != null) {
- constraints.setMaxLatency(latency.getMaxLatency().toJava());
- LOG.info("In readGeneralContrains: read latency {}", latency);
+ if (hardConstraints.getCoRouting() != null) {
+ readCoRouting(hardConstraints.getCoRouting(), constraints);
}
-
- Exclude exclude = tmpGeneral.getExclude();
- if (exclude != null) {
- readExclude(exclude, constraints);
+ if (hardConstraints.getDiversity() != null) {
+ readDiversity(hardConstraints.getDiversity(), constraints);
}
-
- Include include = tmpGeneral.getInclude();
- if (include != null) {
- readInclude(include, constraints);
- }
-
- Diversity diversity = tmpGeneral.getDiversity();
- PceConstraints.ResourceType rt = PceConstraints.ResourceType.NONE;
- if (diversity != null) {
- ExistingServiceApplicability temp = diversity.getExistingServiceApplicability();
- if (temp == null) {
- return;
- }
- if (Boolean.TRUE.equals(temp.getNode())) {
- rt = PceConstraints.ResourceType.NODE;
- }
- if (Boolean.TRUE.equals(temp.getSrlg())) {
- rt = PceConstraints.ResourceType.SRLG;
- }
- if (Boolean.TRUE.equals(temp.getSite())) {
- rt = PceConstraints.ResourceType.CLLI;
- }
- LOG.info("in readGeneralContrains {} list is :{}", rt, diversity);
- readDiversity(diversity.getExistingService(), constraints, rt);
+ if (hardConstraints.getLatency() != null) {
+ constraints.setMaxLatency(hardConstraints.getLatency().getMaxLatency().longValue());
}
}
private void readExclude(Exclude exclude, PceConstraints constraints) {
+ //TODO: Implement other exclude constraints: fiber-bundle, link-identifier
+ // and supporting-service-name
List<NodeIdType> nodes = exclude.getNodeId();
if (nodes != null) {
List<String> elementsToExclude = new ArrayList<>();
if (sites != null) {
constraints.setExcludeCLLI(exclude.getSite());
}
+ if (exclude.getFiberBundle() != null || exclude.getLinkIdentifier() != null
+ || exclude.getSupportingServiceName() != null) {
+ LOG.warn("exclude constraints of type fiber-bundle, link-identifier"
+ + "or supporting-service-name are not implemented yet");
+ }
}
private void readInclude(Include include, PceConstraints constraints) {
}
}
- private void readDiversity(List<String> srvList, PceConstraints constraints, PceConstraints.ResourceType rt) {
-
- List<String> elementsToExclude = new ArrayList<>();
- LOG.info("in readDiversity {}", srvList);
+ private void readCoRouting(CoRouting tmpcoRouting, PceConstraints constraints) {
+ if (tmpcoRouting == null) {
+ LOG.info("In readCoRoutingContrains: no CoRouting constraints.");
+ } else {
+ LOG.warn("CoRouting constraints handling not implemented yet");
+ }
+ }
- for (String srv : srvList) {
- Optional<PathDescription> service = getPathDescriptionFromDatastore(srv);
- if (service.isPresent()) {
- LOG.info("in readDiversity service list {}", service);
- switch (rt) {
- case NODE:
- elementsToExclude.addAll(getAToZNodeList(service.get()));
- LOG.info("readDiversity NODE : {}", elementsToExclude);
- if (elementsToExclude != null) {
- constraints.setExcludeNodes(elementsToExclude);
- }
- break;
- case SRLG:
- elementsToExclude.addAll(getSRLGList(service.get()));
- LOG.info("readDiversity SRLG : {}", elementsToExclude);
- if (elementsToExclude != null) {
- constraints.setExcludeSrlgLinks(elementsToExclude);
- }
- break;
- case CLLI:
- /// Retrieve nodes into dedicated CLLI list
- /// during node validation check their CLLI and build CLLI exclude list
- elementsToExclude.addAll(getAToZNodeList(service.get()));
- LOG.info("readDiversity CLLI : {}", elementsToExclude);
- if (elementsToExclude != null) {
- constraints.setExcludeClliNodes(elementsToExclude);
- }
- break;
- default:
- LOG.info("in readDiversity unsupported divercity type {}", rt);
+ private void readDiversity(Diversity diversity, PceConstraints constraints) {
+ //TODO: How to implement the DiversityType: serial or synchronous?
+ Map<ServiceIdentifierListKey, ServiceIdentifierList> serviceIdList = diversity.getServiceIdentifierList();
+ Collection<ServiceIdentifierList> services = serviceIdList.values();
+ for (ServiceIdentifierList serviceIdentifier : services) {
+ String serviceId = serviceIdentifier.getServiceIndentifier();
+ ServiceApplicability serviceApplicability = serviceIdentifier.getServiceApplicability();
+ Optional<PathDescription> serviceOpt = getPathDescriptionFromDatastore(serviceId);
+ if (serviceOpt.isPresent()) {
+ List<String> serviceNodes = getAToZNodeList(serviceOpt.get());
+ if (serviceApplicability.getNode() && !serviceNodes.isEmpty()) {
+ constraints.setExcludeNodes(serviceNodes);
+ }
+ List<String> serviceLinks = getSRLGList(serviceOpt.get());
+ if (serviceApplicability.getLink() && !serviceLinks.isEmpty()) {
+ constraints.setExcludeSrlgLinks(serviceLinks);
+ }
+ if (serviceApplicability.getSite() && !serviceNodes.isEmpty()) {
+ constraints.setExcludeClliNodes(serviceNodes);
}
-
- } else {
- LOG.info("in readDiversity srv={} is not present", srv);
}
}
}
return result;
}
- private void readCoRoutingContrains(CoRouting tmpcoRouting, PceConstraints constraints) {
- LOG.info("In readCoRoutingContrains start");
-
- if (tmpcoRouting == null) {
- LOG.info("In readCoRoutingContrains: no General constraints.");
- }
-
- }
-
public PceConstraints getPceHardConstraints() {
return pceHardConstraints;
}
import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.result.Response;
import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.result.response.response.type.NoPathCase;
import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.result.response.response.type.PathCase;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.General;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.GeneralBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Include;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.IncludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.Include;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.IncludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraintsBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
Include include = new IncludeBuilder().setNodeId(nodeIdList).build();
- General general = new GeneralBuilder().setInclude(include).build();
- hardConstraints = new HardConstraintsBuilder().setCoRoutingOrGeneral(general).build();
+ hardConstraints = new HardConstraintsBuilder().setInclude(include).build();
return hardConstraints;
}
import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.service.PathRequest;
import org.opendaylight.yang.gen.v1.gnpy.path.rev220221.synchronization.info.Synchronization;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.IfOCH;
import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.IfOCHOTU4ODU4;
import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.IfOtsiOtsigroup;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
import org.opendaylight.yangtools.yang.common.Uint16;
String notCreatedServiceType = xpdrNetTpCreation(ontTp1);
if (notCreatedServiceType == null) {
LOG.info("TP {} of XPONDER {} is validated",
- tp.getTpId(),
+ tp.getTpId().getValue(),
node.getNodeId().getValue());
this.availableXpdrNWTps.add(tp.getTpId());
} else {
}
private boolean checkFirstOdtuTpn(OdtuTpnPool otPool) {
- return (otPool.getOdtuType().equals(ODTU4TsAllocated.class)
- || otPool.getOdtuType().equals(ODTUCnTs.class))
+ return (otPool.getOdtuType().getSimpleName().equals(ODTU4TsAllocated.class.getSimpleName())
+ || otPool.getOdtuType().getSimpleName().equals(ODTUCnTs.class.getSimpleName()))
&& !otPool.getTpnPool().isEmpty();
}
import org.opendaylight.transportpce.common.ResponseCodes;
import org.opendaylight.transportpce.common.fixedflex.GridConstant;
import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OpucnTribSlotDef;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
import org.slf4j.Logger;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.path.performance.path.properties.PathMetricBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.service.path.rpc.result.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.service.path.rpc.result.PathDescriptionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.RpcStatusEx;
import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.available.freq.map.AvailFreqMaps;
import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.available.freq.map.AvailFreqMapsBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.available.freq.map.AvailFreqMapsKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
*/
package org.opendaylight.transportpce.pce.utils;
+import java.math.BigDecimal;
import java.util.Arrays;
+import java.util.Map;
import org.opendaylight.transportpce.common.ResponseCodes;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestInputBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.path.computation.request.input.ServiceAEndBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.path.computation.request.input.ServiceZEnd;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.path.computation.request.input.ServiceZEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.CoRoutingBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.GeneralBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.DiversityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.ExcludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.IncludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.LatencyBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.diversity.existing.service.constraints.ExistingServiceApplicability;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.diversity.existing.service.constraints.ExistingServiceApplicabilityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.CoRoutingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.DiversityBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.ExcludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.IncludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.LatencyBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co.routing.ServiceIdentifierListBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.diversity.existing.service.constraints.ServiceIdentifierListKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.service.applicability.g.ServiceApplicabilityBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.PceMetric;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.response.parameters.sp.ResponseParameters;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.handler.header.ServiceHandlerHeader;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.handler.header.ServiceHandlerHeaderBuilder;
import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
public final class PceTestData {
.setServiceAEnd(serviceAEnd)
.setServiceZEnd(serviceZEnd)
.setHardConstraints(new HardConstraintsBuilder()
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329
- .constraints.co.routing.or.general.co.routing.CoRoutingBuilder()
- .setExistingService(Arrays.asList("Some existing-service"))
- .build())
- .build())
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints
+ .co.routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
+ .build())
.setSoftConstraints(new SoftConstraintsBuilder()
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329
- .constraints.co.routing.or.general.co.routing.CoRoutingBuilder()
- .setExistingService(Arrays.asList("Some existing-service"))
- .build())
- .build())
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints
+ .co.routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
+ .build())
.build();
}
.setServiceAEnd(serviceAEnd)
.setServiceZEnd(serviceZEnd)
.setHardConstraints(new HardConstraintsBuilder()
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329
- .constraints.co.routing.or.general.co.routing.CoRoutingBuilder()
- .setExistingService(Arrays.asList("Some existing-service"))
- .build())
- .build())
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co
+ .routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
+ .build())
.setSoftConstraints(new SoftConstraintsBuilder()
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329
- .constraints.co.routing.or.general.co.routing.CoRoutingBuilder()
- .setExistingService(Arrays.asList("Some existing-service"))
- .build())
- .build())
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co
+ .routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
- .build();
+ .build())
+ .build();
}
public static PathComputationRequestInput getPCERequest() {
.setServiceAEnd(serviceAEnd)
.setServiceZEnd(serviceZEnd)
.setHardConstraints(new HardConstraintsBuilder()
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329
- .constraints.co.routing.or.general.co.routing.CoRoutingBuilder()
- .setExistingService(Arrays.asList("Some existing-service"))
- .build())
- .build())
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co
+ .routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
+ .build())
.setSoftConstraints(new SoftConstraintsBuilder()
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329
- .constraints.co.routing.or.general.co.routing.CoRoutingBuilder()
- .setExistingService(Arrays.asList("Some existing-service"))
- .build())
- .build())
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co
+ .routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
+ .build())
.build();
}
.setServiceAEnd(serviceAEnd)
.setServiceZEnd(serviceZEnd)
.setHardConstraints(new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(new GeneralBuilder()
- .setExclude(new ExcludeBuilder()
- .setNodeId(Arrays.asList(new NodeIdType("OpenROADM-2-2")))
- .build())
- .setLatency(new LatencyBuilder().setMaxLatency(Uint32.valueOf(3223)).build())
- .setInclude(new IncludeBuilder()
- .setNodeId(Arrays.asList(new NodeIdType("XPONDER-1-2")))
- .build())
- .build())
+ .setExclude(new ExcludeBuilder()
+ .setNodeId(Arrays.asList(new NodeIdType("OpenROADM-2-2")))
+ .build())
+ .setInclude(new IncludeBuilder()
+ .setNodeId(Arrays.asList(new NodeIdType("XPONDER-1-2")))
.build())
+ .setLatency(new LatencyBuilder()
+ .setMaxLatency(BigDecimal.valueOf(3223))
+ .build())
+ .build())
.build();
}
* @return output PathComputationRequestOutput data
*/
public static PathComputationRequestOutput getPCE_test2_result_54() {
- PathComputationRequestOutputBuilder outputBuilder = new PathComputationRequestOutputBuilder();
- ResponseParameters responseParameters = new ResponseParametersBuilder()
+ return new PathComputationRequestOutputBuilder()
+ .setConfigurationResponseCommon(createCommonSuccessResponse())
+ .setResponseParameters(new ResponseParametersBuilder()
.setPathDescription(createPathDescription(0L, 9L, 0L, 9L))
- .build();
- outputBuilder.setConfigurationResponseCommon(createCommonSuccessResponse())
- .setResponseParameters(responseParameters);
- return outputBuilder.build();
+ .build())
+ .build();
}
/**
.setServiceAEnd(serviceAEnd)
.setServiceZEnd(serviceZEnd)
.setHardConstraints(new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(new GeneralBuilder()
- .setExclude(new ExcludeBuilder()
- .setNodeId(Arrays.asList(
- new NodeIdType("OpenROADM-2-1"), new NodeIdType("OpenROADM-2-2")))
- .build())
- .build())
+ .setExclude(new ExcludeBuilder()
+ .setNodeId(Arrays.asList(new NodeIdType("OpenROADM-2-1"), new NodeIdType("OpenROADM-2-2")))
.build())
+ .build())
.build();
}
}
public static PathComputationRequestInput getPCE_simpletopology_test1_requestSetHardAndSoftConstrains() {
- ServiceHandlerHeader serviceHandlerHeader = new ServiceHandlerHeaderBuilder()
- .setRequestId("request 1")
- .build();
- ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
- .setServiceRate(Uint32.valueOf(0))
- .setNodeId("XPONDER-1-2")
- .build();
- ServiceZEnd serviceZEnd = new ServiceZEndBuilder()
- .setServiceRate(Uint32.valueOf(0))
- .setNodeId("XPONDER-3-2")
- .build();
- HardConstraints hardConstrains = new HardConstraintsBuilder().build();
- SoftConstraints softConstraints = new SoftConstraintsBuilder().build();
return new PathComputationRequestInputBuilder()
- .setServiceHandlerHeader(serviceHandlerHeader)
- .setServiceName("service 1")
- .setResourceReserve(true)
- .setPceRoutingMetric(PceMetric.HopCount)
- .setServiceAEnd(serviceAEnd)
- .setServiceZEnd(serviceZEnd)
- .setHardConstraints(hardConstrains)
- .setSoftConstraints(softConstraints)
- .build();
+ .setServiceHandlerHeader(new ServiceHandlerHeaderBuilder()
+ .setRequestId("request 1")
+ .build())
+ .setServiceName("service 1")
+ .setResourceReserve(true)
+ .setPceRoutingMetric(PceMetric.HopCount)
+ .setServiceAEnd(new ServiceAEndBuilder()
+ .setServiceRate(Uint32.valueOf(0))
+ .setNodeId("XPONDER-1-2")
+ .build())
+ .setServiceZEnd(new ServiceZEndBuilder()
+ .setServiceRate(Uint32.valueOf(0))
+ .setNodeId("XPONDER-3-2")
+ .build())
+ .setHardConstraints(new HardConstraintsBuilder().build())
+ .setSoftConstraints(new SoftConstraintsBuilder().build())
+ .build();
}
public static PathComputationRequestInput getPCE_simpletopology_test1_request() {
- ServiceHandlerHeader serviceHandlerHeader = new ServiceHandlerHeaderBuilder()
+ return new PathComputationRequestInputBuilder()
+ .setServiceHandlerHeader(new ServiceHandlerHeaderBuilder()
.setRequestId("request 1")
- .build();
- ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
+ .build())
+ .setServiceName("service 1")
+ .setResourceReserve(true)
+ .setPceRoutingMetric(PceMetric.HopCount)
+ .setServiceAEnd(new ServiceAEndBuilder()
.setServiceRate(Uint32.valueOf(0))
.setNodeId("XPONDER-1-2")
- .build();
- ServiceZEnd serviceZEnd = new ServiceZEndBuilder()
+ .build())
+ .setServiceZEnd(new ServiceZEndBuilder()
.setServiceRate(Uint32.valueOf(0))
.setNodeId("XPONDER-3-2")
- .build();
- return new PathComputationRequestInputBuilder()
- .setServiceHandlerHeader(serviceHandlerHeader)
- .setServiceName("service 1")
- .setResourceReserve(true)
- .setPceRoutingMetric(PceMetric.HopCount)
- .setServiceAEnd(serviceAEnd)
- .setServiceZEnd(serviceZEnd)
+ .build())
.build();
}
private static PathDescription createPathDescription(long azRate, long azWaveLength, long zaRate,
long zaWaveLength) {
- AToZDirection atozDirection = new AToZDirectionBuilder()
- .setRate(Uint32.valueOf(azRate))
- .setAToZWavelengthNumber(Uint32.valueOf(azWaveLength))
- .build();
- ZToADirection ztoaDirection = new ZToADirectionBuilder()
- .setRate(Uint32.valueOf(zaRate))
- .setZToAWavelengthNumber(Uint32.valueOf(zaWaveLength))
- .build();
return new PathDescriptionBuilder()
- .setAToZDirection(atozDirection)
- .setZToADirection(ztoaDirection)
- .build();
+ .setAToZDirection(new AToZDirectionBuilder()
+ .setRate(Uint32.valueOf(azRate))
+ .setAToZWavelengthNumber(Uint32.valueOf(azWaveLength))
+ .build())
+ .setZToADirection(new ZToADirectionBuilder()
+ .setRate(Uint32.valueOf(zaRate))
+ .setZToAWavelengthNumber(Uint32.valueOf(zaWaveLength))
+ .build())
+ .build();
}
/**
* @return input PathComputationRequestInput data
*/
public static PathComputationRequestInput build_diversity_from_request(PathComputationRequestInput base) {
-
- ExistingServiceApplicability nodeTrue = new ExistingServiceApplicabilityBuilder()
- .setNode(true).build();
-
- ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
+ return new PathComputationRequestInputBuilder(base)
+ .setServiceName("service 2")
+ .setServiceAEnd(new ServiceAEndBuilder()
.setServiceRate(Uint32.valueOf(0))
.setNodeId("XPONDER-1-1")
- .build();
- ServiceZEnd serviceZEnd = new ServiceZEndBuilder()
+ .build())
+ .setServiceZEnd(new ServiceZEndBuilder()
.setServiceRate(Uint32.valueOf(0))
.setNodeId("XPONDER-3-1")
- .build();
- return new PathComputationRequestInputBuilder(base)
- .setServiceName("service 2")
- .setServiceAEnd(serviceAEnd)
- .setServiceZEnd(serviceZEnd)
+ .build())
.setHardConstraints(new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(new GeneralBuilder()
- .setLatency(new LatencyBuilder()
- .setMaxLatency(Uint32.valueOf(3223)).build())
- .setDiversity(new DiversityBuilder()
- .setExistingService(Arrays.asList(base.getServiceName()))
- .setExistingServiceApplicability(nodeTrue)
- .build())
- .build())
+ .setLatency(new LatencyBuilder()
+ .setMaxLatency(BigDecimal.valueOf(3223))
+ .build())
+ .setDiversity(new DiversityBuilder()
+ .setServiceIdentifierList(Map.of(
+ new ServiceIdentifierListKey(base.getServiceName()),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.diversity
+ .existing.service.constraints.ServiceIdentifierListBuilder()
+ .setServiceIndentifier(base.getServiceName())
+ .setServiceApplicability(new ServiceApplicabilityBuilder()
+ .setNode(true)
+ .build())
+ .build()))
.build())
+ .build())
.build();
}
public static ServiceCreateInput buildServiceCreateInput() {
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceAEnd serviceAEnd =
- new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531
- .service.create.input.ServiceAEndBuilder()
- .setClli("clli")
- .setServiceRate(Uint32.valueOf(0))
- .setNodeId(new NodeIdType("XPONDER-1-2"))
- .setTxDirection(new org.opendaylight.yang.gen.v1.http.org
- .openroadm.common.service.types.rev190531.service.endpoint.TxDirectionBuilder()
- .setPort(new PortBuilder().build())
- .build())
- .setRxDirection(new org.opendaylight.yang.gen.v1.http.org
- .openroadm.common.service.types.rev190531.service.endpoint.RxDirectionBuilder()
- .setPort(new PortBuilder().build())
- .build())
- .build();
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceAEnd serviceAEnd =
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
+ .ServiceAEndBuilder()
+ .setClli("clli")
+ .setServiceRate(Uint32.valueOf(0))
+ .setNodeId(new NodeIdType("XPONDER-1-2"))
+ .setTxDirection(Map.of(
+ new TxDirectionKey(Uint8.ZERO),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint
+ .TxDirectionBuilder()
+ .setPort(new PortBuilder().build())
+ .build()))
+ .setRxDirection(Map.of(
+ new RxDirectionKey(Uint8.ZERO),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint
+ .RxDirectionBuilder()
+ .setPort(new PortBuilder().build())
+ .build()))
+ .build();
+
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceZEnd serviceZEnd =
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
+ .ServiceZEndBuilder()
+ .setClli("clli")
+ .setServiceRate(Uint32.valueOf(0))
+ .setNodeId(new NodeIdType("XPONDER-3-2"))
+ .setTxDirection(Map.of(
+ new TxDirectionKey(Uint8.ZERO),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint
+ .TxDirectionBuilder()
+ .setPort(new PortBuilder().build())
+ .build()))
+ .setRxDirection(Map.of(
+ new RxDirectionKey(Uint8.ZERO),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint
+ .RxDirectionBuilder()
+ .setPort(new PortBuilder().build())
+ .build()))
+ .build();
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceZEnd serviceZEnd =
- new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531
- .service.create.input.ServiceZEndBuilder()
- .setClli("clli")
- .setServiceRate(Uint32.valueOf(0))
- .setNodeId(new NodeIdType("XPONDER-3-2"))
- .setTxDirection(new org.opendaylight.yang.gen.v1.http.org
- .openroadm.common.service.types.rev190531.service.endpoint.TxDirectionBuilder()
- .setPort(new PortBuilder().build())
- .build())
- .setRxDirection(new org.opendaylight.yang.gen.v1.http.org
- .openroadm.common.service.types.rev190531.service.endpoint.RxDirectionBuilder()
- .setPort(new PortBuilder().build())
- .build())
- .build();
return new ServiceCreateInputBuilder()
.setCommonId("commonId")
.setConnectionType(ConnectionType.Service)
.setServiceAEnd(serviceAEnd)
.setServiceZEnd(serviceZEnd)
.setSdncRequestHeader(new SdncRequestHeaderBuilder()
- .setRequestId("request 1")
- .build())
+ .setRequestId("request 1")
+ .build())
.build();
}
.setServiceAEnd(serviceAEnd)
.setServiceZEnd(serviceZEnd)
.setHardConstraints(new HardConstraintsBuilder()
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329
- .constraints.co.routing.or.general.co.routing.CoRoutingBuilder()
- .setExistingService(Arrays.asList("Some existing-service"))
- .build())
- .build())
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co
+ .routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
+ .build())
.setSoftConstraints(new SoftConstraintsBuilder()
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329
- .constraints.co.routing.or.general.co.routing.CoRoutingBuilder()
- .setExistingService(Arrays.asList("Some existing-service"))
- .build())
- .build())
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co
+ .routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
+ .build())
.build();
}
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.FrequencyGHz;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.FrequencyTHz;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.ModulationFormat;
import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OpucnTribSlotDef;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.device.renderer.rev211004.renderer.rollback.output.FailedToRollbackKey;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220114.OpenroadmNodeVersion;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220114.mapping.Mapping;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.Topology;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceList;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.Topology;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesKey;
import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev210930.link.tp.LinkTp;
import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev210930.link.tp.LinkTpBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev210930.node.interfaces.NodeInterface;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
public interface RendererServiceOperations {
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.NodeTypes;
import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev161014.PmGranularity;
import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.RpcStatusEx;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.ServicePathNotificationTypes;
service.getServiceAEnd().getServiceFormat().getName(),
service.getServiceAEnd().getServiceRate(),
service.getServiceAEnd().getTxDirection() == null
- || service.getServiceAEnd().getTxDirection().getPort() == null
- || service.getServiceAEnd().getTxDirection().getPort().getPortName() == null
+ || service.getServiceAEnd().getTxDirection().values().stream().findFirst().get()
+ .getPort() == null
+ || service.getServiceAEnd().getTxDirection().values().stream().findFirst().get()
+ .getPort().getPortName() == null
? null
: portMapping.getMapping(
service.getServiceAEnd().getNodeId().getValue(),
- service.getServiceAEnd().getTxDirection().getPort().getPortName()));
+ service.getServiceAEnd().getTxDirection().values().stream().findFirst().get()
+ .getPort().getPortName()));
switch (serviceType) {
case StringConstants.SERVICE_TYPE_100GE_T:
case StringConstants.SERVICE_TYPE_400GE:
return Uint32.ZERO;
}
String serviceName =
- ServiceFormat.OTU.equals(input.getServiceAEnd().getServiceFormat())
+ ServiceFormat.OTU.getName().equals(input.getServiceAEnd().getServiceFormat().getName())
? input.getServiceAEnd().getOtuServiceRate().getSimpleName()
: input.getServiceAEnd().getOduServiceRate().getSimpleName();
if (!formatRateMap.get(input.getServiceAEnd().getServiceFormat()).containsKey(serviceName)) {
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.Topology;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.TopologyBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.Topology;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.TopologyBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.get.connection.port.trail.output.Ports;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev190531.resource.DeviceBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev190531.resource.ResourceBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev190531.resource.ResourceTypeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev190531.resource.resource.resource.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev181130.ResourceTypeEnum;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev190531.Hop.HopType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev190531.topology.AToZ;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev190531.topology.AToZBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev190531.topology.AToZKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev190531.topology.ZToA;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev190531.topology.ZToABuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev190531.topology.ZToAKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.resource.DeviceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.resource.ResourceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.resource.ResourceTypeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.resource.resource.resource.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev210924.ResourceTypeEnum;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev211210.Hop.HopType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev211210.topology.AToZ;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev211210.topology.AToZBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev211210.topology.AToZKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev211210.topology.ZToA;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev211210.topology.ZToABuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev211210.topology.ZToAKey;
public class ServiceListTopology {
PortBuilder portBldr = new PortBuilder();
portBldr.setCircuitPackName(circuitPackName);
portBldr.setPortName(portName);
- org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev190531.resource.resource.resource
- .PortBuilder portCase =
- new org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev190531.resource.resource.resource
- .PortBuilder();
+ org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.resource.resource.resource
+ .PortBuilder portCase =
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.resource.resource.resource
+ .PortBuilder();
portCase.setPort(portBldr.build());
ResourceBuilder rsrcBldr = new ResourceBuilder();
rsrcBldr.setResource(portCase.build());
PortBuilder portBldr = new PortBuilder();
portBldr.setCircuitPackName(circuitPackName);
portBldr.setPortName(portName);
- org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev190531.resource.resource.resource
- .PortBuilder portCase =
- new org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev190531.resource.resource.resource
- .PortBuilder();
+ org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.resource.resource.resource
+ .PortBuilder portCase =
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.resource.rev211210.resource.resource.resource
+ .PortBuilder();
portCase.setPort(portBldr.build());
ResourceBuilder rsrcBldr = new ResourceBuilder();
rsrcBldr.setResource(portCase.build());
import com.google.common.util.concurrent.ListenableFuture;
import java.util.Collections;
+import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
import org.junit.Assert;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteInputBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.handler.header.ServiceHandlerHeaderBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
public class RendererServiceOperationsImplDeleteTest extends AbstractTest {
ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
.setServiceFormat(ServiceFormat.Ethernet)
.setServiceRate(Uint32.valueOf("100"))
- .setTxDirection(new TxDirectionBuilder().setPort(new PortBuilder().setPortName("port-name").build())
- .build())
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO),
+ new TxDirectionBuilder().setIndex(Uint8.ZERO).setPort(new PortBuilder().setPortName("port-name")
+ .build()).build()))
.setNodeId(new NodeIdType("optical-node1"))
.build();
Services service = new ServicesBuilder()
.setServiceAEnd(new ServiceAEndBuilder()
.setServiceFormat(ServiceFormat.Ethernet)
.setServiceRate(Uint32.valueOf(100))
- .setTxDirection(new TxDirectionBuilder().setPort(new PortBuilder().setPortName("port-name").build())
- .build())
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO),
+ new TxDirectionBuilder().setIndex(Uint8.ZERO).setPort(new PortBuilder().setPortName("port-name")
+ .build()).build()))
.setNodeId(new NodeIdType("optical-node1"))
.build())
.build();
ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
.setServiceFormat(ServiceFormat.Ethernet)
.setServiceRate(Uint32.valueOf("100"))
- .setTxDirection(new TxDirectionBuilder().setPort(new PortBuilder().setPortName("port-name").build())
- .build())
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO),
+ new TxDirectionBuilder().setIndex(Uint8.ZERO).setPort(new PortBuilder().setPortName("port-name")
+ .build()).build()))
.setNodeId(new NodeIdType("optical-node1"))
.build();
Services service = new ServicesBuilder()
ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
.setServiceFormat(ServiceFormat.Ethernet)
.setServiceRate(Uint32.valueOf("100"))
- .setTxDirection(new TxDirectionBuilder().setPort(new PortBuilder().setPortName("port-name").build())
- .build())
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO),
+ new TxDirectionBuilder().setIndex(Uint8.ZERO).setPort(new PortBuilder().setPortName("port-name")
+ .build()).build()))
.setNodeId(new NodeIdType("optical-node1"))
.build();
Services service = new ServicesBuilder()
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.service.implementation.request.input.ServiceAEndBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.service.implementation.request.input.ServiceZEndBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev200529.FrequencyTHz;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
import java.util.HashMap;
import java.util.Map;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev200529.FrequencyTHz;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
*/
package org.opendaylight.transportpce.servicehandler;
-import java.util.List;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.CoRoutingOrGeneral;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.CoRouting;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.CoRoutingBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.General;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.GeneralBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Diversity;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.DiversityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Exclude;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.ExcludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Include;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.IncludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.Latency;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraintsBuilder;
+import java.util.HashMap;
+import java.util.Map;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.CoRouting;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.CoRoutingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.Diversity;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.DiversityBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.Exclude;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.ExcludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.Include;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.IncludeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.Latency;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.LatencyBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co.routing.ServiceIdentifierList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co.routing.ServiceIdentifierListKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraintsBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public static SoftConstraints updateSoftConstraints(HardConstraints hardConstraints,
SoftConstraints softConstraints) {
SoftConstraintsBuilder softConstraintsBuilder = new SoftConstraintsBuilder(softConstraints);
- List<String> hardCustomerCode = hardConstraints.getCustomerCode();
- if (!hardCustomerCode.isEmpty()) {
- softConstraintsBuilder.getCustomerCode().addAll(hardCustomerCode);
- } else {
- LOG.warn("hard constraints customer code list is empty !");
+ if (hardConstraints.getCustomerCode() != null) {
+ if (!hardConstraints.getCustomerCode().isEmpty()) {
+ softConstraintsBuilder.getCustomerCode().addAll(hardConstraints.getCustomerCode());
+ }
}
- CoRoutingOrGeneral coRoutingOrGeneral = hardConstraints.getCoRoutingOrGeneral();
- if (coRoutingOrGeneral != null) {
- if (coRoutingOrGeneral instanceof General) {
- General hardGeneral = (General) coRoutingOrGeneral;
- if (softConstraintsBuilder.getCoRoutingOrGeneral() instanceof General) {
- General softGeneral = (General) softConstraintsBuilder.getCoRoutingOrGeneral();
- updateGeneral(hardGeneral, softGeneral);
- } else {
- softConstraintsBuilder.setCoRoutingOrGeneral(hardGeneral);
- }
- } else if (coRoutingOrGeneral instanceof CoRouting) {
- CoRouting hardCoRouting = (CoRouting) coRoutingOrGeneral;
- if (softConstraintsBuilder.getCoRoutingOrGeneral() instanceof CoRouting) {
- CoRouting softCoRouting = (CoRouting) softConstraintsBuilder.getCoRoutingOrGeneral();
- updateCoRouting(hardCoRouting, softCoRouting);
- } else {
- softConstraintsBuilder.setCoRoutingOrGeneral(hardCoRouting);
- }
+ if (hardConstraints.getOperationalMode() != null) {
+ if (!hardConstraints.getOperationalMode().isEmpty()) {
+ softConstraintsBuilder.getOperationalMode().addAll(hardConstraints.getOperationalMode());
}
- } else {
- LOG.warn("hard constraints CoRoutingOrGeneral is null !");
}
- return softConstraintsBuilder.build();
- }
-
- private static General updateGeneral(General hard, General soft) {
- GeneralBuilder result = new GeneralBuilder(soft);
- try {
- result.setDiversity(updateDiveristy(hard.getDiversity(), soft.getDiversity()));
- result.setExclude(updateExclude(hard.getExclude(), soft.getExclude()));
- result.setInclude(updateInclude(hard.getInclude(), soft.getInclude()));
- } catch (NullPointerException e) {
- LOG.warn("failed to update some 'General' parameters !", e);
+ if (hardConstraints.getDiversity() != null) {
+ if (softConstraints.getDiversity() != null) {
+ softConstraintsBuilder
+ .setDiversity(updateDiveristy(hardConstraints.getDiversity(), softConstraints.getDiversity()));
+ }
+ }
+ if (hardConstraints.getExclude() != null) {
+ if (softConstraints.getExclude() != null) {
+ softConstraintsBuilder
+ .setExclude(updateExclude(hardConstraints.getExclude(), softConstraints.getExclude()));
+ }
}
- return result.build();
+ if (hardConstraints.getInclude() != null) {
+ if (softConstraints.getInclude() != null) {
+ softConstraintsBuilder
+ .setInclude(updateInclude(hardConstraints.getInclude(), softConstraints.getInclude()));
+ }
+ }
+ if (hardConstraints.getLatency() != null) {
+ if (softConstraints.getLatency() != null) {
+ softConstraintsBuilder
+ .setLatency(updateLatency(hardConstraints.getLatency(), softConstraints.getLatency()));
+ }
+ }
+ if (hardConstraints.getCoRouting() != null) {
+ if (softConstraints.getCoRouting() != null) {
+ softConstraintsBuilder
+ .setCoRouting(updateCoRouting(hardConstraints.getCoRouting(), softConstraints.getCoRouting()));
+ }
+ }
+ return softConstraintsBuilder.build();
}
private static Include updateInclude(Include hard, Include soft) {
- IncludeBuilder result = new IncludeBuilder(soft);
- if (hard != null) {
- result.getFiberBundle().addAll(hard.getFiberBundle());
- result.getNodeId().addAll(hard.getNodeId());
- result.getSite().addAll(hard.getSite());
- result.getSupportingServiceName().addAll(hard.getSupportingServiceName());
- }
- return result.build();
+ IncludeBuilder includeBldr = new IncludeBuilder(soft);
+ includeBldr.getFiberBundle().addAll(hard.getFiberBundle());
+ includeBldr.getNodeId().addAll(hard.getNodeId());
+ includeBldr.getSite().addAll(hard.getSite());
+ includeBldr.getSupportingServiceName().addAll(hard.getSupportingServiceName());
+ return includeBldr.build();
}
private static Exclude updateExclude(Exclude hard, Exclude soft) {
- ExcludeBuilder result = new ExcludeBuilder(soft);
- if (hard != null) {
- result.getFiberBundle().addAll(hard.getFiberBundle());
- result.getNodeId().addAll(hard.getNodeId());
- result.getSite().addAll(hard.getSite());
- result.getSupportingServiceName().addAll(hard.getSupportingServiceName());
- }
- return result.build();
+ ExcludeBuilder excludeBldr = new ExcludeBuilder(soft);
+ excludeBldr.getFiberBundle().addAll(hard.getFiberBundle());
+ excludeBldr.getNodeId().addAll(hard.getNodeId());
+ excludeBldr.getSite().addAll(hard.getSite());
+ excludeBldr.getSupportingServiceName().addAll(hard.getSupportingServiceName());
+ return excludeBldr.build();
}
private static Diversity updateDiveristy(Diversity hard, Diversity soft) {
- DiversityBuilder result = new DiversityBuilder(soft);
- if (hard != null) {
- result.getExistingService().addAll(hard.getExistingService());
- result.setExistingServiceApplicability(hard.getExistingServiceApplicability());
+ DiversityBuilder diversityBldr = new DiversityBuilder(soft);
+ if (!hard.getServiceIdentifierList().isEmpty()) {
+ Map<org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.diversity.existing.service
+ .constraints.ServiceIdentifierListKey,
+ org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.diversity.existing.service
+ .constraints.ServiceIdentifierList> sil = new HashMap<>(diversityBldr.getServiceIdentifierList());
+ sil.putAll(hard.getServiceIdentifierList());
+ diversityBldr.setServiceIdentifierList(sil);
}
- return result.build();
+ return diversityBldr.build();
}
- private static CoRouting updateCoRouting(CoRouting hard, CoRouting soft) {
- CoRoutingBuilder result = new CoRoutingBuilder(soft);
- try {
- result.setCoRouting(
- updateCoCoRouting(hard.getCoRouting(), soft.getCoRouting()));
- } catch (NullPointerException e) {
- LOG.warn("failed to update some 'CoRouting' parameters !", e);
+ private static Latency updateLatency(Latency hard, Latency soft) {
+ LatencyBuilder latencyBldr = new LatencyBuilder(soft);
+ if (hard.getMaxLatency() != null) {
+ latencyBldr.setMaxLatency(hard.getMaxLatency());
}
- return result.build();
+ return latencyBldr.build();
}
- private static org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing
- .or.general.co.routing.CoRouting updateCoCoRouting(org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing.CoRouting hard, org.opendaylight
- .yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.co
- .routing.CoRouting soft) {
- org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general
- .co.routing.CoRoutingBuilder result = new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing.CoRoutingBuilder(soft);
- if (hard != null) {
- result.getExistingService().addAll(hard.getExistingService());
- }
- return result.build();
+ private static CoRouting updateCoRouting(CoRouting hard, CoRouting soft) {
+ CoRoutingBuilder coRoutingBldr = new CoRoutingBuilder(soft);
+ Map<ServiceIdentifierListKey, ServiceIdentifierList> serviceIdentifierList
+ = new HashMap<ServiceIdentifierListKey, ServiceIdentifierList>(coRoutingBldr.getServiceIdentifierList());
+ serviceIdentifierList.putAll(hard.getServiceIdentifierList());
+ return coRoutingBldr
+ .setServiceIdentifierList(serviceIdentifierList)
+ .build();
}
/**
*/
public static HardConstraints downgradeHardConstraints(HardConstraints hardConstraints) {
HardConstraintsBuilder hardConstraintsBuilder = new HardConstraintsBuilder();
- CoRoutingOrGeneral coRoutingOrGeneral = hardConstraints.getCoRoutingOrGeneral();
- Latency latency = null;
- if (coRoutingOrGeneral instanceof General) {
- General general = (General) coRoutingOrGeneral;
- if (general != null) {
- latency = general.getLatency();
- if (latency != null) {
- hardConstraintsBuilder.setCoRoutingOrGeneral(new GeneralBuilder().setLatency(latency).build());
- } else {
- LOG.warn("latency value not found in HardContraints !");
- }
- }
+ if (hardConstraints != null && hardConstraints.getLatency() != null) {
+ hardConstraintsBuilder.setLatency(hardConstraints.getLatency());
+ } else {
+ LOG.warn("latency value not found in HardContraints !");
}
return hardConstraintsBuilder.build();
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestInputBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.response.parameters.ResponseParametersBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.LifecycleState;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev190531.RpcStatus;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev181130.AdminStates;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU0;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU2;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU2e;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU3;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU4;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODUCn;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODUflexCbr;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODUflexFlexe;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODUflexGfp;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODUflexImp;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTU0;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTU1;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTU2;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTU2e;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTU3;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTU4;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTUCn;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTUflex;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OduRateIdentity;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OtuRateIdentity;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.response.parameters.ResponseParametersBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.LifecycleState;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU0;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU2;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU2e;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU3;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODUCn;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODUflexCbr;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODUflexFlexe;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODUflexGfp;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODUflexImp;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTU0;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTU1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTU2;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTU2e;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTU3;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTUCn;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTUflex;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OduRateIdentity;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OtuRateIdentity;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesKey;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirection;
.setNodeId(new NodeIdType(input.getServiceAEnd().getNodeId().getValue()).getValue())
.setTxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirectionBuilder()
- .setPort(input.getServiceAEnd().getTxDirection().getPort()).build())
+ .setPort(input.getServiceAEnd().getTxDirection().values().stream().findFirst().get().getPort())
+ .build())
.setRxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder()
- .setPort(input.getServiceAEnd().getRxDirection().getPort()).build());
+ .setPort(input.getServiceAEnd().getRxDirection().values().stream().findFirst().get().getPort())
+ .build());
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.service.implementation
.request.input.ServiceZEndBuilder serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.opendaylight
.transportpce.renderer.rev210915.service.implementation.request.input.ServiceZEndBuilder();
.setNodeId(new NodeIdType(input.getServiceZEnd().getNodeId().getValue()).getValue())
.setTxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirectionBuilder()
- .setPort(input.getServiceZEnd().getTxDirection().getPort()).build())
+ .setPort(input.getServiceZEnd().getTxDirection().values().stream().findFirst().get().getPort())
+ .build())
.setRxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder()
- .setPort(input.getServiceZEnd().getRxDirection().getPort()).build());
+ .setPort(input.getServiceZEnd().getRxDirection().values().stream().findFirst().get().getPort())
+ .build());
serviceImplementationRequestInputBuilder
.setServiceAEnd(serviceAEnd.build())
}
private static Class<? extends OduRateIdentity> getOduServiceRate(
- Class<? extends org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OduRateIdentity>
+ Class<? extends org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OduRateIdentity>
oduServiceRate) {
if (oduServiceRate == null) {
return null;
}
private static Class<? extends OtuRateIdentity> getOtuServiceRate(
- Class<? extends org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OtuRateIdentity>
+ Class<? extends org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OtuRateIdentity>
otuServiceRate) {
if (otuServiceRate == null) {
return null;
}
public static ServiceAEnd createServiceAEnd(org.opendaylight.yang.gen.v1
- .http.org.openroadm.common.service.types.rev190531.ServiceEndpoint serviceAEnd) {
+ .http.org.openroadm.common.service.types.rev211210.ServiceEndpoint serviceAEnd) {
ServiceAEndBuilder serviceAEndBuilder = new ServiceAEndBuilder()
.setClli(serviceAEnd.getClli())
.setNodeId(serviceAEnd.getNodeId().getValue())
- .setRxDirection(createRxDirection(serviceAEnd.getRxDirection()))
+ .setRxDirection(createRxDirection(serviceAEnd.getRxDirection().values().stream().findFirst().get()))
.setServiceFormat(serviceAEnd.getServiceFormat())
.setServiceRate(serviceAEnd.getServiceRate())
- .setTxDirection(createTxDirection(serviceAEnd.getTxDirection()));
+ .setTxDirection(createTxDirection(serviceAEnd.getTxDirection().values().stream().findFirst().get()));
return serviceAEndBuilder.build();
}
public static ServiceZEnd createServiceZEnd(org.opendaylight.yang.gen.v1
- .http.org.openroadm.common.service.types.rev190531.ServiceEndpoint serviceZEnd) {
+ .http.org.openroadm.common.service.types.rev211210.ServiceEndpoint serviceZEnd) {
ServiceZEndBuilder serviceZEndBuilder = new ServiceZEndBuilder()
.setClli(serviceZEnd.getClli())
.setNodeId(serviceZEnd.getNodeId().getValue())
- .setRxDirection(createRxDirection(serviceZEnd.getRxDirection()))
+ .setRxDirection(createRxDirection(serviceZEnd.getRxDirection().values().stream().findFirst().get()))
.setServiceFormat(serviceZEnd.getServiceFormat())
.setServiceRate(serviceZEnd.getServiceRate())
- .setTxDirection(createTxDirection(serviceZEnd.getTxDirection()));
+ .setTxDirection(createTxDirection(serviceZEnd.getTxDirection().values().stream().findFirst().get()));
return serviceZEndBuilder.build();
}
public static RxDirection createRxDirection(org.opendaylight.yang.gen.v1
- .http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection rxDirection) {
+ .http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirection rxDirection) {
RxDirectionBuilder rxDirectionBuilder = new RxDirectionBuilder().setPort(rxDirection.getPort());
return rxDirectionBuilder.build();
}
public static TxDirection createTxDirection(org.opendaylight.yang.gen.v1
- .http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection txDirection) {
+ .http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirection txDirection) {
TxDirectionBuilder txDirectionBuilder = new TxDirectionBuilder().setPort(txDirection.getPort());
return txDirectionBuilder.build();
}
}
public static ListenableFuture<RpcResult<ServiceReconfigureOutput>> createCreateServiceReply(
- ServiceReconfigureInput input, String message, RpcStatus rpcStatus) {
+ ServiceReconfigureInput input, String message) {
ServiceReconfigureOutputBuilder output = new ServiceReconfigureOutputBuilder()
- .setStatus(rpcStatus)
- .setStatusMessage(message);
+ .setConfigurationResponseCommon(new ConfigurationResponseCommonBuilder()
+ .setResponseMessage(message)
+ .build());
return RpcResultBuilder.success(output.build()).buildFuture();
}
public static ListenableFuture<RpcResult<ServiceRerouteOutput>> createRerouteServiceReply(ServiceRerouteInput input,
- String finalAckYes, String message, RpcStatus status) {
+ String finalAckYes, String message) {
ServiceRerouteOutputBuilder output = new ServiceRerouteOutputBuilder()
+ .setConfigurationResponseCommon(new ConfigurationResponseCommonBuilder()
+ .setResponseMessage(message)
+ .build())
.setHardConstraints(null)
- .setSoftConstraints(null)
- .setStatus(status)
- .setStatusMessage(message);
+ .setSoftConstraints(null);
return RpcResultBuilder.success(output.build()).buildFuture();
}
- public static ListenableFuture<RpcResult<ServiceRestorationOutput>> createRestoreServiceReply(String message,
- RpcStatus status) {
+ public static ListenableFuture<RpcResult<ServiceRestorationOutput>> createRestoreServiceReply(String message) {
ServiceRestorationOutputBuilder output = new ServiceRestorationOutputBuilder()
- .setStatus(status)
- .setStatusMessage(message);
+ .setConfigurationResponseCommon(new ConfigurationResponseCommonBuilder()
+ .setResponseMessage(message)
+ .build());
return RpcResultBuilder.success(output.build()).buildFuture();
}
public static Services mappingServices(ServiceCreateInput serviceCreateInput,
ServiceReconfigureInput serviceReconfigureInput) {
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd aend = null;
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEnd zend = null;
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd aend = null;
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEnd zend = null;
ServicesBuilder service = new ServicesBuilder();
if (serviceCreateInput != null) {
- aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceAEndBuilder(serviceCreateInput.getServiceAEnd()).build();
- zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceZEndBuilder(serviceCreateInput.getServiceZEnd()).build();
service.setServiceName(serviceCreateInput.getServiceName()).setAdministrativeState(AdminStates.OutOfService)
.setOperationalState(State.OutOfService).setCommonId(serviceCreateInput.getCommonId())
.setSdncRequestHeader(serviceCreateInput.getSdncRequestHeader())
.setLifecycleState(LifecycleState.Planned).setServiceAEnd(aend).setServiceZEnd(zend);
} else if (serviceReconfigureInput != null) {
- aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceAEndBuilder(serviceReconfigureInput.getServiceAEnd()).build();
- zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceZEndBuilder(serviceReconfigureInput.getServiceZEnd()).build();
service.setServiceName(serviceReconfigureInput.getServiceName())
.setAdministrativeState(AdminStates.OutOfService)
return service.build();
}
- public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list.Services
+ public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.Services
mappingServices(TempServiceCreateInput tempServiceCreateInput) {
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd aend = null;
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEnd zend = null;
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
- .ServicesBuilder service = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd aend = null;
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEnd zend = null;
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
+ .ServicesBuilder service = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp
.service.list.ServicesBuilder();
- aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceAEndBuilder(tempServiceCreateInput.getServiceAEnd()).build();
- zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceZEndBuilder(tempServiceCreateInput.getServiceZEnd()).build();
service.setServiceName(tempServiceCreateInput.getCommonId()).setAdministrativeState(AdminStates.OutOfService)
.setOperationalState(State.OutOfService).setCommonId(tempServiceCreateInput.getCommonId())
serviceAEnd.setServiceFormat(serviceInput.getServiceAEnd().getServiceFormat())
.setServiceRate(serviceInput.getServiceAEnd().getServiceRate())
.setClli(serviceInput.getServiceAEnd().getClli())
- .setNodeId(new NodeIdType(serviceInput.getServiceAEnd().getNodeId()).getValue())
+ .setNodeId(new NodeIdType(serviceInput.getServiceAEnd().getNodeId().getValue()).getValue())
.setTxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirectionBuilder()
- .setPort(serviceInput.getServiceAEnd().getTxDirection().getPort()).build())
+ .setPort(serviceInput.getServiceAEnd().getTxDirection().values().stream().findFirst().get()
+ .getPort())
+ .build())
.setRxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder()
- .setPort(serviceInput.getServiceAEnd().getRxDirection().getPort()).build());
+ .setPort(serviceInput.getServiceAEnd().getRxDirection().values().stream().findFirst().get()
+ .getPort())
+ .build());
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118
.service.path.ServiceZEndBuilder serviceZEnd =
new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118
serviceZEnd.setServiceFormat(serviceInput.getServiceZEnd().getServiceFormat())
.setServiceRate(serviceInput.getServiceZEnd().getServiceRate())
.setClli(serviceInput.getServiceZEnd().getClli())
- .setNodeId(new NodeIdType(serviceInput.getServiceZEnd().getNodeId()).getValue())
+ .setNodeId(new NodeIdType(serviceInput.getServiceZEnd().getNodeId().getValue()).getValue())
.setTxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirectionBuilder()
- .setPort(serviceInput.getServiceZEnd().getTxDirection().getPort()).build())
+ .setPort(serviceInput.getServiceZEnd().getTxDirection().values().stream().findFirst().get()
+ .getPort())
+ .build())
.setRxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder()
- .setPort(serviceInput.getServiceZEnd().getRxDirection().getPort()).build());
+ .setPort(serviceInput.getServiceZEnd().getRxDirection().values().stream().findFirst().get()
+ .getPort())
+ .build());
servicePathBuilder.setServiceAEnd(serviceAEnd.build());
servicePathBuilder.setServiceZEnd(serviceZEnd.build());
if (serviceInput.getHardConstraints() != null) {
*/
package org.opendaylight.transportpce.servicehandler;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceEndpoint;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeader;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceEndpoint;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeader;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceZEndBuilder;
/**
* Super class of {@link ServiceCreateInput} and {@link TempServiceCreateInput}.
return new TempServiceCreateInputBuilder().setCommonId(commonId)
.setConnectionType(connectionType).setSdncRequestHeader(sdncRequestHeader)
.setHardConstraints(hardConstraints).setSoftConstraints(softConstraints)
- .setServiceAEnd(new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service
+ .setServiceAEnd(new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service
.create.input.ServiceAEndBuilder(serviceAEnd).build())
- .setServiceZEnd(new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service
+ .setServiceZEnd(new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service
.create.input.ServiceZEndBuilder(serviceZEnd).build()).setCustomer(customer)
.setCustomerContact(customerContact).build();
}
import org.opendaylight.transportpce.servicehandler.validation.checks.ComplianceCheckResult;
import org.opendaylight.transportpce.servicehandler.validation.checks.ServicehandlerComplianceCheck;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev190531.RpcStatus;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.EquipmentNotificationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.EquipmentNotificationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.NetworkReOptimizationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.NetworkReOptimizationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateComplexResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateComplexResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteComplexResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteComplexResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckBulkInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckBulkOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteConfirmInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteConfirmOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReversionInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReversionOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRollInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRollOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.delete.input.ServiceDeleteReqInfo.TailRetention;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.delete.input.ServiceDeleteReqInfoBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddOpenroadmOperationalModesToCatalogInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddOpenroadmOperationalModesToCatalogOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddSpecificOperationalModesToCatalogInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddSpecificOperationalModesToCatalogOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.EquipmentNotificationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.EquipmentNotificationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.NetworkReOptimizationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.NetworkReOptimizationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OpticalTunnelCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OpticalTunnelCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OpticalTunnelRequestCancelInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OpticalTunnelRequestCancelOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateBulkInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateBulkOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateComplexResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateComplexResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteComplexResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteComplexResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckBulkInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckBulkOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureBulkInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureBulkOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteConfirmInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteConfirmOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteConfirmResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteConfirmResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReversionInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReversionOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReversionResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReversionResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRollInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRollOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRollResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRollResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceSrlgGetInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceSrlgGetOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateBulkInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateBulkOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfo.TailRetention;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationProcessService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationProcessServiceBuilder;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.notification.process.service.ServiceAEndBuilder;
LOG.warn(SERVICE_RECONFIGURE_MSG, LogMessages.serviceNotInDS(serviceName));
return ModelMappingUtils.createCreateServiceReply(
input,
- LogMessages.serviceNotInDS(serviceName), RpcStatus.Failed);
+ LogMessages.serviceNotInDS(serviceName));
}
LOG.debug("Service '{}' found in datastore", serviceName);
OperationResult validationResult = ServiceCreateValidation
LOG.warn(SERVICE_RECONFIGURE_MSG, LogMessages.ABORT_VALID_FAILED);
return ModelMappingUtils.createCreateServiceReply(
input,
- validationResult.getResultMessage(), RpcStatus.Failed);
+ validationResult.getResultMessage());
}
this.pceListenerImpl.setInput(new ServiceInput(input));
this.pceListenerImpl.setServiceReconfigure(true);
LOG.error(SERVICE_RECONFIGURE_MSG, LogMessages.RENDERER_DELETE_FAILED);
return ModelMappingUtils.createCreateServiceReply(
input,
- LogMessages.RENDERER_DELETE_FAILED, RpcStatus.Successful);
+ LogMessages.RENDERER_DELETE_FAILED);
//TODO check if RpcStatus.Successful is really expected here
}
LOG.info("RPC serviceReconfigure in progress...");
ConfigurationResponseCommon common = output.getConfigurationResponseCommon();
return ModelMappingUtils.createCreateServiceReply(
input,
- common.getResponseMessage(), RpcStatus.Successful);
+ common.getResponseMessage());
}
@Override
if (!servicesObject.isPresent()) {
LOG.warn(SERVICE_RESTORATION_MSG, LogMessages.serviceNotInDS(serviceName));
return ModelMappingUtils.createRestoreServiceReply(
- LogMessages.serviceNotInDS(serviceName), RpcStatus.Failed);
+ LogMessages.serviceNotInDS(serviceName));
}
Services service = servicesObject.get();
if (state == State.InService) {
LOG.error(SERVICE_RESTORATION_MSG, LogMessages.serviceInService(serviceName));
return ModelMappingUtils.createRestoreServiceReply(
- LogMessages.serviceInService(serviceName), RpcStatus.Failed);
+ LogMessages.serviceInService(serviceName));
}
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssxxx");
ServiceNotificationTypes.ServiceDeleteResult, null);
if (output == null) {
LOG.error(SERVICE_RESTORATION_MSG, LogMessages.RENDERER_DELETE_FAILED);
- return ModelMappingUtils.createRestoreServiceReply(
- LogMessages.RENDERER_DELETE_FAILED, RpcStatus.Failed);
+ return ModelMappingUtils.createRestoreServiceReply(LogMessages.RENDERER_DELETE_FAILED);
}
LOG.info("RPC serviceRestore in progress...");
ConfigurationResponseCommon common = output.getConfigurationResponseCommon();
- return ModelMappingUtils.createRestoreServiceReply(
- common.getResponseMessage(), RpcStatus.Successful);
+ return ModelMappingUtils.createRestoreServiceReply(common.getResponseMessage());
}
LOG.warn("serviceReroute: {}", LogMessages.serviceNotInDS(serviceName));
return ModelMappingUtils.createRerouteServiceReply(
input, ResponseCodes.FINAL_ACK_NO,
- LogMessages.serviceNotInDS(serviceName), RpcStatus.Failed);
+ LogMessages.serviceNotInDS(serviceName));
}
Services service = servicesObject.get();
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssxxx");
LOG.error("serviceReroute: {}", LogMessages.RENDERER_DELETE_FAILED);
return ModelMappingUtils.createRerouteServiceReply(
input, ResponseCodes.FINAL_ACK_YES,
- LogMessages.RENDERER_DELETE_FAILED, RpcStatus.Failed);
+ LogMessages.RENDERER_DELETE_FAILED);
}
LOG.info("RPC ServiceReroute in progress...");
ConfigurationResponseCommon common = output.getConfigurationResponseCommon();
return ModelMappingUtils.createRerouteServiceReply(
input, common.getAckFinalIndicator(),
- common.getResponseMessage(), RpcStatus.Successful);
+ common.getResponseMessage());
}
@Override
//Check presence of service to be deleted
LOG.debug("service common-id '{}' is compliant", commonId);
- Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list.Services>
+ Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.Services>
service =
this.serviceDataStoreOperations.getTempService(commonId);
if (service.isEmpty()) {
Thread.currentThread().interrupt();
}
}
+
+
+ @Override
+ public ListenableFuture<RpcResult<ServiceCreateBulkOutput>> serviceCreateBulk(ServiceCreateBulkInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<TempServiceCreateBulkOutput>> tempServiceCreateBulk(
+ TempServiceCreateBulkInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<ServiceRollResultNotificationRequestOutput>> serviceRollResultNotificationRequest(
+ ServiceRollResultNotificationRequestInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<ServiceReconfigureBulkOutput>> serviceReconfigureBulk(
+ ServiceReconfigureBulkInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<ServiceReconfigureResultNotificationRequestOutput>>
+ serviceReconfigureResultNotificationRequest(ServiceReconfigureResultNotificationRequestInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<ServiceRestorationResultNotificationRequestOutput>>
+ serviceRestorationResultNotificationRequest(ServiceRestorationResultNotificationRequestInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<ServiceReversionResultNotificationRequestOutput>>
+ serviceReversionResultNotificationRequest(ServiceReversionResultNotificationRequestInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<ServiceRerouteConfirmResultNotificationRequestOutput>>
+ serviceRerouteConfirmResultNotificationRequest(ServiceRerouteConfirmResultNotificationRequestInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<OpticalTunnelCreateOutput>> opticalTunnelCreate(OpticalTunnelCreateInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<OpticalTunnelRequestCancelOutput>> opticalTunnelRequestCancel(
+ OpticalTunnelRequestCancelInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<AddOpenroadmOperationalModesToCatalogOutput>>
+ addOpenroadmOperationalModesToCatalog(AddOpenroadmOperationalModesToCatalogInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<AddSpecificOperationalModesToCatalogOutput>> addSpecificOperationalModesToCatalog(
+ AddSpecificOperationalModesToCatalogInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ListenableFuture<RpcResult<ServiceSrlgGetOutput>> serviceSrlgGet(ServiceSrlgGetInput input) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmodel.rev201116.TransportpceNetworkmodelListener;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.TransportpcePceListener;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.TransportpceRendererListener;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceList;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.opendaylight.yangtools.concepts.ObjectRegistration;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmodel.rev201116.topology.update.result.TopologyChangesKey;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
}
services = serviceOptional.get();
OperationResult operationResult1 = null;
- if (org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State.InService
- .equals(services.getOperationalState())
- && !allElementsinPathinService(updatedAtoZ, updatedZtoA)) {
- LOG.debug("Service={} needs to be updated to outOfService", serviceName);
- operationResult1 = this.serviceDataStoreOperations.modifyService(serviceName, State.OutOfService,
- AdminStates.OutOfService);
- } else if (org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State.OutOfService
- .equals(services.getOperationalState())
- && allElementsinPathinService(updatedAtoZ, updatedZtoA)) {
- LOG.debug("Service={} needs to be updated to inService", serviceName);
- operationResult1 = this.serviceDataStoreOperations.modifyService(serviceName, State.InService,
- AdminStates.InService);
- } else {
- LOG.debug("Service {} state doesnt need to be modified", serviceName);
- }
- if (operationResult1 != null && operationResult1.isSuccess()) {
- LOG.info("Service state of {} correctly updated in datastore", serviceName);
+ switch (services.getOperationalState()) {
+ case InService:
+ if (!allElementsinPathinService(updatedAtoZ, updatedZtoA)) {
+ LOG.debug("Service={} needs to be updated to outOfService", serviceName);
+ //if (operationResult1 != null && operationResult1.isSuccess()) {
+ //null check probably no more needed
+ if (this.serviceDataStoreOperations
+ .modifyService(serviceName, State.OutOfService, AdminStates.OutOfService)
+ .isSuccess()) {
+ LOG.info("Service state of {} correctly updated to outOfService in datastore", serviceName);
+ continue;
+ } else {
+ LOG.error("Service state of {} cannot be updated to outOfService in datastore",
+ serviceName);
+ }
+ }
+ break;
+ case OutOfService:
+ if (allElementsinPathinService(updatedAtoZ, updatedZtoA)) {
+ LOG.debug("Service={} needs to be updated to inService", serviceName);
+ //if (operationResult1 != null && operationResult1.isSuccess()) {
+ //null check probably no more needed
+ if (this.serviceDataStoreOperations
+ .modifyService(serviceName, State.InService, AdminStates.InService)
+ .isSuccess()) {
+ LOG.info("Service state of {} correctly updated to inService in datastore", serviceName);
+ continue;
+ } else {
+ LOG.error("Service state of {} cannot be updated to inService in datastore", serviceName);
+ }
+ }
+ break;
+ default:
+ LOG.warn("Service {} state not managed", serviceName);
+ continue;
}
+ LOG.debug("Service {} state does not need to be modified", serviceName);
}
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.service.path.rpc.result.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.service.path.rpc.result.PathDescriptionBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.RpcStatusEx;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.response.parameters.sp.ResponseParameters;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.response.parameters.sp.ResponseParametersBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.renderer.rpc.result.sp.Link;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultSh;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultShBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev220123.OtnLinkType;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationProcessService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationProcessServiceBuilder;
sendNbiNotification(nbiNotificationBuilder
.setResponseFailed("")
.setMessage("Service implemented !")
- .setOperationalState(org.opendaylight.yang.gen.v1.http
- .org.openroadm.common.state.types.rev181130.State.InService)
+ .setOperationalState(State.InService)
.build());
if (!tempService) {
sendServiceHandlerNotification(notification, ServiceNotificationTypes.ServiceCreateResult);
sendNbiNotification(nbiNotificationBuilder
.setResponseFailed(serviceTemp + "Service status not updated in datastore !")
.setMessage("ServiceCreate request failed ...")
- .setOperationalState(org.opendaylight.yang.gen.v1.http
- .org.openroadm.common.state.types.rev181130.State.OutOfService)
+ .setOperationalState(State.OutOfService)
.build());
}
}
import org.opendaylight.mdsal.binding.api.DataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataTreeModification;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationAlarmService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationAlarmServiceBuilder;
import org.slf4j.Logger;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutputBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultSh;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultShBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceEndpoint;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeader;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceEndpoint;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeader;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.PceMetric;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.RpcStatusEx;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.response.parameters.sp.ResponseParameters;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteOutputBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultSh;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultShBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.RpcStatusEx;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.handler.header.ServiceHandlerHeader;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.handler.header.ServiceHandlerHeaderBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceList;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.path.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
* unique common-id of the service
* @return Optional of Services
*/
- Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services> getTempService(String commonId);
/**
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceList;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceListBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceList;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceListBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceListBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceListBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesKey;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.path.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
}
@Override
- public Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list.Services>
+ public Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.Services>
getTempService(String serviceName) {
try {
ReadTransaction readTx = this.dataBroker.newReadOnlyTransaction();
- InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
- .Services> iid = InstanceIdentifier.create(TempServiceList.class).child(org.opendaylight.yang.gen.v1
- .http.org.openroadm.service.rev190531.temp.service.list.Services.class,
- new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
- .ServicesKey(serviceName));
- Future<java.util.Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531
- .temp.service.list.Services>> future = readTx.read(LogicalDatastoreType.OPERATIONAL, iid);
+ InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
+ .Services> iid = InstanceIdentifier.create(TempServiceList.class).child(
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.Services.class,
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.ServicesKey(
+ serviceName));
+ FluentFuture<Optional<
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.Services>> future
+ = readTx.read(LogicalDatastoreType.OPERATIONAL, iid);
return future.get(Timeouts.DATASTORE_READ, TimeUnit.MILLISECONDS);
} catch (InterruptedException | ExecutionException | TimeoutException e) {
LOG.warn("Reading service {} failed:", serviceName, e);
LOG.debug(DELETING_SERVICE_MSG, commonId);
try {
WriteTransaction writeTx = this.dataBroker.newWriteOnlyTransaction();
- InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services> iid = InstanceIdentifier.create(TempServiceList.class).child(org.opendaylight.yang.gen.v1
- .http.org.openroadm.service.rev190531.temp.service.list.Services.class,
- new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ .http.org.openroadm.service.rev211210.temp.service.list.Services.class,
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.ServicesKey(commonId));
writeTx.delete(LogicalDatastoreType.OPERATIONAL, iid);
writeTx.commit().get(Timeouts.DATASTORE_DELETE, TimeUnit.MILLISECONDS);
InstanceIdentifier<Services> iid = InstanceIdentifier.create(ServiceList.class)
.child(Services.class, new ServicesKey(serviceName));
Services services = new ServicesBuilder(readService.get())
- .setOperationalState(convertOperState(operationalState))
- .setAdministrativeState(convertAdminState(administrativeState))
+ .setOperationalState(operationalState)
+ .setAdministrativeState(administrativeState)
.build();
writeTx.merge(LogicalDatastoreType.OPERATIONAL, iid, services);
writeTx.commit().get(Timeouts.DATASTORE_WRITE, TimeUnit.MILLISECONDS);
public OperationResult modifyTempService(String serviceName, State operationalState,
AdminStates administrativeState) {
LOG.debug("Modifying '{}' Temp Service", serviceName);
- Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services> readService = getTempService(serviceName);
if (!readService.isPresent()) {
LOG.warn("modifyTempService: {}", LogMessages.SERVICE_NOT_FOUND);
}
try {
WriteTransaction writeTx = this.dataBroker.newWriteOnlyTransaction();
- InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services> iid = InstanceIdentifier.create(TempServiceList.class)
- .child(org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
- .Services.class, new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531
+ .child(org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
+ .Services.class, new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210
.temp.service.list.ServicesKey(serviceName));
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list.Services services =
- new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list.ServicesBuilder(
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.Services services =
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.ServicesBuilder(
readService.get())
- .setOperationalState(convertOperState(operationalState))
- .setAdministrativeState(convertAdminState(administrativeState))
+ .setOperationalState(operationalState)
+ .setAdministrativeState(administrativeState)
.build();
writeTx.merge(LogicalDatastoreType.OPERATIONAL, iid, services);
writeTx.commit().get(Timeouts.DATASTORE_WRITE, TimeUnit.MILLISECONDS);
public OperationResult createTempService(TempServiceCreateInput tempServiceCreateInput) {
LOG.debug("Writing '{}' Temp Service", tempServiceCreateInput.getCommonId());
try {
- InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ InstanceIdentifier<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services> iid = InstanceIdentifier.create(TempServiceList.class)
- .child(org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
- .Services.class, new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp
+ .child(org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
+ .Services.class, new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp
.service.list.ServicesKey(tempServiceCreateInput.getCommonId()));
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services service = ModelMappingUtils.mappingServices(tempServiceCreateInput);
WriteTransaction writeTx = this.dataBroker.newWriteOnlyTransaction();
writeTx.put(LogicalDatastoreType.OPERATIONAL, iid, service);
switch (choice) {
case 0 : /* Modify. */
LOG.debug("Modifying '{}' Service", serviceName);
- service.setOperationalState(convertOperState(State.InService))
- .setAdministrativeState(convertAdminState(AdminStates.InService));
+ service.setOperationalState(State.InService)
+ .setAdministrativeState(AdminStates.InService);
writeTx.merge(LogicalDatastoreType.OPERATIONAL, iid, service.build());
action = "modifyService";
break;
return null;
}
-
- private org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev181130.AdminStates
- convertAdminState(AdminStates adminState61) {
- return org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev181130.AdminStates
- .valueOf(adminState61.name());
- }
-
- private org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State
- convertOperState(State operState61) {
- return org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State
- .valueOf(operState61.name());
- }
}
import org.opendaylight.transportpce.servicehandler.validation.checks.ComplianceCheckResult;
import org.opendaylight.transportpce.servicehandler.validation.checks.ServicehandlerComplianceCheck;
import org.opendaylight.transportpce.servicehandler.validation.checks.ServicehandlerTxRxCheck;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeader;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package org.opendaylight.transportpce.servicehandler.validation.checks;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
*/
package org.opendaylight.transportpce.servicehandler.validation.checks;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeader;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeader;
/**
* Class for checking service sdnc-request-header compliance.
package org.opendaylight.transportpce.servicehandler.validation.checks;
import org.opendaylight.transportpce.servicehandler.ServiceEndpointType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceEndpoint;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceEndpoint;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
/**
* Class for checking missing info on Tx/Rx for A/Z end.
public static final class LogMessages {
private static final String SERVICE = "Service ";
- public static final String TXDIR_NOT_SET;
+ public static final String TXRXDIR_NOT_SET;
public static final String TXDIR_PORT_NOT_SET;
public static final String TXDIR_LGX_NOT_SET;
- public static final String RXDIR_NOT_SET;
public static final String RXDIR_PORT_NOT_SET;
public static final String RXDIR_LGX_NOT_SET;
// Static blocks are generated once and spare memory.
static {
- TXDIR_NOT_SET = "Service TxDirection is not correctly set";
- RXDIR_NOT_SET = "Service RxDirection is not correctly set";
+ TXRXDIR_NOT_SET = "Service TxDirection or RxDirection is not correctly set";
TXDIR_PORT_NOT_SET = "Service TxDirection Port is not correctly set";
TXDIR_LGX_NOT_SET = "Service TxDirection Lgx is not correctly set";
RXDIR_PORT_NOT_SET = "Service RxDirection Port is not correctly set";
return (value != null && !value.isEmpty());
}
-
/**
* Check Compliance of Service TxRx info.
* @param serviceEnd Service Endpoint
if (!checkString(clli)) {
return new ComplianceCheckResult(false, LogMessages.clliNotSet(endpointType));
}
-
+ if (serviceEnd.getTxDirection() == null || serviceEnd.getRxDirection() == null) {
+ return new ComplianceCheckResult(false, LogMessages.TXRXDIR_NOT_SET);
+ }
return new ComplianceCheckResult(true, "");
}
</bean>
<service ref="serviceHandlerImpl"
- interface="org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService"/>
+ interface="org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService"/>
<service ref="serviceDatastoreOperation"
interface="org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations"/>
package org.opendaylight.transportpce.servicehandler;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
import static org.opendaylight.transportpce.servicehandler.utils.ConstraintsUtils.buildHardConstraintWithCoRouting;
-import static org.opendaylight.transportpce.servicehandler.utils.ConstraintsUtils.buildHardConstraintWithGeneral;
-import static org.opendaylight.transportpce.servicehandler.utils.ConstraintsUtils.buildHardConstraintWithNullGeneral;
import static org.opendaylight.transportpce.servicehandler.utils.ConstraintsUtils.buildSoftConstraintWithCoRouting;
-import static org.opendaylight.transportpce.servicehandler.utils.ConstraintsUtils.buildSoftConstraintWithGeneral;
import org.junit.Test;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.CoRouting;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.General;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
/**
* Class to test downgrading and updating Constraints .
SoftConstraints initialSoftConstraints = buildSoftConstraintWithCoRouting();
SoftConstraints generatedSoftConstraints = DowngradeConstraints.updateSoftConstraints(
initialHardConstraints, initialSoftConstraints);
-
- assertEquals(
- generatedSoftConstraints.getCustomerCode().get(0),
- initialHardConstraints.getCustomerCode().get(0));
- assertEquals(
- ((CoRouting)generatedSoftConstraints.getCoRoutingOrGeneral())
- .getCoRouting().getExistingService().get(0),
- ((CoRouting)initialHardConstraints.getCoRoutingOrGeneral())
- .getCoRouting().getExistingService().get(0));
- }
-
- @Test
- public void testUpdateSoftConstraintsBothGeneral() {
- HardConstraints initialHardConstraints = buildHardConstraintWithGeneral();
- SoftConstraints initialSoftConstraints = buildSoftConstraintWithGeneral();
- SoftConstraints generatedSoftConstraints = DowngradeConstraints.updateSoftConstraints(
- initialHardConstraints, initialSoftConstraints);
-
- assertEquals(
- generatedSoftConstraints.getCustomerCode().get(0),
- initialHardConstraints.getCustomerCode().get(0));
- assertEquals(
- ((General)generatedSoftConstraints.getCoRoutingOrGeneral())
- .getDiversity().getExistingService().get(0),
- ((General)initialHardConstraints.getCoRoutingOrGeneral())
- .getDiversity().getExistingService().get(0));
-
- assertEquals(
- ((General)generatedSoftConstraints.getCoRoutingOrGeneral())
- .getExclude().getSupportingServiceName().get(0),
- ((General)initialHardConstraints.getCoRoutingOrGeneral())
- .getExclude().getSupportingServiceName().get(0));
- assertEquals(
- ((General)generatedSoftConstraints.getCoRoutingOrGeneral())
- .getExclude().getNodeId(),
- ((General)initialHardConstraints.getCoRoutingOrGeneral())
- .getExclude().getNodeId());
- assertEquals(
- ((General)generatedSoftConstraints.getCoRoutingOrGeneral())
- .getInclude().getSupportingServiceName().get(0),
- ((General)initialHardConstraints.getCoRoutingOrGeneral())
- .getInclude().getSupportingServiceName().get(0));
-
- assertEquals(
- ((General)generatedSoftConstraints.getCoRoutingOrGeneral())
- .getInclude().getNodeId(),
- ((General)initialHardConstraints.getCoRoutingOrGeneral())
- .getInclude().getNodeId());
- }
-
- @Test
- public void testUpdateSoftConstraintsHardGeneralAndSoftCoRouting() {
- HardConstraints initialHardConstraints = buildHardConstraintWithGeneral();
- SoftConstraints initialSoftConstraints = buildSoftConstraintWithCoRouting();
-
-
- SoftConstraints generatedSoftConstraints = DowngradeConstraints.updateSoftConstraints(
- initialHardConstraints, initialSoftConstraints);
-
- assertEquals(
- generatedSoftConstraints.getCustomerCode().get(0),
- initialHardConstraints.getCustomerCode().get(0));
- assertTrue(
- generatedSoftConstraints.getCoRoutingOrGeneral() instanceof General);
-
-
- }
-
-
- @Test
- public void testUpdateSoftConstraintsHardCoRoutingAndSoftCoGeneral() {
- HardConstraints initialHardConstraints = buildHardConstraintWithCoRouting();
- SoftConstraints initialSoftConstraints = buildSoftConstraintWithGeneral();
-
-
- SoftConstraints generatedSoftConstraints = DowngradeConstraints.updateSoftConstraints(
- initialHardConstraints, initialSoftConstraints);
-
- assertEquals(
- generatedSoftConstraints.getCustomerCode().get(0),
- initialHardConstraints.getCustomerCode().get(0));
- assertTrue(
- generatedSoftConstraints.getCoRoutingOrGeneral() instanceof CoRouting);
-
- }
-
- @Test
- public void testDowngradeHardConstraintsWithHardGeneralConstraintsSuccess() {
- HardConstraints initialHardConstraints =
- buildHardConstraintWithGeneral();
-
-
- HardConstraints generatedHardConstraints =
- DowngradeConstraints.downgradeHardConstraints(initialHardConstraints);
-
- assertTrue(generatedHardConstraints.getCoRoutingOrGeneral() instanceof General);
-
- assertNotNull((General)generatedHardConstraints.getCoRoutingOrGeneral());
-
- assertEquals(
- ((General) generatedHardConstraints.getCoRoutingOrGeneral()).getLatency().getMaxLatency(),
- ((General) initialHardConstraints.getCoRoutingOrGeneral()).getLatency().getMaxLatency());
-
- }
-
- @Test
- public void testDowngradeHardConstraintsWithNullGeneralHardConstraints() {
- HardConstraints initialHardConstraints =
- buildHardConstraintWithNullGeneral();
-
- HardConstraints generatedHardConstraints =
- DowngradeConstraints.downgradeHardConstraints(initialHardConstraints);
-
- assertNull(generatedHardConstraints.getCoRoutingOrGeneral());
-
- }
-
- @Test
- public void testDowngradeHardConstraintsWithHardCoRoutingConstraints() {
- HardConstraints initialHardConstraints =
- buildHardConstraintWithCoRouting();
-
- HardConstraints generatedHardConstraints =
- DowngradeConstraints.downgradeHardConstraints(initialHardConstraints);
-
- assertNull(generatedHardConstraints.getCoRoutingOrGeneral());
-
- }
-
-
- @Test
- public void testConvertToSoftConstraintsFromGeneralHardSuccess() {
- HardConstraints initialHardConstraints = buildHardConstraintWithGeneral();
-
-
- SoftConstraints generatedSoftConstraints =
- DowngradeConstraints.convertToSoftConstraints(initialHardConstraints);
-
- assertEquals(
- generatedSoftConstraints.getCustomerCode().get(0),
- initialHardConstraints.getCustomerCode().get(0));
- assertTrue(
- generatedSoftConstraints.getCoRoutingOrGeneral() instanceof General);
-
- assertEquals(
- ((General)generatedSoftConstraints.getCoRoutingOrGeneral())
- .getDiversity().getExistingService().get(0),
- ((General)initialHardConstraints.getCoRoutingOrGeneral())
- .getDiversity().getExistingService().get(0));
-
- }
-
- @Test
- public void testConvertToSoftConstraintsFromCoRoutingHardSuccess() {
- HardConstraints initialHardConstraints = buildHardConstraintWithCoRouting();
-
-
- SoftConstraints generatedSoftConstraints =
- DowngradeConstraints.convertToSoftConstraints(initialHardConstraints);
-
assertEquals(
generatedSoftConstraints.getCustomerCode().get(0),
initialHardConstraints.getCustomerCode().get(0));
- assertTrue(
- generatedSoftConstraints.getCoRoutingOrGeneral() instanceof CoRouting);
-
- assertEquals(
- ((CoRouting)generatedSoftConstraints.getCoRoutingOrGeneral())
- .getCoRouting().getExistingService().get(0),
- ((CoRouting)initialHardConstraints.getCoRoutingOrGeneral())
- .getCoRouting().getExistingService().get(0));
-
- }
-
- @Test
- public void testConvertToSoftConstraintsFromHardNull() {
- HardConstraints initialHardConstraints = buildHardConstraintWithNullGeneral();
-
- SoftConstraints generatedSoftConstraints =
- DowngradeConstraints.convertToSoftConstraints(initialHardConstraints);
-
- assertNull(generatedSoftConstraints.getCoRoutingOrGeneral());
-
}
-
}
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
+import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev190531.RpcStatus;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.CoRoutingBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.CoRoutingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co.routing.ServiceIdentifierListBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesKey;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.response.parameters.sp.ResponseParameters;
.setServiceAEnd(ServiceDataUtils.getServiceAEndBuildReconfigure().build())
.setServiceZEnd(ServiceDataUtils.getServiceZEndBuildReconfigure().build())
.setHardConstraints(new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing
- .CoRoutingBuilder().setExistingService(
- Arrays.asList("Some existing-service")).build())
- .build())
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .build())
- .setSoftConstraints(new SoftConstraintsBuilder()
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing
- .CoRoutingBuilder().setExistingService(
- Arrays.asList("Some existing-service")).build())
- .build())
- .setCustomerCode(Arrays.asList("Some customer-code"))
- .build())
- .build();
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service")
+ .build()))
+ .build())
+ .build())
+ .setSoftConstraints(new SoftConstraintsBuilder()
+ .setCustomerCode(Arrays.asList("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service")
+ .build()))
+ .build())
+ .build())
+ .build();
}
private PathComputationRequestOutput buildPathComputationOutput() {
@Test
public void testCreateRestoreServiceReply() throws ExecutionException, InterruptedException {
ListenableFuture<RpcResult<ServiceRestorationOutput>> serviceRestorationOutputF =
- ModelMappingUtils.createRestoreServiceReply("message", RpcStatus.Failed);
+ ModelMappingUtils.createRestoreServiceReply("message");
serviceRestorationOutputF.addListener(new Runnable() {
@Override
public void run() {
}, executorService);
endSignal.await();
- RpcResult<ServiceRestorationOutput> serviceRestorationOutput = serviceRestorationOutputF.get();
- Assert.assertEquals("message", serviceRestorationOutput.getResult().getStatusMessage());
}
}
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperationsImpl;
import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev190531.RpcStatus;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.delete.input.ServiceDeleteReqInfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfoBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
public class ServicehandlerImplTest extends AbstractTest {
}, executorService);
endSignal.await();
-
- RpcResult<ServiceReconfigureOutput> rpcResult = result.get();
- Assert.assertEquals(
- RpcStatus.Failed, rpcResult.getResult().getStatus());
}
}, executorService);
endSignal.await();
-
- RpcResult<ServiceReconfigureOutput> rpcResult = result.get();
- //ServiceReconfigureOutput doesn't have ConfigurationResponseCommon but have RpcStatus directly
- Assert.assertEquals(
- RpcStatus.Failed, rpcResult.getResult().getStatus());
}
@Test
}, executorService);
endSignal.await();
-
- RpcResult<ServiceReconfigureOutput> rpcResult = result.get();
- Assert.assertEquals(
- RpcStatus.Successful, rpcResult.getResult().getStatus());
}
@Test
}, executorService);
endSignal.await();
-
- RpcResult<ServiceRestorationOutput> rpcResult = result.get();
- Assert.assertEquals(
- RpcStatus.Failed, rpcResult.getResult().getStatus());
}
}, executorService);
endSignal.await();
-
- RpcResult<ServiceRestorationOutput> rpcResult = result.get();
- //ServiceRestorationOutput doesn't have ConfigurationResponseCommon but have RpcStatus directly
- Assert.assertEquals(
- RpcStatus.Failed, rpcResult.getResult().getStatus());
}
@Test
}, executorService);
endSignal.await();
-
- RpcResult<ServiceRestorationOutput> rpcResult = result.get();
- Assert.assertEquals(
- RpcStatus.Successful, rpcResult.getResult().getStatus());
}
@Test
}, executorService);
endSignal.await();
-
- RpcResult<ServiceRerouteOutput> rpcResult = result.get();
- Assert.assertEquals(
- RpcStatus.Failed, rpcResult.getResult().getStatus());
}
@Test
}, executorService);
endSignal.await();
-
- RpcResult<ServiceRerouteOutput> rpcResult = result.get();
- //ServiceRerouteOutput doesn't have ConfigurationResponseCommon but have RpcStatus directly
- Assert.assertEquals(
- RpcStatus.Failed, rpcResult.getResult().getStatus());
}
@Test
}, executorService);
endSignal.await();
-
- RpcResult<ServiceRerouteOutput> rpcResult = result.get();
- Assert.assertEquals(
- RpcStatus.Successful, rpcResult.getResult().getStatus());
}
@Test
import java.util.Collection;
import java.util.HashSet;
+import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.opendaylight.mdsal.binding.api.DataObjectModification;
import org.opendaylight.mdsal.binding.api.DataTreeModification;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEnd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.LgxBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev181130.AdminStates;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.lgx.LgxBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesBuilder;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationAlarmService;
import org.opendaylight.yang.gen.v1.nbi.notifications.rev210813.PublishNotificationAlarmServiceBuilder;
import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
@RunWith(MockitoJUnitRunner.StrictStubs.class)
public class ServiceListenerTest {
.setServiceFormat(ServiceFormat.OC)
.setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection())
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()))
.build();
ServicesBuilder builtInput = new ServicesBuilder()
.setCommonId("commonId")
.setServiceFormat(ServiceFormat.OC)
.setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection());
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()));
}
private TxDirection getTxDirection() {
.setLgxPortRack("lgx port rack")
.setLgxPortShelf("lgx port shelf")
.build())
+ .setIndex(Uint8.ZERO)
.build();
}
.setLgxPortRack("lgx port rack")
.setLgxPortShelf("lgx port shelf")
.build())
+ .setIndex(Uint8.ZERO)
.build();
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInputBuilder;
public class PCEServiceWrapperTest extends AbstractTest {
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteInputBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInputBuilder;
/**
* Test RendererServiceWrapper class.
import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220118.PathComputationRequestOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.response.parameters.sp.ResponseParameters;
@Test
public void getTempServiceFromEmptyDataStoreShouldBeEmpty() {
- Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services> optService = this.serviceDataStoreOperations.getTempService("service 1");
Assert.assertFalse(optService.isPresent());
}
TempServiceCreateInput createInput = ServiceDataUtils.buildTempServiceCreateInput();
this.serviceDataStoreOperations.createTempService(createInput);
- Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services> optService = this.serviceDataStoreOperations.getTempService(createInput.getCommonId());
Assert.assertTrue(optService.isPresent());
Assert.assertEquals(createInput.getCommonId(), optService.get().getCommonId());
import java.util.ArrayList;
import java.util.Collections;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.CoRoutingBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.GeneralBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.DiversityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.ExcludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.IncludeBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.general.LatencyBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.diversity.existing.service.constraints.ExistingServiceApplicabilityBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraintsBuilder;
-import org.opendaylight.yangtools.yang.common.Uint32;
+import java.util.Map;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.CoRoutingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co.routing.ServiceIdentifierList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co.routing.ServiceIdentifierListBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.equipment.EquipmentBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.service.applicability.g.ServiceApplicabilityBuilder;
/**
* Utility Class to Build Hard Constraints and Soft Constraints.
}
public static SoftConstraints buildSoftConstraintWithCoRouting() {
- return new SoftConstraintsBuilder()
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing
- .CoRoutingBuilder().setExistingService(
- new ArrayList<>(Collections.singletonList("existing-service 1"))).build())
+ ServiceIdentifierList sil = new ServiceIdentifierListBuilder()
+ .setServiceIdentifier("service-id-soft")
+ .setServiceApplicability(new ServiceApplicabilityBuilder()
+ .setEquipment(new EquipmentBuilder()
+ .setRoadmSrg(true)
.build())
- .setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
- .build();
+ .build())
+ .build();
+ return new SoftConstraintsBuilder()
+ .setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(sil.key(), sil))
+ .build())
+ .build();
}
public static HardConstraints buildHardConstraintWithCoRouting() {
- return new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing
- .CoRoutingBuilder().setExistingService(
- new ArrayList<>(Collections.singletonList("existing-service 1"))).build())
- .build())
- .setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
- .build();
- }
-
- public static HardConstraints buildHardConstraintWithGeneral() {
- return new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(new GeneralBuilder()
- .setExclude(new ExcludeBuilder()
- .setNodeId(
- new ArrayList<>(Collections.singletonList(new NodeIdType("Ex-Node-Id-1"))))
- .setFiberBundle(
- new ArrayList<>(Collections.singletonList("Ex-Fiber-Bundle 1")))
- .setSite(
- new ArrayList<>(Collections.singletonList("Ex-site 1")))
- .setSupportingServiceName(
- new ArrayList<>(Collections.singletonList("Ex-supporting-Service 1")))
- .build())
- .setInclude(new IncludeBuilder()
- .setNodeId(
- new ArrayList<>(Collections.singletonList(new NodeIdType("Inc-Node-Id-1"))))
- .setFiberBundle(
- new ArrayList<>(Collections.singletonList("Inc-Fiber-Bundle 1")))
- .setSite(new ArrayList<>(Collections.singletonList("Inc-site 1")))
- .setSupportingServiceName(
- new ArrayList<>(Collections.singletonList("Inc-supporting-Service-name 1")))
- .build())
- .setDiversity(new DiversityBuilder()
- .setExistingService(
- new ArrayList<>(Collections.singletonList("div-existing-service 1")))
- .setExistingServiceApplicability(new ExistingServiceApplicabilityBuilder()
- .setNode(Boolean.TRUE)
- .setSite(Boolean.TRUE)
- .setSrlg(Boolean.TRUE)
- .build())
- .build())
- .setLatency(new LatencyBuilder().setMaxLatency(Uint32.valueOf(1)).build())
+ ServiceIdentifierList sil = new ServiceIdentifierListBuilder()
+ .setServiceIdentifier("service-id-hard")
+ .setServiceApplicability(new ServiceApplicabilityBuilder()
+ .setEquipment(new EquipmentBuilder()
+ .setRoadmSrg(true)
.build())
- .setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
- .build();
- }
-
- public static HardConstraints buildHardConstraintWithNullGeneral() {
+ .build())
+ .build();
return new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(null)
- .setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
- .build();
- }
-
- public static SoftConstraints buildSoftConstraintWithGeneral() {
- return new SoftConstraintsBuilder()
- .setCoRoutingOrGeneral(new GeneralBuilder()
- .setExclude(new ExcludeBuilder()
- .setNodeId(new ArrayList<>())
- .setFiberBundle(new ArrayList<>())
- .setSite(new ArrayList<>())
- .setSupportingServiceName(new ArrayList<>())
- .build())
- .setInclude(new IncludeBuilder()
- .setNodeId(new ArrayList<>())
- .setFiberBundle(new ArrayList<>())
- .setSite(new ArrayList<>())
- .setSupportingServiceName(new ArrayList<>())
- .build())
- .setDiversity(new DiversityBuilder()
- .setExistingService(new ArrayList<>())
- .setExistingServiceApplicability(new ExistingServiceApplicabilityBuilder()
- .build())
- .build())
- .build())
- .setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
- .build();
-
+ .setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(sil.key(), sil))
+ .build())
+ .build();
}
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceImplementationRequestInputBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.response.parameters.ResponseParametersBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.LifecycleState;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev190531.RpcStatus;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev181130.AdminStates;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceEndpoint;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.response.parameters.ResponseParametersBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.LifecycleState;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirection;
.setNodeId(input.getServiceAEnd().getNodeId().getValue())
.setTxDirection(new org.opendaylight.yang.gen.v1.http
.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirectionBuilder()
- .setPort(input.getServiceAEnd().getTxDirection().getPort()).build())
+ .setPort(input.getServiceAEnd().getTxDirection().values().stream().findFirst().get().getPort())
+ .build())
.setRxDirection(new org.opendaylight.yang.gen.v1.http
.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder()
- .setPort(input.getServiceAEnd().getRxDirection().getPort()).build());
+ .setPort(input.getServiceAEnd().getRxDirection().values().stream().findFirst().get().getPort())
+ .build());
org.opendaylight.yang.gen.v1.http
.org.opendaylight.transportpce.renderer.rev210915.service.implementation.request.input.ServiceZEndBuilder
serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915
.setNodeId(input.getServiceZEnd().getNodeId().getValue())
.setTxDirection(new org.opendaylight.yang.gen.v1.http
.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirectionBuilder()
- .setPort(input.getServiceZEnd().getTxDirection().getPort()).build())
+ .setPort(input.getServiceZEnd().getTxDirection().values().stream().findFirst().get().getPort())
+ .build())
.setRxDirection(new org.opendaylight.yang.gen.v1.http
.org.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder()
- .setPort(input.getServiceZEnd().getRxDirection().getPort()).build());
+ .setPort(input.getServiceZEnd().getRxDirection().values().stream().findFirst().get().getPort())
+ .build());
serviceImplementationRequestInputBuilder.setServiceAEnd(serviceAEnd.build());
serviceImplementationRequestInputBuilder.setServiceZEnd(serviceZEnd.build());
serviceImplementationRequestInputBuilder.setServiceHandlerHeader(
return builder.build();
}
- public static ServiceAEnd createServiceAEnd(org.opendaylight.yang.gen.v1.http
- .org.openroadm.common.service.types.rev190531.ServiceEndpoint serviceAEnd) {
+ public static ServiceAEnd createServiceAEnd(ServiceEndpoint serviceAEnd) {
ServiceAEndBuilder serviceAEndBuilder = new ServiceAEndBuilder();
serviceAEndBuilder.setClli(serviceAEnd.getClli());
serviceAEndBuilder.setNodeId(new NodeIdType(serviceAEnd.getNodeId().getValue()).getValue());
- serviceAEndBuilder.setRxDirection(createRxDirection(serviceAEnd.getRxDirection()));
+ serviceAEndBuilder.setRxDirection(
+ createRxDirection(serviceAEnd.getRxDirection().values().stream().findFirst().get()));
serviceAEndBuilder.setServiceFormat(serviceAEnd.getServiceFormat());
serviceAEndBuilder.setServiceRate(serviceAEnd.getServiceRate());
- serviceAEndBuilder.setTxDirection(createTxDirection(serviceAEnd.getTxDirection()));
+ serviceAEndBuilder.setTxDirection(
+ createTxDirection(serviceAEnd.getTxDirection().values().stream().findFirst().get()));
return serviceAEndBuilder.build();
}
- public static ServiceZEnd createServiceZEnd(org.opendaylight.yang.gen.v1.http
- .org.openroadm.common.service.types.rev190531.ServiceEndpoint serviceZEnd) {
+ public static ServiceZEnd createServiceZEnd(ServiceEndpoint serviceZEnd) {
ServiceZEndBuilder serviceZEndBuilder = new ServiceZEndBuilder();
serviceZEndBuilder.setClli(serviceZEnd.getClli());
serviceZEndBuilder.setNodeId(new NodeIdType(serviceZEnd.getNodeId().getValue()).getValue());
- serviceZEndBuilder.setRxDirection(createRxDirection(serviceZEnd.getRxDirection()));
+ serviceZEndBuilder.setRxDirection(
+ createRxDirection(serviceZEnd.getRxDirection().values().stream().findFirst().get()));
serviceZEndBuilder.setServiceFormat(serviceZEnd.getServiceFormat());
serviceZEndBuilder.setServiceRate(serviceZEnd.getServiceRate());
- serviceZEndBuilder.setTxDirection(createTxDirection(serviceZEnd.getTxDirection()));
+ serviceZEndBuilder.setTxDirection(
+ createTxDirection(serviceZEnd.getTxDirection().values().stream().findFirst().get()));
return serviceZEndBuilder.build();
}
public static RxDirection createRxDirection(org.opendaylight.yang.gen.v1.http
- .org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection rxDirection) {
+ .org.openroadm.common.service.types.rev211210.service.endpoint.RxDirection rxDirection) {
RxDirectionBuilder rxDirectionBuilder = new RxDirectionBuilder();
rxDirectionBuilder.setPort(rxDirection.getPort());
return rxDirectionBuilder.build();
}
public static TxDirection createTxDirection(org.opendaylight.yang.gen.v1.http
- .org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection txDirection) {
+ .org.openroadm.common.service.types.rev211210.service.endpoint.TxDirection txDirection) {
TxDirectionBuilder txDirectionBuilder = new TxDirectionBuilder();
txDirectionBuilder.setPort(txDirection.getPort());
return txDirectionBuilder.build();
}
public static ListenableFuture<RpcResult<ServiceRerouteOutput>> createRerouteServiceReply(ServiceRerouteInput input,
- String finalAckYes, String message, RpcStatus status) {
+ String finalAckYes, String message) {
ServiceRerouteOutputBuilder output = new ServiceRerouteOutputBuilder()
+ .setConfigurationResponseCommon(
+ new ConfigurationResponseCommonBuilder().setResponseMessage(message).build())
.setHardConstraints(null)
- .setSoftConstraints(null)
- .setStatus(status)
- .setStatusMessage(message);
+ .setSoftConstraints(null);
return RpcResultBuilder.success(output.build()).buildFuture();
}
public static Services mappingServices(ServiceCreateInput serviceCreateInput,
ServiceReconfigureInput serviceReconfigureInput) {
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd aend = null;
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEnd zend = null;
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd aend = null;
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEnd zend = null;
ServicesBuilder service = new ServicesBuilder();
if (serviceCreateInput != null) {
- aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceAEndBuilder(serviceCreateInput.getServiceAEnd()).build();
- zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceZEndBuilder(serviceCreateInput.getServiceZEnd()).build();
service.setServiceName(serviceCreateInput.getServiceName()).setAdministrativeState(AdminStates.OutOfService)
.setOperationalState(State.OutOfService).setCommonId(serviceCreateInput.getCommonId())
.setSdncRequestHeader(serviceCreateInput.getSdncRequestHeader())
.setLifecycleState(LifecycleState.Planned).setServiceAEnd(aend).setServiceZEnd(zend);
} else if (serviceReconfigureInput != null) {
- aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceAEndBuilder(serviceReconfigureInput.getServiceAEnd()).build();
- zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceZEndBuilder(serviceReconfigureInput.getServiceZEnd()).build();
service.setServiceName(serviceReconfigureInput.getServiceName())
.setAdministrativeState(AdminStates.OutOfService)
return service.build();
}
- public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
+ public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
.Services mappingServices(TempServiceCreateInput tempServiceCreateInput) {
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd aend = null;
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEnd zend = null;
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
- .ServicesBuilder service = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd aend = null;
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEnd zend = null;
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list
+ .ServicesBuilder service = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp
.service.list.ServicesBuilder();
- aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ aend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceAEndBuilder(tempServiceCreateInput.getServiceAEnd()).build();
- zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ zend = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.ServiceZEndBuilder(tempServiceCreateInput.getServiceZEnd()).build();
service.setServiceName(tempServiceCreateInput.getCommonId()).setAdministrativeState(AdminStates.OutOfService)
.setOperationalState(State.OutOfService).setCommonId(tempServiceCreateInput.getCommonId())
.setNodeId(new NodeIdType(serviceInput.getServiceAEnd().getNodeId().getValue()).getValue())
.setTxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirectionBuilder()
- .setPort(serviceInput.getServiceAEnd().getTxDirection().getPort()).build())
+ .setPort(serviceInput.getServiceAEnd().getTxDirection().values().stream().findFirst().get()
+ .getPort())
+ .build())
.setRxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder()
- .setPort(serviceInput.getServiceAEnd().getRxDirection().getPort()).build());
+ .setPort(serviceInput.getServiceAEnd().getRxDirection().values().stream().findFirst().get()
+ .getPort())
+ .build());
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118
.service.path.ServiceZEndBuilder serviceZEnd =
new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118
.setNodeId(new NodeIdType(serviceInput.getServiceZEnd().getNodeId().getValue()).getValue())
.setTxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.TxDirectionBuilder()
- .setPort(serviceInput.getServiceZEnd().getTxDirection().getPort()).build())
+ .setPort(serviceInput.getServiceZEnd().getTxDirection().values().stream().findFirst().get()
+ .getPort())
+ .build())
.setRxDirection(new org.opendaylight.yang.gen.v1.http.org
.transportpce.b.c._interface.service.types.rev220118.service.endpoint.sp.RxDirectionBuilder()
- .setPort(serviceInput.getServiceZEnd().getRxDirection().getPort()).build());
+ .setPort(serviceInput.getServiceZEnd().getRxDirection().values().stream().findFirst().get()
+ .getPort())
+ .build());
servicePathBuilder.setServiceAEnd(serviceAEnd.build());
servicePathBuilder.setServiceZEnd(serviceZEnd.build());
if (serviceInput.getHardConstraints() != null) {
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
+import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import org.opendaylight.transportpce.servicehandler.ModelMappingUtils;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.RendererRpcResultSpBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultSh;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.ServiceRpcResultShBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeader;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.LgxBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceFeasibilityCheckInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceReconfigureInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRerouteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInput.Option;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceRestorationInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.delete.input.ServiceDeleteReqInfo;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.delete.input.ServiceDeleteReqInfoBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.feasibility.check.inputs.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.feasibility.check.inputs.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.feasibility.check.inputs.ServiceZEnd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.feasibility.check.inputs.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeader;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.lgx.LgxBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInput.Option;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfo;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.feasibility.check.inputs.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.feasibility.check.inputs.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.feasibility.check.inputs.ServiceZEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.feasibility.check.inputs.ServiceZEndBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.AToZDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.handler.header.ServiceHandlerHeaderBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
public final class ServiceDataUtils {
public static ServiceCreateInput buildServiceCreateInput() {
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
.ServiceAEnd serviceAEnd = getServiceAEndBuild()
.build();
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
- .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
+ .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service
.create.input.ServiceZEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection())
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()))
.build();
ServiceCreateInputBuilder builtInput = new ServiceCreateInputBuilder()
public static ServiceCreateInput buildServiceCreateInputWithHardConstraints() {
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
.ServiceAEnd serviceAEnd = getServiceAEndBuild()
.build();
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
- .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
+ .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service
.create.input.ServiceZEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection())
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()))
.build();
ServiceCreateInputBuilder builtInput = new ServiceCreateInputBuilder()
public static ServiceCreateInput buildServiceCreateInputWithSoftConstraints() {
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
.ServiceAEnd serviceAEnd = getServiceAEndBuild()
.build();
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
- .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
+ .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service
.create.input.ServiceZEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection())
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()))
.build();
ServiceCreateInputBuilder builtInput = new ServiceCreateInputBuilder()
public static TempServiceCreateInput buildTempServiceCreateInput() {
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.create.input
- .ServiceAEnd serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531
- .temp.service.create.input.ServiceAEndBuilder()
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.create.input
+ .ServiceAEnd serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp
+ .service.create.input.ServiceAEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection())
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()))
.build();
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.create.input
- .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.create.input
+ .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp
.service.create.input.ServiceZEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection())
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()))
.build();
TempServiceCreateInputBuilder builtInput = new TempServiceCreateInputBuilder()
ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
- .setTxDirection(getTxDirection()).setRxDirection(getRxDirection()).build();
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection())).build();
ServiceZEnd serviceZEnd = new ServiceZEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
- .setTxDirection(getTxDirection()).setRxDirection(getRxDirection()).build();
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection())).build();
ServiceFeasibilityCheckInputBuilder builtInput = new ServiceFeasibilityCheckInputBuilder()
.setCommonId("commonId")
return builtInput.build();
}
- public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
.ServiceAEndBuilder getServiceAEndBuild() {
- return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
.ServiceAEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection());
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()));
}
- public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
.ServiceZEndBuilder getServiceZEndBuild() {
- return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input
.ServiceZEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection());
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()));
}
private static TxDirection getTxDirection() {
- return new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ return new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.endpoint.TxDirectionBuilder().setPort(new PortBuilder().setPortDeviceName("device name")
.setPortName("port name").setPortRack("port rack").setPortShelf("port shelf")
.setPortSlot("port slot").setPortSubSlot("port subslot").setPortType("port type").build())
.setLgx(new LgxBuilder().setLgxDeviceName("lgx device name").setLgxPortName("lgx port name")
.setLgxPortRack("lgx port rack").setLgxPortShelf("lgx port shelf").build())
+ .setIndex(Uint8.ZERO)
.build();
}
private static RxDirection getRxDirection() {
- return new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service
+ return new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service
.endpoint.RxDirectionBuilder()
- .setPort(new PortBuilder().setPortDeviceName("device name").setPortName("port name")
- .setPortRack("port rack").setPortShelf("port shelf").setPortSlot("port slot")
- .setPortSubSlot("port subslot").setPortType("port type").build())
- .setLgx(new LgxBuilder().setLgxDeviceName("lgx device name")
- .setLgxPortName("lgx port name").setLgxPortRack("lgx port rack")
- .setLgxPortShelf("lgx port shelf").build())
- .build();
+ .setPort(new PortBuilder().setPortDeviceName("device name").setPortName("port name")
+ .setPortRack("port rack").setPortShelf("port shelf").setPortSlot("port slot")
+ .setPortSubSlot("port subslot").setPortType("port type").build())
+ .setLgx(new LgxBuilder().setLgxDeviceName("lgx device name")
+ .setLgxPortName("lgx port name").setLgxPortRack("lgx port rack")
+ .setLgxPortShelf("lgx port shelf").build())
+ .setIndex(Uint8.ZERO)
+ .build();
}
public static ServiceDeleteInput buildServiceDeleteInput() {
public static ServiceReconfigureInput buildServiceReconfigureInput() {
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
- .ServiceAEnd serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.reconfigure.input
+ .ServiceAEnd serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service
.reconfigure.input.ServiceAEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
- .setNodeId(new NodeIdType("XPONDER-1-2")).setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection())
+ .setNodeId(new NodeIdType("XPONDER-1-2"))
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()))
.build();
- org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
- .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.reconfigure.input
+ .ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service
.reconfigure.input.ServiceZEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
- .setNodeId(new NodeIdType("XPONDER-3-2")).setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection())
+ .setNodeId(new NodeIdType("XPONDER-3-2"))
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()))
.build();
ServiceReconfigureInputBuilder builtInput = new ServiceReconfigureInputBuilder()
return pathDescription;
}
- public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
+ public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.reconfigure.input
.ServiceAEndBuilder getServiceAEndBuildReconfigure() {
- return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
+ return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.reconfigure.input
.ServiceAEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection());
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()));
}
- public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
+ public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.reconfigure.input
.ServiceZEndBuilder getServiceZEndBuildReconfigure() {
- return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
+ return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.reconfigure.input
.ServiceZEndBuilder()
.setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
- .setTxDirection(getTxDirection())
- .setRxDirection(getRxDirection());
+ .setTxDirection(Map.of(new TxDirectionKey(getTxDirection().key()),getTxDirection()))
+ .setRxDirection(Map.of(new RxDirectionKey(getRxDirection().key()), getRxDirection()));
}
public static <T> ListenableFuture<T> returnFuture(T output) {
package org.opendaylight.transportpce.servicehandler.validation;
import java.util.Arrays;
+import java.util.Map;
import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.transportpce.common.OperationResult;
import org.opendaylight.transportpce.servicehandler.ServiceInput;
import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.constraints.co.routing.or.general.CoRoutingBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraintsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.CoRoutingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.constraints.co.routing.ServiceIdentifierListBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraintsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
public class ServiceCreateValidationTest {
public void validateServiceCreateRequestIfConstraintsNotNull() {
ServiceCreateInput input = new ServiceCreateInputBuilder(ServiceDataUtils.buildServiceCreateInput())
.setHardConstraints(new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing
- .CoRoutingBuilder().setExistingService(
- Arrays.asList("Some existing-service")).build())
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service")
+ .build()))
.build())
.setCustomerCode(Arrays.asList("Some customer-code"))
- .build()).setSoftConstraints(new SoftConstraintsBuilder()
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing
- .CoRoutingBuilder().setExistingService(
- Arrays.asList("Some existing-service")).build())
+ .build())
+ .setSoftConstraints(new SoftConstraintsBuilder()
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service")
+ .build()))
.build())
.setCustomerCode(Arrays.asList("Some customer-code"))
.build()).build();
public void validateServiceCreateRequestIfHardConstraintsNull() {
ServiceCreateInput input = new ServiceCreateInputBuilder(ServiceDataUtils.buildServiceCreateInput())
.setSoftConstraints(new SoftConstraintsBuilder()
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing
- .CoRoutingBuilder().setExistingService(
- Arrays.asList("Some existing-service")).build())
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service")
+ .build()))
.build())
.setCustomerCode(Arrays.asList("Some customer-code"))
.build()).setHardConstraints(null).build();
public void validateServiceCreateRequestIfSoftConstraintsNull() {
ServiceCreateInput input = new ServiceCreateInputBuilder(ServiceDataUtils.buildServiceCreateInput())
.setSoftConstraints(null).setHardConstraints(new HardConstraintsBuilder()
- .setCoRoutingOrGeneral(new CoRoutingBuilder()
- .setCoRouting(new org.opendaylight.yang.gen.v1.http.org.openroadm.routing
- .constrains.rev190329.constraints.co.routing.or.general.co.routing
- .CoRoutingBuilder().setExistingService(
- Arrays.asList("Some existing-service")).build())
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service")
+ .build()))
.build())
.setCustomerCode(Arrays.asList("Some customer-code"))
.build()).build();
import org.junit.Assert;
import org.junit.Test;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
public class ServicehandlerComplianceCheckTest {
import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.transportpce.servicehandler.ServiceEndpointType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
import org.opendaylight.yangtools.yang.common.Uint32;
public class ServicehandlerTxRxCheckTest {
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220114.mapping.MappingKey;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220114.network.Nodes;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220114.network.NodesKey;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.equipment.types.rev181130.OpticTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.Service;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.SubrateEthSlaBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.LgxBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.equipment.types.rev191129.OpticTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.Service;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ethernet.subrate.attributes.grp.EthernetAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.lgx.LgxBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.subrate.eth.sla.SubrateEthSlaBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmNodeType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.ODU4;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OTU4;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceZEnd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.OTU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceZEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceZEndBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZ;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.path.description.atoz.direction.AToZKey;
import org.opendaylight.yangtools.yang.common.Uint16;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
.setOpticType(OpticTypes.Gray)
.setServiceFormat(ServiceFormat.Ethernet)
.setServiceRate(Uint32.valueOf(100))
- .setTxDirection(new TxDirectionBuilder()
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO), new TxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName(txPortDeviceName)
.setPortName(txPortName)
.setLgxPortRack(TapiStringConstants.PORT_RACK_VALUE)
.setLgxPortShelf("00")
.build())
- .build())
- .setRxDirection(new RxDirectionBuilder()
+ .build()))
+ .setRxDirection(Map.of(new RxDirectionKey(Uint8.ZERO), new RxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName(rxPortDeviceName)
.setPortName(rxPortName)
.setLgxPortRack(TapiStringConstants.PORT_RACK_VALUE)
.setLgxPortShelf("00")
.build())
- .build())
+ .build()))
.build();
}
.setOpticType(OpticTypes.Gray)
.setServiceFormat(ServiceFormat.Ethernet)
.setServiceRate(Uint32.valueOf(100))
- .setTxDirection(new TxDirectionBuilder()
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO), new TxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName(txPortDeviceName)
.setPortName(txPortName)
.setLgxPortRack(TapiStringConstants.PORT_RACK_VALUE)
.setLgxPortShelf("00")
.build())
- .build())
- .setRxDirection(new RxDirectionBuilder()
+ .build()))
+ .setRxDirection(Map.of(new RxDirectionKey(Uint8.ZERO), new RxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName(rxPortDeviceName)
.setPortName(rxPortName)
.setLgxPortRack(TapiStringConstants.PORT_RACK_VALUE)
.setLgxPortShelf("00")
.build())
- .build())
+ .build()))
.build();
}
ServicePaths servicePaths = optServicePaths.get();
PathDescription pathDescription = servicePaths.getPathDescription();
LOG.info("Path description of service = {}", pathDescription);
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd serviceAEnd
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd serviceAEnd
= service.getServiceAEnd();
// Endpoint creation
EndPoint endPoint1 = mapServiceAEndPoint(serviceAEnd, pathDescription);
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEnd serviceZEnd
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEnd serviceZEnd
= service.getServiceZEnd();
EndPoint endPoint2 = mapServiceZEndPoint(serviceZEnd, pathDescription);
Map<EndPointKey, EndPoint> endPointMap = new HashMap<>();
}
private Map<ConnectionKey, Connection> createConnectionsFromService(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd
serviceAEnd,
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEnd
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEnd
serviceZEnd,
PathDescription pathDescription) {
Map<ConnectionKey, Connection> connectionServMap = new HashMap<>();
}
private EndPoint mapServiceZEndPoint(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceZEnd
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceZEnd
serviceZEnd, PathDescription pathDescription) {
EndPointBuilder endPointBuilder = new EndPointBuilder();
// 1. Service Format: ODU, OTU, ETH
}
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.local._class.Name name =
new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.local._class.NameBuilder()
- .setValueName("OpenROADM node id")
- .setValue(serviceZEnd.getTxDirection().getPort().getPortDeviceName())
+ .setValueName("OpenROADM info")
+ .setValue(String.join("-", serviceZEnd.getClli(),
+ serviceZEnd.getTxDirection().values().stream().findFirst().get().getPort().getPortDeviceName(),
+ serviceZEnd.getTxDirection().values().stream().findFirst().get().getPort().getPortName()))
.build();
return endPointBuilder
.setServiceInterfacePoint(new ServiceInterfacePointBuilder()
.build())
.setProtectionRole(ProtectionRole.WORK)
.setRole(PortRole.SYMMETRIC)
- .setLocalId(serviceZEnd.getTxDirection().getPort().getPortDeviceName())
+ .setLocalId(serviceZEnd.getTxDirection().values().stream().findFirst().get()
+ .getPort().getPortDeviceName())
.build();
}
private EndPoint mapServiceAEndPoint(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.ServiceAEnd
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.ServiceAEnd
serviceAEnd, PathDescription pathDescription) {
EndPointBuilder endPointBuilder = new EndPointBuilder();
// 1. Service Format: ODU, OTU, ETH
}
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.local._class.Name name =
new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.local._class.NameBuilder()
- .setValueName("OpenROADM node id")
- .setValue(serviceAEnd.getTxDirection().getPort().getPortDeviceName())
+ .setValueName("OpenROADM info")
+ .setValue(String.join("-", serviceAEnd.getClli(),
+ serviceAEnd.getTxDirection().values().stream().findFirst().get().getPort().getPortDeviceName(),
+ serviceAEnd.getTxDirection().values().stream().findFirst().get().getPort().getPortName()))
.build();
return endPointBuilder
.setServiceInterfacePoint(new ServiceInterfacePointBuilder()
.build())
.setProtectionRole(ProtectionRole.WORK)
.setRole(PortRole.SYMMETRIC)
- .setLocalId(serviceAEnd.getTxDirection().getPort().getPortDeviceName())
+ .setLocalId(serviceAEnd.getTxDirection().values().stream().findFirst().get().getPort().getPortDeviceName())
.build();
}
.setOpticType(OpticTypes.Gray)
.setServiceFormat(serviceFormat)
.setServiceRate(Uint32.valueOf(capacity))
- .setTxDirection(new TxDirectionBuilder()
+ .setEthernetAttributes(new EthernetAttributesBuilder().setSubrateEthSla(new SubrateEthSlaBuilder()
+ .setCommittedBurstSize(Uint16.valueOf(64))
+ .setCommittedInfoRate(Uint32.valueOf(100000))
+ .build())
+ .build())
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO), new TxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName(txPortDeviceName)
.setPortName(txPortName)
.setLgxPortRack(TapiStringConstants.PORT_RACK_VALUE)
.setLgxPortShelf("00")
.build())
- .build())
- .setRxDirection(new RxDirectionBuilder()
+ .setIndex(Uint8.ZERO)
+ .build()))
+ .setRxDirection(Map.of(new RxDirectionKey(Uint8.ZERO), new RxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName(rxPortDeviceName)
.setPortName(rxPortName)
.setLgxPortRack(TapiStringConstants.PORT_RACK_VALUE)
.setLgxPortShelf("00")
.build())
- .build());
+ .setIndex(Uint8.ZERO)
+ .build()));
if (serviceFormat.equals(ServiceFormat.ODU)) {
serviceZEndBuilder.setOduServiceRate(ODU4.class);
}
}
if (!serviceLayer.equals(LayerProtocolName.ETH)) {
serviceZEndBuilder
- .setSubrateEthSla(new SubrateEthSlaBuilder().setSubrateEthSla(new org.opendaylight.yang.gen.v1.http
- .org.openroadm.common.service.types.rev190531.subrate.eth.sla.SubrateEthSlaBuilder()
- .setCommittedBurstSize(Uint16.valueOf(64))
- .setCommittedInfoRate(Uint32.valueOf(100000))
- .build())
- .build());
+ .setEthernetAttributes(new EthernetAttributesBuilder().setSubrateEthSla(new SubrateEthSlaBuilder()
+ .setCommittedBurstSize(Uint16.valueOf(64))
+ .setCommittedInfoRate(Uint32.valueOf(100000))
+ .build())
+ .build());
}
return serviceZEndBuilder.build();
}
.setOpticType(OpticTypes.Gray)
.setServiceFormat(serviceFormat)
.setServiceRate(Uint32.valueOf(capacity))
- .setTxDirection(new TxDirectionBuilder()
+ .setEthernetAttributes(new EthernetAttributesBuilder().setSubrateEthSla(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.subrate.eth
+ .sla.SubrateEthSlaBuilder()
+ .setCommittedBurstSize(Uint16.valueOf(64))
+ .setCommittedInfoRate(Uint32.valueOf(100000))
+ .build())
+ .build())
+ .setTxDirection(Map.of(new TxDirectionKey(Uint8.ZERO), new TxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName(txPortDeviceName)
.setPortName(txPortName)
.setLgxPortRack(TapiStringConstants.PORT_RACK_VALUE)
.setLgxPortShelf("00")
.build())
- .build())
- .setRxDirection(new RxDirectionBuilder()
+ .setIndex(Uint8.ZERO)
+ .build()))
+ .setRxDirection(Map.of(new RxDirectionKey(Uint8.ZERO), new RxDirectionBuilder()
.setPort(new PortBuilder()
.setPortDeviceName(rxPortDeviceName)
.setPortName(rxPortName)
.setLgxPortRack(TapiStringConstants.PORT_RACK_VALUE)
.setLgxPortShelf("00")
.build())
- .build());
+ .setIndex(Uint8.ZERO)
+ .build()));
if (serviceFormat.equals(ServiceFormat.ODU)) {
serviceAEndBuilder.setOduServiceRate(ODU4.class);
}
}
if (!serviceLayer.equals(LayerProtocolName.ETH)) {
serviceAEndBuilder
- .setSubrateEthSla(new SubrateEthSlaBuilder().setSubrateEthSla(new org.opendaylight.yang.gen.v1.http
- .org.openroadm.common.service.types.rev190531.subrate.eth.sla.SubrateEthSlaBuilder()
- .setCommittedBurstSize(Uint16.valueOf(64))
- .setCommittedInfoRate(Uint32.valueOf(100000))
- .build())
- .build());
+ .setEthernetAttributes(new EthernetAttributesBuilder().setSubrateEthSla(new SubrateEthSlaBuilder()
+ .setCommittedBurstSize(Uint16.valueOf(64))
+ .setCommittedInfoRate(Uint32.valueOf(100000))
+ .build())
+ .build());
}
return serviceAEndBuilder.build();
}
import org.opendaylight.transportpce.tapi.listeners.TapiServiceHandlerListenerImpl;
import org.opendaylight.transportpce.tapi.utils.TapiContext;
import org.opendaylight.transportpce.tapi.validation.CreateConnectivityServiceValidation;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.delete.input.ServiceDeleteReqInfo;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.delete.input.ServiceDeleteReqInfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfo;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfoBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.AdministrativeState;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.ForwardingDirection;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.LifecycleState;
.build())
.setSdncRequestHeader(new SdncRequestHeaderBuilder()
.setRequestId("request-1")
- .setRpcAction(RpcActions.ServiceDelete)
.setNotificationUrl("notification url")
.setRequestSystemId("appname")
+ .setRpcAction(RpcActions.ServiceDelete)
.build())
.build());
RpcResult<ServiceDeleteOutput> rpcResult = output.get();
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.TransportpceRendererListener;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev201125.TransportpceServicehandlerListener;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.tapinetworkutils.rev210408.TransportpceTapinetworkutilsService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.NetworkKey;
*/
package org.opendaylight.transportpce.tapi.utils;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceEndpoint;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceEndpoint;
public class GenericServiceEndpoint {
private ServiceEndpoint value;
import java.util.Map.Entry;
import java.util.Set;
import org.opendaylight.transportpce.tapi.connectivity.ConnectivityUtils;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceAEnd;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceZEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceAEnd;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceZEnd;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.Uuid;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.tapi.rev180928.EndPointType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.tapi.rev180928.service._interface.points.ServiceEndPoint;
private static GenericServiceEndpoint createMapEntry(ServiceEndPoint sep) {
if (sep.getEndPoint().getServiceEndPointType().equals(EndPointType.Aend)) {
ServiceAEnd sepG = ConnectivityUtils.buildServiceAEnd(sep.getEndPoint().getNodeId().getValue(),
- sep.getEndPoint().getClli(), sep.getEndPoint().getTxDirection().getPort().getPortDeviceName(),
- sep.getEndPoint().getTxDirection().getPort().getPortName(),
- sep.getEndPoint().getRxDirection().getPort().getPortDeviceName(), sep.getEndPoint().getRxDirection()
- .getPort().getPortName());
+ sep.getEndPoint().getClli(),
+ sep.getEndPoint().getTxDirection().values().stream().findFirst().get().getPort()
+ .getPortDeviceName(),
+ sep.getEndPoint().getTxDirection().values().stream().findFirst().get().getPort().getPortName(),
+ sep.getEndPoint().getRxDirection().values().stream().findFirst().get().getPort()
+ .getPortDeviceName(),
+ sep.getEndPoint().getRxDirection().values().stream().findFirst().get().getPort().getPortName());
return new GenericServiceEndpoint(sepG, ServiceEndpointType.SERVICEAEND);
} else {
ServiceZEnd sepG = ConnectivityUtils.buildServiceZEnd(sep.getEndPoint().getNodeId().getValue(),
- sep.getEndPoint().getClli(), sep.getEndPoint().getTxDirection().getPort().getPortDeviceName(),
- sep.getEndPoint().getTxDirection().getPort().getPortName(),
- sep.getEndPoint().getRxDirection().getPort().getPortDeviceName(), sep.getEndPoint().getRxDirection()
- .getPort().getPortName());
+ sep.getEndPoint().getClli(),
+ sep.getEndPoint().getTxDirection().values().stream().findFirst().get().getPort()
+ .getPortDeviceName(),
+ sep.getEndPoint().getTxDirection().values().stream().findFirst().get().getPort().getPortName(),
+ sep.getEndPoint().getRxDirection().values().stream().findFirst().get().getPort()
+ .getPortDeviceName(),
+ sep.getEndPoint().getRxDirection().values().stream().findFirst().get().getPort().getPortName());
return new GenericServiceEndpoint(sepG, ServiceEndpointType.SERVICEZEND);
}
}
import org.opendaylight.transportpce.tapi.connectivity.ConnectivityUtils;
import org.opendaylight.transportpce.tapi.topology.TapiTopologyException;
import org.opendaylight.transportpce.tapi.topology.TopologyUtils;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.Service;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceList;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.ServicesKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.Service;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.ServicesKey;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.tapi.context.ServiceInterfacePoint;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.tapi.context.ServiceInterfacePointKey;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.connectivity.context.ConnectivityService;
interface="org.opendaylight.mdsal.binding.api.RpcProviderService"/>
<reference id="serviceHandlerService"
- interface="org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService" />
+ interface="org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService" />
<reference id="networkTransactionImpl"
interface="org.opendaylight.transportpce.common.network.NetworkTransactionService" />
import org.opendaylight.transportpce.tapi.utils.TapiTopologyDataUtils;
import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.transportpce.test.utils.TopologyDataUtils;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.CreateConnectivityServiceInput;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.CreateConnectivityServiceInputBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.CreateConnectivityServiceOutput;
import org.opendaylight.transportpce.tapi.utils.TapiListener;
import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.tapinetworkutils.rev210408.TransportpceTapinetworkutilsService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.OrgOpenroadmServiceService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.TapiCommonService;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.TapiConnectivityService;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.TapiTopologyService;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.sdnc.request.header.SdncRequestHeaderBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.RxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.endpoint.TxDirectionBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.LgxBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ConnectionType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.RxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirection;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.endpoint.TxDirectionKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.lgx.LgxBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.service.port.PortBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.create.input.ServiceZEndBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.AdministrativeState;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.CapacityUnit;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.ForwardingDirection;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.connectivity.rev181210.create.connectivity.service.input.EndPointKey;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
public final class TapiConnectivityDataUtils {
public static CreateConnectivityServiceInput buildConnServiceCreateInput() {
.setRxDirection(getRxDirection());
}
- private static TxDirection getTxDirection() {
- return new TxDirectionBuilder().setPort(new PortBuilder().setPortDeviceName("device name")
+ private static Map<TxDirectionKey, TxDirection> getTxDirection() {
+ return Map.of(new TxDirectionKey(Uint8.ZERO), new TxDirectionBuilder()
+ .setPort(new PortBuilder().setPortDeviceName("device name")
.setPortName("port name").setPortRack("port rack").setPortShelf("port shelf")
.setPortSlot("port slot").setPortSubSlot("port subslot").setPortType("port type").build())
.setLgx(new LgxBuilder().setLgxDeviceName("lgx device name").setLgxPortName("lgx port name")
.setLgxPortRack("lgx port rack").setLgxPortShelf("lgx port shelf").build())
- .build();
+ .setIndex(Uint8.ZERO)
+ .build());
}
- private static RxDirection getRxDirection() {
- return new RxDirectionBuilder()
+ private static Map<RxDirectionKey, RxDirection> getRxDirection() {
+ return Map.of(new RxDirectionKey(Uint8.ZERO), new RxDirectionBuilder()
.setPort(new PortBuilder().setPortDeviceName("device name").setPortName("port name")
.setPortRack("port rack").setPortShelf("port shelf").setPortSlot("port slot")
.setPortSubSlot("port subslot").setPortType("port type").build())
.setLgx(new LgxBuilder().setLgxDeviceName("lgx device name")
.setLgxPortName("lgx port name").setLgxPortRack("lgx port rack")
.setLgxPortShelf("lgx port shelf").build())
- .build();
+ .setIndex(Uint8.ZERO)
+ .build());
}
public static Map<ConnectivityServiceKey, ConnectivityService> createConnService() {
"node-id": "XPDRA01",
"service-format": "Ethernet",
"clli": "SNJSCAMCJP8",
- "tx-direction": {},
- "rx-direction": {},
+ "tx-direction": [{"index": 0}],
+ "rx-direction": [{"index": 0}],
"optic-type": "gray"
},
"service-z-end": {
"node-id": "XPDRC01",
"service-format": "Ethernet",
"clli": "SNJSCAMCJT4",
- "tx-direction": {},
- "rx-direction": {},
+ "tx-direction": [{"index": 0}],
+ "rx-direction": [{"index": 0}],
"optic-type": "gray"
},
"due-date": "2016-11-28T00:00:01Z",
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSA",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"service-z-end": {
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSC",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SC1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SC1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"due-date": "2018-06-15T00:00:01Z",
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSA",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"service-z-end": {
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSC",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SC1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SC1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"due-date": "2018-06-15T00:00:01Z",
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "10"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["ethernet-encoding"] = "10GBASE-R"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "10"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["ethernet-encoding"] = "10GBASE-R"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
self.cr_serv_sample_data["input"]["connection-type"] = "infrastructure"
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "OTU"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"] = "org-openroadm-otn-common-types:OTU4"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "OTU"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"] = "org-openroadm-otn-common-types:OTU4"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
# pylint: disable=line-too-long
self.cr_serv_sample_data["input"]["service-name"] = "service2-ODU4"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "ODU"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"] = "org-openroadm-otn-common-types:ODU4"
del self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"]
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "ODU"
self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"] = "org-openroadm-otn-common-types:ODU4"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-NETWORK1"
del self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"]
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-CLIENT1"
del self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR3-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR3-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR3-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR3"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR3-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
"node-id": "XPDR-A1",
"service-format": "Ethernet",
"clli": "NodeA",
- "tx-direction": {
- "port": {
- "port-device-name": "XPDR-A1-XPDR1",
- "port-type": "fixed",
- "port-name": "1/0/2-PLUG-CLIENT",
- "port-rack": "000000.00",
- "port-shelf": "00"
- },
+ "tx-direction": [{
+ "port": {
+ "port-device-name": "XPDR-A1-XPDR1",
+ "port-type": "fixed",
+ "port-name": "1/0/2-PLUG-CLIENT",
+ "port-rack": "000000.00",
+ "port-shelf": "00"
+ },
"lgx": {
- "lgx-device-name": "LGX Panel_SNJSCAMCJP8_000000.00_00",
- "lgx-port-name": "LGX Back.3",
- "lgx-port-rack": "000000.00",
- "lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ "lgx-device-name": "LGX Panel_SNJSCAMCJP8_000000.00_00",
+ "lgx-port-name": "LGX Back.3",
+ "lgx-port-rack": "000000.00",
+ "lgx-port-shelf": "00"
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "XPDR-A1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "LGX Back.4",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"service-z-end": {
"node-id": "XPDR-C1",
"service-format": "Ethernet",
"clli": "NodeC",
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "XPDR-C1-XPDR2",
"port-type": "router",
"lgx-port-name": "LGX Back.29",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
- "port": {
- "port-device-name": "XPDR-C1-XPDR2",
- "port-type": "router",
- "port-name": "1/0/2-PLUG-CLIENT",
- "port-rack": "000000.00",
- "port-shelf": "00"
},
- "lgx": {
- "lgx-device-name": "LGX Panel_SNJSCAMCJT4_000000.00_00",
- "lgx-port-name": "LGX Back.30",
- "lgx-port-rack": "000000.00",
- "lgx-port-shelf": "00"
- }
- },
+ "index": 0
+ }],
+ "rx-direction": [{
+ "port": {
+ "port-device-name": "XPDR-C1-XPDR2",
+ "port-type": "router",
+ "port-name": "1/0/2-PLUG-CLIENT",
+ "port-rack": "000000.00",
+ "port-shelf": "00"
+ },
+ "lgx": {
+ "lgx-device-name": "LGX Panel_SNJSCAMCJT4_000000.00_00",
+ "lgx-port-name": "LGX Back.29",
+ "lgx-port-rack": "000000.00",
+ "lgx-port-shelf": "00"
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"due-date": "2016-11-28T00:00:01Z",
def test_22_create_eth_service1(self):
self.cr_serv_sample_data["input"]["service-name"] = "service1"
- del self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"]
- del self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"]
- del self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"]
- del self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"]
- del self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"]
- del self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"]
- del self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"]
- del self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"]
+ del self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"]
+ del self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"]
+ del self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"]
+ del self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"]
+ del self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"]
+ del self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"]
+ del self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"]
+ del self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"]
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSA",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"service-z-end": {
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSB",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SB1-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SB1-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"due-date": "2018-06-15T00:00:01Z",
self.cr_serv_sample_data["input"]["service-name"] = "service-OCH-OTU4-BC"
self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "SPDR-SB1"
self.cr_serv_sample_data["input"]["service-a-end"]["clli"] = "NodeSB"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK2"
self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1"
self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "SPDR-SA1"
self.cr_serv_sample_data["input"]["service-a-end"]["clli"] = "NodeSA"
del self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1"
self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC"
del self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
self.cr_serv_sample_data["input"]["connection-type"] = "infrastructure"
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "OTU"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK1"
self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"] = "org-openroadm-otn-common-types:OTU4"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "OTU"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK1"
self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"] = "org-openroadm-otn-common-types:OTU4"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "SPDR-SA1"
self.cr_serv_sample_data["input"]["service-a-end"]["clli"] = "NodeSA"
del self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1"
self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC"
del self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSA",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SA1-XPDR1",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"service-z-end": {
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTU4",
"clli": "NodeSB",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "SPDR-SB1-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "SPDR-SB1-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"due-date": "2018-06-15T00:00:01Z",
self.cr_serv_sample_data["input"]["service-name"] = "service-OCH-OTU4-BC"
self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "SPDR-SB1"
self.cr_serv_sample_data["input"]["service-a-end"]["clli"] = "NodeSB"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK2"
self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1"
self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "ODU"
del self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"]
self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"] = "org-openroadm-otn-common-types:ODU4"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1"
self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "ODU"
del self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"]
self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"] = "org-openroadm-otn-common-types:ODU4"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "10"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "10"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "ODU"
self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"] = "org-openroadm-otn-common-types:ODU4"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SB1"
self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSB"
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "ODU"
self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"] = "org-openroadm-otn-common-types:ODU4"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
def test_072_create_ODU4_service_BC(self):
# pylint: disable=line-too-long
self.cr_serv_sample_data["input"]["service-name"] = "service-ODU4-BC"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SB1-XPDR2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-NETWORK2"
self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1"
self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SC1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-NETWORK1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "10"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"] = "SPDR-SA1-XPDR1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "10"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
"node-id": "XPDRA01",
"service-format": "Ethernet",
"clli": "SNJSCAMCJP8",
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-type": "fixed",
"port-rack": "000000.00",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
- "port": {
- "port-type": "fixed",
- "port-rack": "000000.00",
- "port-shelf": "Chassis#1"
},
- "lgx": {
- "lgx-device-name": "Some lgx-device-name",
- "lgx-port-name": "Some lgx-port-name",
- "lgx-port-rack": "000000.00",
- "lgx-port-shelf": "00"
- }
- },
+ "index": 0
+ }],
+ "rx-direction": [{
+ "port": {
+ "port-type": "fixed",
+ "port-rack": "000000.00",
+ "port-shelf": "Chassis#1"
+ },
+ "lgx": {
+ "lgx-device-name": "Some lgx-device-name",
+ "lgx-port-name": "Some lgx-port-name",
+ "lgx-port-rack": "000000.00",
+ "lgx-port-shelf": "00"
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"service-z-end": {
"node-id": "XPDR-C1",
"service-format": "Ethernet",
"clli": "SNJSCAMCJT4",
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-type": "fixed",
"port-rack": "000000.00",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
- "port": {
- "port-type": "fixed",
- "port-rack": "000000.00",
- "port-shelf": "Chassis#1"
},
- "lgx": {
- "lgx-device-name": "Some lgx-device-name",
- "lgx-port-name": "Some lgx-port-name",
- "lgx-port-rack": "000000.00",
- "lgx-port-shelf": "00"
- }
- },
+ "index": 0
+ }],
+ "rx-direction": [{
+ "port": {
+ "port-type": "fixed",
+ "port-rack": "000000.00",
+ "port-shelf": "Chassis#1"
+ },
+ "lgx": {
+ "lgx-device-name": "Some lgx-device-name",
+ "lgx-port-name": "Some lgx-port-name",
+ "lgx-port-rack": "000000.00",
+ "lgx-port-shelf": "00"
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"due-date": "2016-11-28T00:00:01Z",
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTUCn",
"clli": "NodeSA",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "XPDR-A2-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "XPDR-A2-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"service-z-end": {
"service-format": "OTU",
"otu-service-rate": "org-openroadm-otn-common-types:OTUCn",
"clli": "NodeSC",
- "subrate-eth-sla": {
- "subrate-eth-sla": {
- "committed-info-rate": "100000",
- "committed-burst-size": "64"
- }
- },
- "tx-direction": {
+ "tx-direction": [{
"port": {
"port-device-name": "XPDR-C2-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
- "rx-direction": {
+ },
+ "index": 0
+ }],
+ "rx-direction": [{
"port": {
"port-device-name": "XPDR-C2-XPDR2",
"port-type": "fixed",
"lgx-port-name": "Some lgx-port-name",
"lgx-port-rack": "000000.00",
"lgx-port-shelf": "00"
- }
- },
+ },
+ "index": 0
+ }],
"optic-type": "gray"
},
"due-date": "2018-06-15T00:00:01Z",
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-a-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
del self.cr_serv_sample_data["input"]["service-z-end"]["odu-service-rate"]
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT1"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
self.cr_serv_sample_data["input"]["connection-type"] = "service"
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet"
- self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT2"
- self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT2"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT2"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "100"
self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet"
- self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT2"
- self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT2"
+ self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR2-CLIENT2"
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
def test_72_create_400GE_service(self):
self.cr_serv_sample_data["input"]["service-name"] = "service-400GE"
self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "400"
+ self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
+ self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"] = "XPDR1-CLIENT1"
self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "400"
- del self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"]
- del self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"]
- del self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"]
- del self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"]
- del self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"]
- del self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"]
- del self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"]
- del self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"]
+ del self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-name"]
+ del self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"][0]["port"]["port-device-name"]
+ del self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-name"]
+ del self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"][0]["port"]["port-device-name"]
+ del self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-name"]
+ del self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"][0]["port"]["port-device-name"]
+ del self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-name"]
+ del self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"][0]["port"]["port-device-name"]
response = test_utils.service_create_request(self.cr_serv_sample_data)
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
{"service-format": "Ethernet", "service-rate": "100",
"clli": "ORANGE1", "node-id": "XPONDER-1-2"},
{"customer-code": ["Some customer-code"],
- "co-routing": {"existing-service": ["Some existing-service"]}
- },
+ "co-routing": {
+ "service-identifier-list": [
+ {
+ "service-identifier": "Some existing-service",
+ }
+ ]
+ }
+ },
{"customer-code": ["Some customer-code"],
- "co-routing": {"existing-service": ["Some existing-service"]}
- }, "hop-count")
+ "co-routing": {
+ "service-identifier-list": [
+ {
+ "service-identifier": "Some existing-service",
+ }
+ ]
+ }
+ }, "hop-count")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
self.assertIn('Path is calculated',