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.rev201012.network.Nodes;
12 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.nodes.Mapping;
13 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.nodes.McCapabilities;
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
52 * ODL from a Netconf device.
57 void deleteMappingData(String nodeId);
60 * This method for a given node's termination point returns the Mapping
61 * object based on portmapping.yang model stored in the MD-SAL data store
62 * which is created when the node is connected for the first time. The
63 * mapping object basically contains the following attributes of interest:
66 * 1. Supporting circuit pack
72 * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS
73 * interface (if port on ROADM)
76 * Unique Identifier for the node of interest.
77 * @param logicalConnPoint
78 * Name of the logical point
80 * @return Result Mapping object if success otherwise null.
82 Mapping getMapping(String nodeId, String logicalConnPoint);
85 * This method for a given node's media channel-capabilities returns the
86 * object based on portmapping.yang model stored in the MD-SAL data store
87 * which is created when the node is connected for the first time. The
88 * mapping object basically contains the following attributes of interest:
91 * 1. slot width granularity
94 * 2. center frequency granularity
97 * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS
98 * interface (if port on ROADM)
101 * Unique Identifier for the node of interest.
103 * Name of the MC-capability
105 * @return Result McCapabilities.
107 McCapabilities getMcCapbilities(String nodeId, String mcLcp);
109 boolean updateMapping(String nodeId, Mapping mapping);
112 * Returns all Mapping informations for a given ordm device.
113 * This method returns all Mapping informations already stored in the MD-SAL
114 * data store for a given openroadm device. Beyound the list of mappings, it
115 * gives access to general node information as its version or its node type,
119 * Unique Identifier for the node of interest.
121 * @return node data if success otherwise null.
123 Nodes getNode(String nodeId);