2 * Copyright © 2017 AT&T and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.common.mapping;
11 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210425.mapping.Mapping;
12 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210425.mc.capabilities.McCapabilities;
13 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210425.network.Nodes;
15 public interface PortMapping {
18 * This method creates logical to physical port mapping for a given device.
19 * Instead of parsing all the circuit packs/ports in the device, this methods
20 * does a selective read operation on degree/srg subtree to get circuit
21 * packs/ports that map to :
24 * 1. DEGn-TTP-TX, DEGn-TTP-RX, DEGn-TTP-TXRX
27 * 2. SRGn-PPp-TX, SRGn-PPp-RX, SRGn-PPp-TXRX
36 * If the port is Mw it also store the OMS, OTS interface provisioned on the
37 * port. It skips the logical ports that are internal. If operation is
38 * successful the mapping gets stored in datastore corresponding to
39 * portmapping.yang data model.
46 * @return true/false based on status of operation
48 boolean createMappingData(String nodeId, String nodeVersion);
51 * This method removes mapping data from the datastore after disconnecting ODL
52 * from a Netconf device.
57 void deleteMappingData(String nodeId);
60 * This method for a given node's termination point returns the Mapping object
61 * based on portmapping.yang model stored in the MD-SAL data store which is
62 * created when the node is connected for the first time. The mapping object
63 * basically contains the following attributes of interest:
66 * 1. Supporting circuit pack
72 * 3. Supporting OTS/OMS interface (if port on ROADM)
75 * Unique Identifier for the node of interest.
76 * @param logicalConnPoint
77 * Name of the logical point
79 * @return Result Mapping object if success otherwise null.
81 Mapping getMapping(String nodeId, String logicalConnPoint);
84 * This method allows retrieving a Mapping object from the mapping list stored in
85 * the MD-SAL data store. The main interest is to retrieve the
86 * logical-connection-point associated with a given port on a supporting
90 * Unique Identifier for the node of interest.
91 * @param circuitPackName
92 * Name of the supporting circuit-pack
94 * Name of the supporting port
96 * @return Result Mapping object if success otherwise null.
98 Mapping getMapping(String nodeId, String circuitPackName, String portName);
101 * This method, for a given node media channel-capabilities, returns the object
102 * based on portmapping.yang model stored in the MD-SAL data store which is
103 * created when the node is connected for the first time. The mapping object
104 * basically contains the following attributes of interest:
107 * 1. slot width granularity
110 * 2. center frequency granularity
113 * 3. Supporting OMS interface (if port on ROADM)
116 * 4. Supporting OTS interface (if port on ROADM)
119 * Unique Identifier for the node of interest.
121 * Name of the MC-capability
123 * @return Result McCapabilities.
125 McCapabilities getMcCapbilities(String nodeId, String mcLcp);
128 * This method for a given node, allows to update a specific mapping based on
129 * portmapping.yang model already stored in the MD-SAL data store, following
130 * some changes on the device port (creation of interface supported on this
131 * port, change of port admin state, etc).
134 * Unique Identifier for the node of interest.
136 * Old mapping to be updated.
138 * @return Result true/false based on status of operation.
140 boolean updateMapping(String nodeId, Mapping mapping);
143 * Returns all Mapping informations for a given ordm device. This method returns
144 * all Mapping informations already stored in the MD-SAL data store for a given
145 * openroadm device. Beyound the list of mappings, it gives access to general
146 * node information as its version or its node type, etc.
149 * Unique Identifier for the node of interest.
151 * @return node data if success otherwise null.
153 Nodes getNode(String nodeId);