import org.opendaylight.transportpce.common.ResponseCodes;
import org.opendaylight.transportpce.common.mapping.PortMapping;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
+import org.opendaylight.transportpce.pce.constraints.OperatorConstraints;
import org.opendaylight.transportpce.pce.constraints.PceConstraints;
import org.opendaylight.transportpce.pce.constraints.PceConstraintsCalc;
import org.opendaylight.transportpce.pce.gnpy.GnpyException;
LOG.error("In pathComputationWithConstraints, nwAnalizer: result = {}", rc);
return;
}
+ OperatorConstraints opConstraints = new OperatorConstraints(networkTransaction);
LOG.info("PceGraph ...");
PceGraph graph = new PceGraph(nwAnalizer.getaendPceNode(), nwAnalizer.getzendPceNode(),
nwAnalizer.getAllPceNodes(), nwAnalizer.getAllPceLinks(), hardConstraints,
- rc, serviceType, networkTransaction, mode);
+ rc, serviceType, networkTransaction, mode, opConstraints.getBitMapConstraint(input.getCustomerName()));
graph.calcPath();
rc = graph.getReturnStructure();
if (!rc.getStatus()) {
--- /dev/null
+/*
+ * Copyright © 2024 Orange, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.transportpce.pce.constraints;
+
+import java.util.BitSet;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.transportpce.common.fixedflex.GridConstant;
+import org.opendaylight.transportpce.common.fixedflex.GridUtils;
+import org.opendaylight.transportpce.common.network.NetworkTransactionService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev230526.FrequencyTHz;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.controller.customization.rev230526.controller.parameters.SpectrumFilling;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.controller.customization.rev230526.controller.parameters.spectrum.filling.SpectrumFillingRules;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.controller.customization.rev230526.controller.parameters.spectrum.filling.SpectrumFillingRulesKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ControllerBehaviourSettings;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/*
+ * Class to handle Operator Constraints associated with Specific Engineering rules
+ * as they are defined in the controller-behaviour-settings container of the service
+ * Data-Store.
+ *
+ */
+
+public class OperatorConstraints {
+
+ /* Logging. */
+ private static final Logger LOG = LoggerFactory.getLogger(OperatorConstraints.class);
+ private static final String SPECTRUM_LOG_MSG =
+ "Specific Spectrum filling Rules have been defined for {} the spectrum range {} - {}";
+ private NetworkTransactionService networkTransaction;
+
+ public OperatorConstraints(NetworkTransactionService networkTransaction) {
+
+ this.networkTransaction = networkTransaction;
+
+ }
+
+ public BitSet getBitMapConstraint(String customerName) {
+ BitSet referenceBitSet = new BitSet(GridConstant.EFFECTIVE_BITS);
+ referenceBitSet.set(0, GridConstant.EFFECTIVE_BITS, true);
+ InstanceIdentifier<SpectrumFilling> sfIID =
+ InstanceIdentifier
+ .builder(ControllerBehaviourSettings.class)
+ .child(SpectrumFilling.class)
+ .build();
+
+ try {
+ if (networkTransaction.read(LogicalDatastoreType.CONFIGURATION, sfIID).get().isPresent()) {
+ SpectrumFilling spectrumConstraint = networkTransaction
+ .read(LogicalDatastoreType.CONFIGURATION, sfIID)
+ .get().orElseThrow();
+ if (spectrumConstraint.getSpectrumFillingRules().isEmpty()) {
+ return referenceBitSet;
+ }
+ if (customerName == null) {
+ for (Map.Entry<SpectrumFillingRulesKey, SpectrumFillingRules> rule:
+ spectrumConstraint.getSpectrumFillingRules().entrySet()) {
+ var spectrumRangeOfAppl = rule.getValue().getSpectrumRangeOfAppliance();
+ var dedicatedCustomer = spectrumRangeOfAppl.getDedicatedCustomer();
+ if (dedicatedCustomer == null || dedicatedCustomer.isEmpty()) {
+ continue;
+ }
+ // Spectrum portion is dedicated to some customers that do not include this one
+ FrequencyTHz startFreq = spectrumRangeOfAppl.getStartEdgeFrequency();
+ FrequencyTHz stopFreq = spectrumRangeOfAppl.getStopEdgeFrequency();
+ referenceBitSet.set(
+ GridUtils.getIndexFromFrequency(startFreq.getValue()),
+ GridUtils.getIndexFromFrequency(stopFreq.getValue()),
+ false);
+ LOG.info(SPECTRUM_LOG_MSG,
+ "other customers, preventing the customer from using", startFreq, stopFreq);
+ }
+ return referenceBitSet;
+ }
+
+ for (Map.Entry<SpectrumFillingRulesKey, SpectrumFillingRules> rule:
+ spectrumConstraint.getSpectrumFillingRules().entrySet()) {
+ var spectrumRangeOfAppl = rule.getValue().getSpectrumRangeOfAppliance();
+ FrequencyTHz startFreq = spectrumRangeOfAppl.getStartEdgeFrequency();
+ FrequencyTHz stopFreq = spectrumRangeOfAppl.getStopEdgeFrequency();
+ var nonAuthorizedCustomer = spectrumRangeOfAppl.getNonAuthorizedCustomer();
+ if (nonAuthorizedCustomer != null && nonAuthorizedCustomer.contains(customerName)) {
+ //Customer shall not be put in this spectrum portion
+ referenceBitSet.set(
+ GridUtils.getIndexFromFrequency(startFreq.getValue()),
+ GridUtils.getIndexFromFrequency(stopFreq.getValue()),
+ false);
+ LOG.info(SPECTRUM_LOG_MSG,
+ "customer " + customerName + ", exluding it from", startFreq, stopFreq);
+ continue;
+ }
+ var dedicatedCustomer = spectrumRangeOfAppl.getDedicatedCustomer();
+ if (dedicatedCustomer == null || dedicatedCustomer.isEmpty()) {
+ continue;
+ }
+ if (dedicatedCustomer.contains(customerName)) {
+ // Spectrum portion is dedicated to customers including this one
+ referenceBitSet.set(
+ GridUtils.getIndexFromFrequency(startFreq.getValue()),
+ GridUtils.getIndexFromFrequency(stopFreq.getValue()),
+ true);
+ LOG.info(SPECTRUM_LOG_MSG,
+ "customer " + customerName + ", to dedicate", startFreq, stopFreq + " to it");
+ continue;
+ }
+ // Spectrum portion is dedicated to some customers that do not include this one
+ referenceBitSet.set(
+ GridUtils.getIndexFromFrequency(startFreq.getValue()),
+ GridUtils.getIndexFromFrequency(stopFreq.getValue()),
+ false);
+ LOG.info(SPECTRUM_LOG_MSG,
+ "other customers, preventing the customer from using", startFreq, stopFreq);
+ }
+ return referenceBitSet;
+ }
+ } catch (InterruptedException | ExecutionException e1) {
+ LOG.error("Exception caught handling Spectrum filling Rules ", e1.getCause());
+ }
+ LOG.info("Did not succeed finding any Specific Spectrum filling Rules defined in Configuration Datastore");
+ return referenceBitSet;
+ }
+}
package org.opendaylight.transportpce.pce.graph;
import java.util.ArrayList;
+import java.util.BitSet;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
private Double margin = null;
PceConstraints pceHardConstraints;
private PceConstraintMode pceConstraintMode;
+ private BitSet spectrumConstraint;
// results
private PceResult pceResult = null;
public PceGraph(PceNode aendNode, PceNode zendNode, Map<NodeId, PceNode> allPceNodes,
Map<LinkId, PceLink> allPceLinks, PceConstraints pceHardConstraints,PceResult pceResult, String serviceType,
- NetworkTransactionService networkTransactionService, PceConstraintMode mode) {
+ NetworkTransactionService networkTransactionService, PceConstraintMode mode, BitSet spectrumConstraint) {
super();
this.apceNode = aendNode;
this.zpceNode = zendNode;
this.serviceType = serviceType;
this.networkTransactionService = networkTransactionService;
this.pceConstraintMode = mode;
+ this.spectrumConstraint = spectrumConstraint;
LOG.info("In GraphCalculator: A and Z = {} / {} ", aendNode, zendNode);
LOG.debug("In GraphCalculator: allPceNodes size {}, nodes {} ", allPceNodes.size(), allPceNodes);
for (Entry<Integer, GraphPath<String, PceGraphEdge>> entry : allWPaths.entrySet()) {
GraphPath<String, PceGraphEdge> path = entry.getValue();
LOG.info("validating path n° {} - {}", entry.getKey(), path.getVertexList());
- PostAlgoPathValidator papv = new PostAlgoPathValidator(networkTransactionService);
+ PostAlgoPathValidator papv = new PostAlgoPathValidator(networkTransactionService, spectrumConstraint);
pceResult = papv.checkPath(
path, allPceNodes, allPceLinks, pceResult, pceHardConstraints, serviceType, pceConstraintMode);
this.margin = papv.getTpceCalculatedMargin();
private Double tpceCalculatedMargin = 0.0;
private final NetworkTransactionService networkTransactionService;
+ private final BitSet spectrumConstraint;
- public PostAlgoPathValidator(NetworkTransactionService networkTransactionService) {
+ public PostAlgoPathValidator(NetworkTransactionService networkTransactionService, BitSet spectrumConstraint) {
this.networkTransactionService = networkTransactionService;
+ this.spectrumConstraint = spectrumConstraint;
}
@SuppressWarnings("fallthrough")
pceNode.getNodeId(), pceNodeVersion, sltWdthGran, ctralFreqGran);
isFlexGrid = false;
}
+ if (spectrumConstraint != null) {
+ result.and(spectrumConstraint);
+ }
+
LOG.debug("Bitset result {}", result);
return computeBestSpectrumAssignment(result, spectralWidthSlotNumber, isFlexGrid);
}
*/
package org.opendaylight.transportpce.pce;
-
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.when;
+import java.util.concurrent.ExecutionException;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.opendaylight.transportpce.pce.gnpy.consumer.GnpyConsumer;
import org.opendaylight.transportpce.pce.gnpy.consumer.GnpyConsumerImpl;
import org.opendaylight.transportpce.pce.utils.PceTestData;
-import org.opendaylight.transportpce.pce.utils.PceTestUtils;
import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev231221.mapping.Mapping;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev231221.mapping.MappingBuilder;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev231221.network.nodes.NodeInfoBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.NodeTypes;
+
@ExtendWith(MockitoExtension.class)
public class PceSendingPceRPCsTest extends AbstractTest {
@BeforeEach
- void setUp() {
+ void setUp() throws InterruptedException, ExecutionException {
this.dataBroker = getNewDataBroker();
networkTransaction = new NetworkTransactionImpl(this.dataBroker);
- PceTestUtils.writeNetworkInDataStore(this.dataBroker);
gnpyConsumer = new GnpyConsumerImpl(
"http://localhost:9998", "mylogin", "mypassword", getDataStoreContextUtil().getBindingDOMCodecServices());
pceSendingPceRPCs = new PceSendingPceRPCs(
assertNull(pceSendingPceRPCs.getMessage());
}
+
@Test
void responseCodeTest() {
assertNull(pceSendingPceRPCs.getResponseCode());
--- /dev/null
+/*
+ * Copyright © 2024 Orange Labs, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.transportpce.pce.constraints;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.nio.charset.StandardCharsets;
+import java.util.BitSet;
+import java.util.concurrent.ExecutionException;
+import org.eclipse.jdt.annotation.NonNull;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.WriteTransaction;
+import org.opendaylight.mdsal.binding.dom.codec.spi.BindingDOMCodecServices;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.transportpce.common.fixedflex.GridConstant;
+import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
+import org.opendaylight.transportpce.pce.graph.PceGraphTest;
+import org.opendaylight.transportpce.pce.utils.PceTestUtils;
+import org.opendaylight.transportpce.test.AbstractTest;
+import org.opendaylight.transportpce.test.converter.DataObjectConverter;
+import org.opendaylight.transportpce.test.converter.JSONDataObjectConverter;
+//import org.opendaylight.yang.gen.v1.http.org.openroadm.controller.customization.rev230526.controller.parameters
+//.SpectrumFilling;
+//import org.opendaylight.yang.gen.v1.http.org.openroadm.controller.customization.rev230526.controller.parameters
+//.spectrum.filling.SpectrumFillingRules;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ControllerBehaviourSettings;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+@ExtendWith(MockitoExtension.class)
+public class OperatorConstraintsTest extends AbstractTest {
+
+ private static final Logger LOG = LoggerFactory.getLogger(PceGraphTest.class);
+ private NetworkTransactionImpl networkTransaction;
+ private static final String SPEC_FILLING_FILE = "src/test/resources/spectrum-filling-rule1.json";
+// private static SpectrumFillingRules sfRule;
+ private static ControllerBehaviourSettings cbSettings;
+ private OperatorConstraints opConstraints;
+ @Mock
+ private BindingDOMCodecServices bindingDOMCodecServices;
+ private DataBroker dataBroker;
+
+ @BeforeEach
+ void setUp() throws InterruptedException, ExecutionException {
+ this.dataBroker = getNewDataBroker();
+ networkTransaction = new NetworkTransactionImpl(this.dataBroker);
+ opConstraints = new OperatorConstraints(networkTransaction);
+ PceTestUtils.writeNetworkInDataStore(this.dataBroker);
+ DataObjectConverter dataObjectConverter = JSONDataObjectConverter
+ .createWithDataStoreUtil(getDataStoreContextUtil());
+ // The Spectrum filling rules associated with CustomerProfileLamda1 is populated from a file in the Data Store
+ try (Reader reader = new FileReader(SPEC_FILLING_FILE, StandardCharsets.UTF_8)) {
+ NormalizedNode normalizedNode = dataObjectConverter.transformIntoNormalizedNode(reader).orElseThrow();
+ cbSettings = (ControllerBehaviourSettings) getDataStoreContextUtil()
+ .getBindingDOMCodecServices()
+ .fromNormalizedNode(
+ YangInstanceIdentifier.of(ControllerBehaviourSettings.QNAME), normalizedNode)
+ .getValue();
+ InstanceIdentifier<ControllerBehaviourSettings> sfIID =
+ InstanceIdentifier
+ .builder(ControllerBehaviourSettings.class)
+// .child(SpectrumFilling.class)
+// .child(SpectrumFillingRules.class)
+ .build();
+ @NonNull
+ WriteTransaction newWriteOnlyTransaction = dataBroker.newWriteOnlyTransaction();
+ newWriteOnlyTransaction.put(LogicalDatastoreType.CONFIGURATION, sfIID, cbSettings);
+ newWriteOnlyTransaction.commit().get();
+ } catch (IOException e) {
+ LOG.error("Cannot load Spectrum-Filling-Rules in Service DS ", e);
+ fail("Cannot load Spectrum-Filling-Rules");
+ }
+ }
+
+
+ @Test
+ void checkSpecttrumFilling() {
+ BitSet referenceBitSet = new BitSet(GridConstant.EFFECTIVE_BITS);
+ referenceBitSet.set(0, GridConstant.EFFECTIVE_BITS, false);
+ referenceBitSet.set(0, 8, true);
+ assertEquals(referenceBitSet, opConstraints.getBitMapConstraint("CustomerProfileLamda1"));
+ referenceBitSet.set(8, GridConstant.EFFECTIVE_BITS, true);
+ referenceBitSet.set(0, 8, false);
+ assertEquals(referenceBitSet, opConstraints.getBitMapConstraint("otherCustomer"));
+ }
+
+}
pceCalc.retrievePceNetwork();
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_100GE_T, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_100GE_T, netTransServ, PceConstraintMode.Loose, null);
assertEquals(pceGraph.calcPath(), true);
assertEquals(Optional.ofNullable(pceGraph.getmargin()), Optional.ofNullable(3.0919881995992924));
}
pceCalc.retrievePceNetwork();
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_OTUC2, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_OTUC2, netTransServ, PceConstraintMode.Loose, null);
assertEquals(pceGraph.calcPath(), true);
assertEquals(Optional.ofNullable(pceGraph.getmargin()), Optional.ofNullable(1.1559963686478447));
}
pceCalc.retrievePceNetwork();
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_OTUC3, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_OTUC3, netTransServ, PceConstraintMode.Loose, null);
assertEquals(pceGraph.calcPath(), true);
assertEquals(Optional.ofNullable(pceGraph.getmargin()), Optional.ofNullable(0.3351048800367167));
}
pceCalc.retrievePceNetwork();
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_400GE, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_400GE, netTransServ, PceConstraintMode.Loose, null);
assertEquals(pceGraph.calcPath(), false);
assertEquals(Optional.ofNullable(pceGraph.getmargin()), Optional.ofNullable(0.0));
}
pceCalc.retrievePceNetwork();
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_400GE, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_400GE, netTransServ, PceConstraintMode.Loose, null);
assertEquals(pceGraph.calcPath(), true);
assertEquals(Optional.ofNullable(pceGraph.getmargin()), Optional.ofNullable(1.4432381874659086));
}
pceCalc.retrievePceNetwork();
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_OTUC4, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_OTUC4, netTransServ, PceConstraintMode.Loose, null);
assertEquals(pceGraph.calcPath(), true);
assertEquals(Optional.ofNullable(pceGraph.getmargin()), Optional.ofNullable(1.4432381874659086));
}
pceCalc.retrievePceNetwork();
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_OTUC4, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_OTUC4, netTransServ, PceConstraintMode.Loose, null);
assertEquals(pceGraph.calcPath(), true);
assertEquals(Optional.ofNullable(pceGraph.getmargin()), Optional.ofNullable(0.0));
}
pceCalc.retrievePceNetwork();
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_100GE_T, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_100GE_T, netTransServ, PceConstraintMode.Loose, null);
assertEquals(pceGraph.calcPath(), true);
assertEquals(Optional.ofNullable(pceGraph.getmargin()), Optional.ofNullable(3.0919881995992924));
}
pceHardConstraints.setPceMetrics(PceMetric.PropagationDelay);
pceGraph = new PceGraph(pceCalc.getaendPceNode(), pceCalc.getzendPceNode(),
pceCalc.getAllPceNodes(), pceCalc.getAllPceLinks(), pceHardConstraints,
- rc, StringConstants.SERVICE_TYPE_100GE_T, netTransServ, PceConstraintMode.Loose);
+ rc, StringConstants.SERVICE_TYPE_100GE_T, netTransServ, PceConstraintMode.Loose, null);
pceGraph.setConstrains(pceHardConstraints);
assertEquals(pceGraph.calcPath(), true);
new NodeId("optical"), pceOtnNode,
new NodeId("optical2"), pceOtnNode2);
return new PceGraph(pceOtnNode, pceOtnNode2, allPceNodes, allPceLinks, pceHardConstraints,
- new PceResult(), type, null, PceConstraintMode.Loose);
+ new PceResult(), type, null, PceConstraintMode.Loose, null);
}
private void saveOpenRoadmNetwork(Network network, String networkId)
.setCustomerCode(Set.of("Some customer-code"))
.setCoRouting(new CoRoutingBuilder()
.setServiceIdentifierList(Map.of(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.constraints.co
- .routing.ServiceIdentifierListKey("Some existing-service"),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
.build())
.setCustomerCode(Set.of("Some customer-code"))
.setCoRouting(new CoRoutingBuilder()
.setServiceIdentifierList(Map.of(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.constraints.co
- .routing.ServiceIdentifierListKey("Some existing-service"),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
.build())
.setCustomerCode(Set.of("Some customer-code"))
.setCoRouting(new CoRoutingBuilder()
.setServiceIdentifierList(Map.of(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.constraints.co
- .routing.ServiceIdentifierListKey("Some existing-service"),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
.build())
.setCustomerCode(Set.of("Some customer-code"))
.setCoRouting(new CoRoutingBuilder()
.setServiceIdentifierList(Map.of(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.constraints.co
- .routing.ServiceIdentifierListKey("Some existing-service"),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
.build())
.build())
.setServiceAEnd(new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205
.path.computation.reroute.request.input.ServiceAEndBuilder()
- .setServiceFormat(ServiceFormat.Ethernet)
- .setServiceRate(Uint32.valueOf(100))
- .setClli("clli11")
- .setNodeId("XPONDER-2-2")
- .setTxDirection(new TxDirectionBuilder()
- .setPort(new PortBuilder()
- .setPortDeviceName("Some port-device-name")
- .setPortType("Some port-type")
- .setPortName("Some port-name")
- .setPortRack("Some port-rack")
- .setPortShelf("Some port-shelf")
- .setPortSlot("Some port-slot")
- .setPortSubSlot("Some port-sub-slot")
- .build())
- .build())
- .setRxDirection(new RxDirectionBuilder()
- .setPort(new PortBuilder()
- .setPortDeviceName("Some port-device-name")
- .setPortType("Some port-type")
- .setPortName("Some port-name")
- .setPortRack("Some port-rack")
- .setPortShelf("Some port-shelf")
- .setPortSlot("Some port-slot")
- .setPortSubSlot("Some port-sub-slot")
- .build())
- .build())
- .build())
+ .setServiceFormat(ServiceFormat.Ethernet)
+ .setServiceRate(Uint32.valueOf(100))
+ .setClli("clli11")
+ .setNodeId("XPONDER-2-2")
+ .setTxDirection(new TxDirectionBuilder()
+ .setPort(new PortBuilder()
+ .setPortDeviceName("Some port-device-name")
+ .setPortType("Some port-type")
+ .setPortName("Some port-name")
+ .setPortRack("Some port-rack")
+ .setPortShelf("Some port-shelf")
+ .setPortSlot("Some port-slot")
+ .setPortSubSlot("Some port-sub-slot")
+ .build())
+ .build())
+ .setRxDirection(new RxDirectionBuilder()
+ .setPort(new PortBuilder()
+ .setPortDeviceName("Some port-device-name")
+ .setPortType("Some port-type")
+ .setPortName("Some port-name")
+ .setPortRack("Some port-rack")
+ .setPortShelf("Some port-shelf")
+ .setPortSlot("Some port-slot")
+ .setPortSubSlot("Some port-sub-slot")
+ .build())
+ .build())
+ .build())
.setServiceZEnd(new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205
.path.computation.reroute.request.input.ServiceZEndBuilder()
- .setServiceFormat(ServiceFormat.Ethernet)
- .setServiceRate(Uint32.valueOf(0))
- .setClli("Some clli11")
- .setNodeId("XPONDER-1-2")
- .setTxDirection(new TxDirectionBuilder()
- .setPort(new PortBuilder()
- .setPortDeviceName("Some port-device-name")
- .setPortType("Some port-type")
- .setPortName("Some port-name")
- .setPortRack("Some port-rack")
- .setPortShelf("Some port-shelf")
- .setPortSlot("Some port-slot")
- .setPortSubSlot("Some port-sub-slot")
- .build())
- .build())
- .setRxDirection(new RxDirectionBuilder()
- .setPort(new PortBuilder()
- .setPortDeviceName("Some port-device-name")
- .setPortType("Some port-type")
- .setPortName("Some port-name")
- .setPortRack("Some port-rack")
- .setPortShelf("Some port-shelf")
- .setPortSlot("Some port-slot")
- .setPortSubSlot("Some port-sub-slot")
- .build())
- .build())
- .build())
+ .setServiceFormat(ServiceFormat.Ethernet)
+ .setServiceRate(Uint32.valueOf(0))
+ .setClli("Some clli11")
+ .setNodeId("XPONDER-1-2")
+ .setTxDirection(new TxDirectionBuilder()
+ .setPort(new PortBuilder()
+ .setPortDeviceName("Some port-device-name")
+ .setPortType("Some port-type")
+ .setPortName("Some port-name")
+ .setPortRack("Some port-rack")
+ .setPortShelf("Some port-shelf")
+ .setPortSlot("Some port-slot")
+ .setPortSubSlot("Some port-sub-slot")
+ .build())
+ .build())
+ .setRxDirection(new RxDirectionBuilder()
+ .setPort(new PortBuilder()
+ .setPortDeviceName("Some port-device-name")
+ .setPortType("Some port-type")
+ .setPortName("Some port-name")
+ .setPortRack("Some port-rack")
+ .setPortShelf("Some port-shelf")
+ .setPortSlot("Some port-slot")
+ .setPortSubSlot("Some port-sub-slot")
+ .build())
+ .build())
+ .build())
.setHardConstraints(new HardConstraintsBuilder()
- .setCustomerCode(Set.of("Some customer-code"))
- .setCoRouting(new CoRoutingBuilder()
- .setServiceIdentifierList(Map.of(
- new org.opendaylight.yang.gen.v1
- .http.org.openroadm.routing.constraints.rev221209
- .constraints.co.routing.ServiceIdentifierListKey("test"),
- new ServiceIdentifierListBuilder().setServiceIdentifier("test").build()))
- .build())
+ .setCustomerCode(Set.of("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .constraints.co.routing.ServiceIdentifierListKey("test"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("test").build()))
.build())
+ .build())
.setSoftConstraints(new SoftConstraintsBuilder()
- .setCustomerCode(Set.of("Some customer-code"))
- .setCoRouting(new CoRoutingBuilder()
- .setServiceIdentifierList(Map.of(
- new org.opendaylight.yang.gen.v1
- .http.org.openroadm.routing.constraints.rev221209
- .constraints.co.routing.ServiceIdentifierListKey("test"),
- new ServiceIdentifierListBuilder().setServiceIdentifier("test").build()))
- .build())
+ .setCustomerCode(Set.of("Some customer-code"))
+ .setCoRouting(new CoRoutingBuilder()
+ .setServiceIdentifierList(Map.of(
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .constraints.co.routing.ServiceIdentifierListKey("test"),
+ new ServiceIdentifierListBuilder().setServiceIdentifier("test").build()))
.build())
+ .build())
.setEndpoints(new EndpointsBuilder()
- .setAEndTp("AendTP")
- .setZEndTp("ZendTP")
- .build())
+ .setAEndTp("AendTP")
+ .setZEndTp("ZendTP")
+ .build())
.build();
}
.setDiversity(new DiversityBuilder()
.setServiceIdentifierList(Map.of(
new ServiceIdentifierListKey(base.getServiceName()),
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.diversity
- .existing.service.constraints.ServiceIdentifierListBuilder()
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .diversity.existing.service.constraints.ServiceIdentifierListBuilder()
.setServiceIdentifier(base.getServiceName())
.setServiceApplicability(new ServiceApplicabilityBuilder()
.setNode(true)
.setCustomer("Customer")
.setServiceName("service 1")
.setServiceAEnd(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.service.create.input
- .ServiceAEndBuilder()
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526
+ .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.rev230526.service
- .endpoint.TxDirectionBuilder()
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526
+ .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.rev230526.service
- .endpoint.RxDirectionBuilder()
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526
+ .service.endpoint.RxDirectionBuilder()
.setPort(new PortBuilder().build())
.build()))
.build())
.setServiceZEnd(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.service.create.input
- .ServiceZEndBuilder()
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526
+ .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.rev230526.service
- .endpoint.TxDirectionBuilder()
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526
+ .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.rev230526.service
- .endpoint.RxDirectionBuilder()
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526
+ .service.endpoint.RxDirectionBuilder()
.setPort(new PortBuilder().build())
.build()))
.build())
.setCustomerCode(Set.of("Some customer-code"))
.setCoRouting(new CoRoutingBuilder()
.setServiceIdentifierList(Map.of(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.constraints.co
- .routing.ServiceIdentifierListKey("Some existing-service"),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
.build())
.setCustomerCode(Set.of("Some customer-code"))
.setCoRouting(new CoRoutingBuilder()
.setServiceIdentifierList(Map.of(
- new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.constraints.co
- .routing.ServiceIdentifierListKey("Some existing-service"),
+ new org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209
+ .constraints.co.routing.ServiceIdentifierListKey("Some existing-service"),
new ServiceIdentifierListBuilder().setServiceIdentifier("Some existing-service").build()))
.build())
.build())
--- /dev/null
+{
+ "controller-behaviour-settings": {
+ "spectrum-filling": {
+ "spectrum-filling-rules": [
+ {
+ "rule-id": 1,
+ "priority": 1,
+ "RMSA-policy": "maximize-capacity",
+ "spectrum-range-of-appliance": {
+ "dedicated-signal-bandwidth-multiple": 50,
+ "spectrum-portion-id": 0,
+ "start-edge-frequency": 191.325,
+ "stop-edge-frequency": 191.375,
+ "dedicated-customer": [
+ "CustomerProfileLamda1"
+ ],
+ "non-authorized-customer": [
+ "All-other"
+ ]
+ }
+ },
+ {
+ "rule-id": 2,
+ "priority": 1,
+ "RMSA-policy": "maximize-capacity",
+ "spectrum-range-of-appliance": {
+ "spectrum-portion-id": 1,
+ "start-edge-frequency": 191.375,
+ "stop-edge-frequency": 196.125,
+ "non-authorized-customer": [
+ "CustomerProfileLamda1"
+ ]
+ }
+ }
+ ]
+ }
+ }
+}
return performPCE(serviceCreateInput.getHardConstraints(), serviceCreateInput.getSoftConstraints(),
serviceCreateInput.getServiceName(), serviceCreateInput.getSdncRequestHeader(),
serviceCreateInput.getServiceAEnd(), serviceCreateInput.getServiceZEnd(),
- ServiceNotificationTypes.ServiceCreateResult, reserveResource);
+ ServiceNotificationTypes.ServiceCreateResult, reserveResource,
+ serviceCreateInput.getCustomer());
} else {
return returnPCEFailed();
}
return performPCE(tempServiceCreateInput.getHardConstraints(), tempServiceCreateInput.getSoftConstraints(),
tempServiceCreateInput.getCommonId(), tempServiceCreateInput.getSdncRequestHeader(),
tempServiceCreateInput.getServiceAEnd(), tempServiceCreateInput.getServiceZEnd(),
- ServiceNotificationTypes.ServiceCreateResult, reserveResource);
+ ServiceNotificationTypes.ServiceCreateResult, reserveResource,
+ tempServiceCreateInput.getCustomer());
} else {
return returnPCEFailed();
}
serviceFeasibilityCheckInput.getSoftConstraints(), serviceFeasibilityCheckInput.getCommonId(),
serviceFeasibilityCheckInput.getSdncRequestHeader(), serviceFeasibilityCheckInput.getServiceAEnd(),
serviceFeasibilityCheckInput.getServiceZEnd(),
- ServiceNotificationTypes.ServiceCreateResult, reserveResource);
+ ServiceNotificationTypes.ServiceCreateResult, reserveResource,
+ serviceFeasibilityCheckInput.getCustomer());
} else {
return returnPCEFailed();
}
private PathComputationRequestOutput performPCE(HardConstraints hardConstraints, SoftConstraints softConstraints,
String serviceName, SdncRequestHeader sdncRequestHeader, ServiceEndpoint serviceAEnd,
- ServiceEndpoint serviceZEnd, ServiceNotificationTypes notifType, boolean reserveResource) {
+ ServiceEndpoint serviceZEnd, ServiceNotificationTypes notifType, boolean reserveResource,
+ String customerName) {
LOG.info("Calling path computation.");
notification = new ServiceRpcResultShBuilder().setNotificationType(notifType).setServiceName(serviceName)
.setStatus(RpcStatusEx.Pending)
FutureCallback<PathComputationRequestOutput> pceCallback =
new PathComputationRequestOutputCallback(notifType, serviceName);
PathComputationRequestInput pathComputationRequestInput = createPceRequestInput(serviceName, sdncRequestHeader,
- hardConstraints, softConstraints, reserveResource, serviceAEnd, serviceZEnd);
+ hardConstraints, softConstraints, reserveResource, serviceAEnd, serviceZEnd, customerName);
ListenableFuture<PathComputationRequestOutput> pce = this.pathComputationService
.pathComputationRequest(pathComputationRequestInput);
Futures.addCallback(pce, pceCallback, executor);
private PathComputationRequestInput createPceRequestInput(String serviceName,
SdncRequestHeader serviceHandler, HardConstraints hardConstraints,
SoftConstraints softConstraints, Boolean reserveResource, ServiceEndpoint serviceAEnd,
- ServiceEndpoint serviceZEnd) {
+ ServiceEndpoint serviceZEnd, String customerName) {
LOG.info("Mapping ServiceCreateInput or ServiceFeasibilityCheckInput or serviceReconfigureInput to PCE"
+ "requests");
ServiceHandlerHeaderBuilder serviceHandlerHeader = new ServiceHandlerHeaderBuilder();
.setHardConstraints(hardConstraints)
.setSoftConstraints(softConstraints)
.setPceRoutingMetric(PceMetric.TEMetric)
+ .setCustomerName(customerName)
.setServiceAEnd(ModelMappingUtils.createServiceAEnd(serviceAEnd))
.setServiceZEnd(ModelMappingUtils.createServiceZEnd(serviceZEnd))
.build();
</current-pm-entry>
</current-pm-list>
+ <current-pm-description xmlns="http://honeynode-simulator/pm-handling">
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:opticalTransport</triggering-interface>
+ <pm-name-prefix>opticalPowerOutput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of the first NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[TX/TXRX]-[frequency]-->
+ <!--Its value will be changed as additional NMC are created-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>0</default-current-value>
+ <max-value>21.82</max-value>
+ <min-value>-9.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>5</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:opticalTransport</triggering-interface>
+ <pm-name-prefix>opticalPowerInput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of a NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[RX/TXRX]-[frequency]-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>-17.0</default-current-value>
+ <max-value>-9.0</max-value>
+ <min-value>-25.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>10</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:openROADMOpticalMultiplex</triggering-interface>
+ <pm-name-prefix>opticalPowerOutput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of the first NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[TX/TXRX]-[frequency]-->
+ <!--Its value will be changed as additional NMC are created-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>0</default-current-value>
+ <max-value>21.82</max-value>
+ <min-value>-9.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>5</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:openROADMOpticalMultiplex</triggering-interface>
+ <pm-name-prefix>opticalPowerInput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of a NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[RX/TXRX]-[frequency]-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>-17.0</default-current-value>
+ <max-value>-9.0</max-value>
+ <min-value>-25.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>10</evolution-range>
+ </pm-generation-rules>
+ </current-pm-description>
+
</data>
</connection-ports>
</degree>
</org-openroadm-device>
- </data>
+
+ <current-pm-list xmlns="http://org/openroadm/pm">
+ <current-pm-entry>
+ <pm-resource-instance xmlns:d="http://org/openroadm/device">/d:org-openroadm-device/d:interface[d:name='OTS-DEG1-TTP-TXRX']</pm-resource-instance>
+ <pm-resource-type>interface</pm-resource-type>
+ <pm-resource-type-extension></pm-resource-type-extension>
+ <retrieval-time>2018-06-07T13:22:58+00:00</retrieval-time>
+ <current-pm>
+ <type>opticalPowerOutput</type>
+ <extension></extension>
+ <location>nearEnd</location>
+ <direction>tx</direction>
+ <measurement>
+ <granularity>15min</granularity>
+ <pmParameterValue>2.5</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ <measurement>
+ <granularity>24Hour</granularity>
+ <pmParameterValue>2.23</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ </current-pm>
+ <current-pm>
+ <type>opticalPowerInput</type>
+ <extension></extension>
+ <location>nearEnd</location>
+ <direction>rx</direction>
+ <measurement>
+ <granularity>15min</granularity>
+ <pmParameterValue>-21.1</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ <measurement>
+ <granularity>24Hour</granularity>
+ <pmParameterValue>-49.3</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ </current-pm>
+ <current-pm>
+ <type>opticalReturnLoss</type>
+ <extension></extension>
+ <location>nearEnd</location>
+ <direction>rx</direction>
+ <measurement>
+ <granularity>15min</granularity>
+ <pmParameterValue>40</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ <measurement>
+ <granularity>24Hour</granularity>
+ <pmParameterValue>44</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ </current-pm>
+ </current-pm-entry>
+ <current-pm-entry>
+ <pm-resource-instance xmlns:d="http://org/openroadm/device">/d:org-openroadm-device/d:interface[d:name='OTS-DEG2-TTP-TXRX']</pm-resource-instance>
+ <pm-resource-type>interface</pm-resource-type>
+ <pm-resource-type-extension></pm-resource-type-extension>
+ <retrieval-time>2018-06-07T13:22:58+00:00</retrieval-time>
+ <current-pm>
+ <type>opticalPowerOutput</type>
+ <extension></extension>
+ <location>nearEnd</location>
+ <direction>tx</direction>
+ <measurement>
+ <granularity>15min</granularity>
+ <pmParameterValue>2.5</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ <measurement>
+ <granularity>24Hour</granularity>
+ <pmParameterValue>2.23</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ </current-pm>
+ <current-pm>
+ <type>opticalPowerInput</type>
+ <extension></extension>
+ <location>nearEnd</location>
+ <direction>rx</direction>
+ <measurement>
+ <granularity>15min</granularity>
+ <pmParameterValue>-21.1</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ <measurement>
+ <granularity>24Hour</granularity>
+ <pmParameterValue>-49.3</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ </current-pm>
+ <current-pm>
+ <type>opticalReturnLoss</type>
+ <extension></extension>
+ <location>nearEnd</location>
+ <direction>rx</direction>
+ <measurement>
+ <granularity>15min</granularity>
+ <pmParameterValue>40</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ <measurement>
+ <granularity>24Hour</granularity>
+ <pmParameterValue>44</pmParameterValue>
+ <pmParameterUnit>dBm</pmParameterUnit>
+ <validity>complete</validity>
+ </measurement>
+ </current-pm>
+ </current-pm-entry>
+ </current-pm-list>
+
+ <current-pm-description xmlns="http://honeynode-simulator/pm-handling">
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:opticalTransport</triggering-interface>
+ <pm-name-prefix>opticalPowerOutput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of the first NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[TX/TXRX]-[frequency]-->
+ <!--Its value will be changed as additional NMC are created-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>0</default-current-value>
+ <max-value>21.82</max-value>
+ <min-value>-9.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>5</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:opticalTransport</triggering-interface>
+ <pm-name-prefix>opticalPowerInput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of a NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[RX/TXRX]-[frequency]-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>-17.0</default-current-value>
+ <max-value>-9.0</max-value>
+ <min-value>-25.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>10</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:openROADMOpticalMultiplex</triggering-interface>
+ <pm-name-prefix>opticalPowerOutput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of the first NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[TX/TXRX]-[frequency]-->
+ <!--Its value will be changed as additional NMC are created-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>0</default-current-value>
+ <max-value>21.82</max-value>
+ <min-value>-9.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>5</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:openROADMOpticalMultiplex</triggering-interface>
+ <pm-name-prefix>opticalPowerInput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of a NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[RX/TXRX]-[frequency]-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>-17.0</default-current-value>
+ <max-value>-9.0</max-value>
+ <min-value>-25.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>10</evolution-range>
+ </pm-generation-rules>
+ </current-pm-description>
+
+</data>
</current-pm-entry>
</current-pm-list>
- </data>
+ <current-pm-description xmlns="http://honeynode-simulator/pm-handling">
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:opticalTransport</triggering-interface>
+ <pm-name-prefix>opticalPowerOutput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of the first NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[TX/TXRX]-[frequency]-->
+ <!--Its value will be changed as additional NMC are created-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>0</default-current-value>
+ <max-value>21.82</max-value>
+ <min-value>-9.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>5</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:opticalTransport</triggering-interface>
+ <pm-name-prefix>opticalPowerInput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of a NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[RX/TXRX]-[frequency]-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>-17.0</default-current-value>
+ <max-value>-9.0</max-value>
+ <min-value>-25.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>10</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:openROADMOpticalMultiplex</triggering-interface>
+ <pm-name-prefix>opticalPowerOutput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of the first NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[TX/TXRX]-[frequency]-->
+ <!--Its value will be changed as additional NMC are created-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>0</default-current-value>
+ <max-value>21.82</max-value>
+ <min-value>-9.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>5</evolution-range>
+ </pm-generation-rules>
+ <pm-generation-rules>
+ <triggering-interface xmlns:org-openroadm-interfaces="http://org/openroadm/interfaces">org-openroadm-interfaces:openROADMOpticalMultiplex</triggering-interface>
+ <pm-name-prefix>opticalPowerInput</pm-name-prefix>
+ <!--This PM is generated on ROADMs on creation of a NMC (MediaChannel) interface nmc-ttp-DEGX-TTP-[RX/TXRX]-[frequency]-->
+ <analog>true</analog>
+ <!--Default value is purely indicative, the value shall be set trough pm-interact RPC according to a value calculated from span loss and Power mask -->
+ <!--The value set through the RPC will be the value to keep as a reference out of any forced mode use to simulate a failure -->
+ <default-current-value>-17.0</default-current-value>
+ <max-value>-9.0</max-value>
+ <min-value>-25.0</min-value>
+ <!--Evolution range is a percentage of the min max range expressed in dB-->
+ <evolution-range>10</evolution-range>
+ </pm-generation-rules>
+ </current-pm-description>
+
+</data>