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=c50027559e6117ba359cf060207bc95cac972592;hb=67763b4d82e44c68fdbc765cdeec5496ff65b01e;hp=a9965de051c8e274496eea63ff9a92e01f35b115;hpb=c8c92c9ac1c175fe200dd347081a8395820798c8;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 a9965de05..c50027559 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,15 +8,15 @@ package org.opendaylight.transportpce.common.mapping; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210310.network.Nodes; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210310.network.nodes.Mapping; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210310.network.nodes.McCapabilities; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210315.mapping.Mapping; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210315.mc.capabilities.McCapabilities; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210315.network.Nodes; public interface PortMapping { /** * This method creates logical to physical port mapping for a given device. - * Instead of parsing all the circuit packs/ports in the device this methods + * Instead of parsing all the circuit packs/ports in the device, this methods * does a selective read operation on degree/srg subtree to get circuit * packs/ports that map to : * @@ -48,8 +48,8 @@ public interface PortMapping { boolean createMappingData(String nodeId, String nodeVersion); /** - * This method removes mapping data from the datastore after disconnecting - * ODL from a Netconf device. + * This method removes mapping data from the datastore after disconnecting ODL + * from a Netconf device. * * @param nodeId * node ID @@ -57,10 +57,10 @@ public interface PortMapping { 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 @@ -69,8 +69,7 @@ public interface PortMapping { * 2. Supporting port * *

- * 3. Supporting OMS interface (if port on ROADM) 4. Supporting OTS - * interface (if port on ROADM) + * 3. Supporting OTS/OMS interface (if port on ROADM) * * @param nodeId * Unique Identifier for the node of interest. @@ -82,10 +81,27 @@ public interface PortMapping { Mapping getMapping(String nodeId, String logicalConnPoint); /** - * This method for a given node's media channel-capabilities returns the - * 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 allows retrieving a Mapping object from the mapping list stored in + * the MD-SAL data store. The main interest is to retrieve the + * logical-connection-point associated with a given port on a supporting + * circuit-pack + * + * @param nodeId + * Unique Identifier for the node of interest. + * @param circuitPackName + * Name of the supporting circuit-pack + * @param circuitPackName + * Name of the supporting port + * + * @return Result Mapping object if success otherwise null. + */ + Mapping getMapping(String nodeId, String circuitPackName, String portName); + + /** + * This method, for a given node media channel-capabilities, returns the 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. slot width granularity @@ -94,8 +110,10 @@ public interface PortMapping { * 2. center frequency granularity * *

- * 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. @@ -106,14 +124,26 @@ public interface PortMapping { */ McCapabilities getMcCapbilities(String nodeId, String mcLcp); + /** + * This method for a given node, allows to update a specific mapping based on + * portmapping.yang model already stored in the MD-SAL data store, following + * some changes on the device port (creation of interface supported on this + * port, change of port admin state, etc). + * + * @param nodeId + * Unique Identifier for the node of interest. + * @param mapping + * Old mapping to be updated. + * + * @return Result true/false based on status of operation. + */ 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. + * 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.