X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fcommon%2Fmapping%2FPortMapping.java;h=9ae8e9c8b6d759f047e6cedea66fc87e1e8bc3ca;hb=34cbca4ad81fbd29e833197f0e4b09128daa8b95;hp=ccbd13547253c9036e1c99fdd8fde85fbd653eb8;hpb=dcc4c10093436dbb7692c50c210daf86fd5b124a;p=transportpce.git diff --git a/common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMapping.java b/common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMapping.java index ccbd13547..9ae8e9c8b 100644 --- a/common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMapping.java +++ b/common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMapping.java @@ -8,7 +8,8 @@ package org.opendaylight.transportpce.common.mapping; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.portmapping.rev170228.network.nodes.Mapping; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev200113.network.Nodes; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev200113.network.nodes.Mapping; public interface PortMapping { @@ -36,21 +37,29 @@ public interface PortMapping { * successful the mapping gets stored in datastore corresponding to * portmapping.yang data model. * + * @param nodeId + * node ID + * @param nodeVersion + * node version + * * @return true/false based on status of operation */ - boolean createMappingData(String nodeId); + boolean createMappingData(String nodeId, String nodeVersion); /** * This method removes mapping data from the datastore after disconnecting * ODL from a Netconf device. + * + * @param nodeId + * node ID */ void deleteMappingData(String nodeId); /** - * This method for a given node's termination point returns the Mapping object based on - * portmapping.yang model stored in the MD-SAL data store which is created when the node is - * connected for the first time. The mapping object basically contains the following attributes of - * interest: + * This method for a given node's termination point returns the Mapping + * object based on portmapping.yang model stored in the MD-SAL data store + * which is created when the node is connected for the first time. The + * mapping object basically contains the following attributes of interest: * *

* 1. Supporting circuit pack @@ -59,13 +68,31 @@ public interface PortMapping { * 2. Supporting port * *

- * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS interface (if port on ROADM) + * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS + * interface (if port on ROADM) * - * @param nodeId Unique Identifier for the node of interest. - * @param logicalConnPoint Name of the logical point + * @param nodeId + * Unique Identifier for the node of interest. + * @param logicalConnPoint + * Name of the logical point * * @return Result Mapping object if success otherwise null. */ - Mapping getMapping(String nodeId, String logicalConnPoint); + + boolean updateMapping(String nodeId, Mapping mapping); + + /** + * Returns all Mapping informations for a given ordm device. + * This method returns all Mapping informations already stored in the MD-SAL + * data store for a given openroadm device. Beyound the list of mappings, it + * gives access to general node information as its version or its node type, + * etc. + * + * @param nodeId + * Unique Identifier for the node of interest. + * + * @return node data if success otherwise null. + */ + Nodes getNode(String nodeId); }