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.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping;
13 public interface PortMapping {
16 * This method creates logical to physical port mapping for a given device.
17 * Instead of parsing all the circuit packs/ports in the device this methods
18 * does a selective read operation on degree/srg subtree to get circuit
19 * packs/ports that map to :
22 * 1. DEGn-TTP-TX, DEGn-TTP-RX, DEGn-TTP-TXRX
25 * 2. SRGn-PPp-TX, SRGn-PPp-RX, SRGn-PPp-TXRX
34 * If the port is Mw it also store the OMS, OTS interface provisioned on the
35 * port. It skips the logical ports that are internal. If operation is
36 * successful the mapping gets stored in datastore corresponding to
37 * portmapping.yang data model.
42 * @return true/false based on status of operation
44 boolean createMappingData(String nodeId);
47 * This method removes mapping data from the datastore after disconnecting
48 * ODL from a Netconf device.
53 void deleteMappingData(String nodeId);
56 * This method for a given node's termination point returns the Mapping object based on
57 * portmapping.yang model stored in the MD-SAL data store which is created when the node is
58 * connected for the first time. The mapping object basically contains the following attributes of
62 * 1. Supporting circuit pack
68 * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS interface (if port on ROADM)
70 * @param nodeId Unique Identifier for the node of interest.
71 * @param logicalConnPoint Name of the logical point
73 * @return Result Mapping object if success otherwise null.
76 Mapping getMapping(String nodeId, String logicalConnPoint);