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.rev191115.network.Nodes;
12 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev191115.network.nodes.Mapping;
14 public interface PortMapping {
17 * This method creates logical to physical port mapping for a given device.
18 * Instead of parsing all the circuit packs/ports in the device this methods
19 * does a selective read operation on degree/srg subtree to get circuit
20 * packs/ports that map to :
23 * 1. DEGn-TTP-TX, DEGn-TTP-RX, DEGn-TTP-TXRX
26 * 2. SRGn-PPp-TX, SRGn-PPp-RX, SRGn-PPp-TXRX
35 * If the port is Mw it also store the OMS, OTS interface provisioned on the
36 * port. It skips the logical ports that are internal. If operation is
37 * successful the mapping gets stored in datastore corresponding to
38 * portmapping.yang data model.
45 * @return true/false based on status of operation
47 boolean createMappingData(String nodeId, String nodeVersion);
50 * This method removes mapping data from the datastore after disconnecting
51 * ODL from a Netconf device.
56 void deleteMappingData(String nodeId);
59 * This method for a given node's termination point returns the Mapping
60 * object based on portmapping.yang model stored in the MD-SAL data store
61 * which is created when the node is connected for the first time. The
62 * mapping object basically contains the following attributes of interest:
65 * 1. Supporting circuit pack
71 * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS
72 * 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);
83 boolean updateMapping(String nodeId, Mapping mapping);
86 * Returns all Mapping informations for a given ordm device.
87 * This method returns all Mapping informations already stored in the MD-SAL
88 * data store for a given openroadm device. Beyound the list of mappings, it
89 * gives access to general node information as its version or its node type,
93 * Unique Identifier for the node of interest.
95 * @return node data if success otherwise null.
97 Nodes getNode(String nodeId);