Merge "makes renderer ignore controller-config"
authorCédric Ollivier <ollivier.cedric@gmail.com>
Fri, 1 Sep 2017 07:27:29 +0000 (07:27 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 1 Sep 2017 07:27:29 +0000 (07:27 +0000)
35 files changed:
api/pom.xml
api/src/main/yang/renderer.yang
cli/src/main/java/org/opendaylight/transportpce/cli/api/TransportpceCliCommands.java
ordmodels/pom.xml
ordmodels/src/main/yang/org-openroadm-common-service-types.yang
ordmodels/src/main/yang/org-openroadm-routing-constraints.yang [moved from ordmodels/src/main/yang/org-openroadm-routing-constraints@2016-10-14.yang with 100% similarity]
ordmodels/src/main/yang/org-openroadm-service.yang [new file with mode: 0644]
pom.xml
renderer/src/main/java/org/opendaylight/transportpce/renderer/RendererNotificationsImpl.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/mapping/PortMapping.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmEthIterface.java [new file with mode: 0644]
renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmInterfaces.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmOchInterface.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmOdu4Interface.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmOtu4Interface.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmXponderInterface.java [new file with mode: 0644]
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/CrossConnect.java
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/DeviceRenderer.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/CheckCoherencyHardSoft.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/LoggingFuturesCallBack.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/MappingAndSendingPCRequest.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/MappingAndSendingSIRequest.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/MappingConstraints.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/MyEndpoint.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/ServicehandlerCompliancyCheck.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/ServicehandlerTxRxCheck.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerProvider.java
stubpce/src/main/java/org/opendaylight/transportpce/stubpce/CompliancyCheck.java
stubpce/src/main/java/org/opendaylight/transportpce/stubpce/SendingPceRPCs.java
stubpce/src/main/java/org/opendaylight/transportpce/stubpce/impl/StubpceImpl.java
stubpce/src/main/java/org/opendaylight/transportpce/stubpce/impl/StubpceProvider.java
stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/SendingRendererRPCs.java
stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererImpl.java
stubrenderer/src/main/java/org/opendaylight/transportpce/stubrenderer/impl/StubrendererProvider.java

index 905b5f676ee2922fe6c793e03dfa980429ab6996..ca7b2bb06b2e315214e02d9d917955f815bfd463 100644 (file)
@@ -35,23 +35,44 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <build>
      <plugins>
        <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>3.0.1</version>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            <Include-Resource>{maven-resources},target/classes/LICENSE,META-INF/git.properties=-target/classes/META-INF/git.properties</Include-Resource>
-            <_exportcontents>
-              org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.transportpce.stubrenderer.rev170403.service.implementation.request.input,
-              org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.rev170120.service.implementation.request.input,
-              org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev161014.internal.link,
-              org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev161014.internal.links,*
-            </_exportcontents>
-          </instructions>
-        </configuration>
+         <groupId>org.apache.felix</groupId>
+         <artifactId>maven-bundle-plugin</artifactId>
+         <version>3.0.1</version>
+         <extensions>true</extensions>
+         <configuration>
+           <instructions>
+             <Include-Resource>{maven-resources},target/classes/LICENSE,META-INF/git.properties=-target/classes/META-INF/git.properties</Include-Resource>
+             <_exportcontents>
+               org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.transportpce.stubrenderer.rev170403.service.implementation.request.input,
+               org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.rev170120.service.implementation.request.input,
+               org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev161014.internal.link,
+               org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev161014.internal.links,*
+             </_exportcontents>
+           </instructions>
+         </configuration>
+       </plugin>
+       <plugin>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>maven-javadoc-plugin</artifactId>
+         <configuration>
+           <sourcepath>*/target/generated-sources/mdsal-binding/*</sourcepath>
+           <excludePackageNames>*</excludePackageNames>
+         </configuration>
        </plugin>
      </plugins>
   </build>
 
+  <reporting>
+     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <sourcepath>*/target/generated-sources/mdsal-binding/*</sourcepath>
+          <excludePackageNames>*</excludePackageNames>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
 </project>
index c1eb202288f1df4118eccb725a662ecac0fa8f26..fd15f1cc2a93f461bac7d272b8784554dbe95268 100644 (file)
@@ -8,9 +8,15 @@ module renderer {
   }
   rpc service-path{
     input{
+      leaf service-name{
+          type string;
+      }
       leaf wave-number{
         type uint32;
       }
+      leaf modulation-format {
+          type string;
+      }
       leaf operation{
         type enumeration{
           enum "create"{
index 8a5b0f454d898c7041402db3efe501ba783cfa99..5a9561f6639e3b16c74669e1843b8ba1d0cbe57a 100644 (file)
@@ -12,6 +12,12 @@ public interface TransportpceCliCommands {
     /**
      * Define the Karaf command method signatures and the Javadoc for each.
      * Below method is just an example
+     *
+     * @param testArgument
+     *           testArgument
+     *
+     * @return
+     *           returns nothing
      */
     Object testCommand(Object testArgument);
 }
index 855c650875610e9087e4503f78f71e52f4bce4c6..55d5ebc1af909e652a0175da853803fb0c7ced8e 100644 (file)
@@ -21,6 +21,33 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <version>0.2.0-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <sourcepath>*/target/generated-sources/mdsal-binding/*</sourcepath>
+          <excludePackageNames>*</excludePackageNames>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <sourcepath>*/target/generated-sources/mdsal-binding/*</sourcepath>
+          <excludePackageNames>*</excludePackageNames>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+
   <dependencies>
     <dependency>
       <groupId>org.opendaylight.netconf</groupId>
index 6e17b7d7c44e39b316544bf504111186b13bba0b..e7568b14d6397ddf74ef40a4d67944ba0e576423 100644 (file)
@@ -8,16 +8,14 @@ module org-openroadm-common-service-types {
   import ietf-inet-types {
     prefix inet;
   }
-  import org-openroadm-routing-constraints { 
-         prefix org-openroadm-routing-constraints; 
-         revision-date 2016-10-14; 
+  import org-openroadm-routing-constraints {
+    prefix org-openroadm-routing-constraints;
   }
   import org-openroadm-topology {
     prefix org-openroadm-topology;
   }
-  import org-openroadm-common-types { 
-         prefix org-openroadm-common-types; 
-         revision-date 2016-10-14; 
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
   }
   import org-openroadm-resource-types {
     prefix org-openroadm-resource-types;
@@ -471,10 +469,6 @@ module org-openroadm-common-service-types {
       enum "service-restoration-result" {
         value 7;
       }
-      //Add Martial
-      enum "service-feasibility-check-result" {
-        value 8;
-      } 
     }
   }
 
diff --git a/ordmodels/src/main/yang/org-openroadm-service.yang b/ordmodels/src/main/yang/org-openroadm-service.yang
new file mode 100644 (file)
index 0000000..63dfa8a
--- /dev/null
@@ -0,0 +1,547 @@
+module org-openroadm-service {
+  namespace "http://org/openroadm/service";
+  prefix org-openroadm-service;
+
+  import ietf-yang-types {
+    prefix yang;
+  }
+  import org-openroadm-routing-constraints {
+    prefix org-openroadm-routing-constraints;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+  }
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+  }
+  import org-openroadm-common-service-types {
+    prefix org-openroadm-common-service-types;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of services.
+       
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
+      AT&T Intellectual Property.  All other rights reserved.
+      
+      Redistribution and use in source and binary forms, with or without modification, 
+      are permitted provided that the following conditions are met:
+      
+      * Redistributions of source code must retain the above copyright notice, this 
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice, 
+        this list of conditions and the following disclaimer in the documentation and/or 
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
+        contributors may be used to endorse or promote products derived from this software 
+        without specific prior written permission.
+      
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  rpc service-create {
+    input {
+      leaf service-name {
+        type string;
+        description
+          "Identifier for the service to be created in
+           the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
+        mandatory true;
+      }
+      leaf common-id {
+        type string;
+        description
+          "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
+      }
+      uses org-openroadm-common-service-types:sdnc-request-header;
+      leaf connection-type {
+        type org-openroadm-common-service-types:connection-type;
+        mandatory true;
+      }
+      container service-a-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
+      container service-z-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
+      uses org-openroadm-routing-constraints:routing-constraints;
+      uses org-openroadm-common-service-types:service-information;
+    }
+    output {
+      uses org-openroadm-common-service-types:configuration-response-common;
+      uses org-openroadm-common-service-types:response-parameters;
+    }
+    description
+      "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+       service-rpc-result Notification shall be sent.";
+  }
+  rpc service-feasibility-check {
+    input {
+      leaf common-id {
+        type string;
+        mandatory true;
+        description
+          "To be used by the ROADM controller to identify the routing 
+           constraints received from planning application (PED).";
+      }
+      uses org-openroadm-common-service-types:sdnc-request-header;
+      leaf connection-type {
+        type org-openroadm-common-service-types:connection-type;
+      }
+      container service-a-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
+      container service-z-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
+      uses org-openroadm-routing-constraints:routing-constraints;
+      uses org-openroadm-common-service-types:service-information;
+    }
+    output {
+      uses org-openroadm-common-service-types:configuration-response-common;
+      uses org-openroadm-common-service-types:response-parameters;
+      container service-a-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+        list equipment-required {
+          description
+            "List of required equipment, including equipment type and quantity";
+          key "eqipment-identifier";
+          leaf eqipment-identifier {
+            type string;
+          }
+          leaf equipment-type {
+            type string;
+          }
+          leaf equipment-quantity {
+            type uint32;
+          }
+        }
+      }
+      container service-z-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+        list equipment-required {
+          description
+            "List of required equipment, including equipment type and quantity";
+          key "eqipment-identifier";
+          leaf eqipment-identifier {
+            type string;
+          }
+          leaf equipment-type {
+            type string;
+          }
+          leaf equipment-quantity {
+            type uint32;
+          }
+        }
+      }
+      list intermediate-sites {
+        key "clli";
+        uses org-openroadm-common-service-types:service-endpoint;
+        list equipment-required {
+          description
+            "List of required equipment, including equipment type and quantity";
+          key "eqipment-identifier";
+          leaf eqipment-identifier {
+            type string;
+          }
+          leaf equipment-type {
+            type string;
+          }
+          leaf equipment-quantity {
+            type uint32;
+          }
+        }
+      }
+    }
+    description
+      "Whether a service was possible to be created, and if so
+       the routing constraints match and the a and z end connection that have
+       to match";
+  }
+  rpc service-delete {
+    input {
+      uses org-openroadm-common-service-types:sdnc-request-header;
+      container service-delete-req-info {
+        leaf service-name {
+          type string;
+          description
+            "Identifier for the service to be deleted in
+             the ROADM network, e.g., CLFI, CLCI, etc.";
+          mandatory true;
+        }
+        leaf due-date {
+          type yang:date-and-time;
+          description
+            "date and time service to be turned down. If missing, now.";
+        }
+        leaf tail-retention {
+          type enumeration {
+            enum "yes" {
+              value 1;
+              description
+                "tails are left intact ";
+            }
+            enum "no" {
+              value 2;
+              description
+                "tails are deleted";
+            }
+          }
+          mandatory true;
+        }
+      }
+    }
+    output {
+      uses org-openroadm-common-service-types:configuration-response-common;
+    }
+    description
+      "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+       service-rpc-result Notification shall be sent. Once the service has been deleted, it no longer will appear in the service list";
+  }
+  rpc equipment-notification {
+    input {
+      uses org-openroadm-common-service-types:sdnc-request-header;
+      leaf equiptment-id {
+        type string;
+        mandatory true;
+      }
+      leaf equipment-name {
+        type string;
+      }
+      leaf equipemt-type {
+        type string;
+        mandatory true;
+      }
+      leaf equipment-vendor {
+        type string;
+        mandatory true;
+      }
+      leaf equipment-customer {
+        type string;
+      }
+      leaf equipment-clli {
+        type string;
+        mandatory true;
+      }
+      leaf equipment-ip {
+        type string;
+      }
+      leaf controller-id {
+        type string;
+        mandatory true;
+      }
+    }
+    output {
+      uses org-openroadm-common-service-types:configuration-response-common;
+    }
+  }
+  rpc temp-service-create {
+    input {
+      leaf common-id {
+        type string;
+        description
+          "To be used by the ROADM controller to identify the routing constraints received from planning application (PED).";
+        mandatory true;
+      }
+      uses org-openroadm-common-service-types:sdnc-request-header;
+      leaf connection-type {
+        type org-openroadm-common-service-types:connection-type;
+        mandatory true;
+      }
+      container service-a-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
+      container service-z-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
+      uses org-openroadm-routing-constraints:routing-constraints;
+      uses org-openroadm-common-service-types:service-information;
+    }
+    output {
+      uses org-openroadm-common-service-types:configuration-response-common;
+      uses org-openroadm-common-service-types:response-parameters;
+    }
+  }
+  rpc temp-service-delete {
+    input {
+      leaf common-id {
+        type string;
+        mandatory true;
+      }
+    }
+    output {
+      uses org-openroadm-common-service-types:configuration-response-common;
+    }
+  }
+  rpc service-roll {
+    input {
+      leaf service-name {
+        type string;
+        mandatory true;
+        description
+          "Identifier for the service to be rolled in
+           the ROADM network, e.g., CLFI, CLCI, etc.";
+      }
+      leaf due-date {
+        type yang:date-and-time;
+        description
+          "date and time service to be rolled";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+  rpc service-reconfigure {
+    input {
+      leaf service-name {
+        type string;
+        mandatory true;
+        description
+          "Existing identifier for the service to be
+           reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
+      }
+      leaf new-service-name {
+        type string;
+        description
+          "New identifier for the service to be
+           reconfigured in the ROADM network, e.g., CLFI, CLCI, etc.";
+      }
+      leaf common-id {
+        type string;
+        description
+          "To be used by the ROADM controller to identify the routing 
+           constraints received from planning application (PED).";
+      }
+      leaf connection-type {
+        type org-openroadm-common-service-types:connection-type;
+      }
+      container service-a-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
+      container service-z-end {
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
+      uses org-openroadm-routing-constraints:routing-constraints;
+      uses org-openroadm-common-service-types:service-information;
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+    description
+      "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+       service-rpc-result Notification shall be sent.";
+  }
+  rpc service-restoration {
+    input {
+      leaf service-name {
+        type string;
+        mandatory true;
+        description
+          "Identifier for the service to be restored in
+           the ROADM network, e.g., CLFI, CLCI, etc.";
+      }
+      leaf option {
+        type enumeration {
+          enum "permanent" {
+            value 1;
+            description
+              "A spare regen can be used to restore the
+               service permanently without reverting back to the
+               original regen";
+          }
+          enum "temporary" {
+            value 2;
+            description
+              "a spare regen can be used to restore the
+               service temporarily.   The service needs to be reverted
+               back to the original regen transponder";
+          }
+        }
+        mandatory true;
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+    description
+      "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+       service-rpc-result Notification shall be sent.";
+  }
+  rpc service-reversion {
+    input {
+      leaf service-name {
+        type string;
+        mandatory true;
+        description
+          "Identifier for the service to be reverted
+           in the ROADM network, e.g., CLFI, CLCI, etc. ";
+      }
+      leaf due-date {
+        type yang:date-and-time;
+        description
+          "date and time service to be reverted";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+    description
+      "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+       service-rpc-result Notification shall be sent.";
+  }
+  rpc service-reroute {
+    input {
+      leaf service-name {
+        type string;
+        mandatory true;
+        description
+          "Identifier for the service to be re-routed in
+           the ROADM network, e.g., CLFI, CLCI, etc.";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+      uses org-openroadm-routing-constraints:routing-constraints;
+    }
+    description
+      "Whether this request was validated and processed correct. If sucessful, it return the proposed new route.
+       If acceptable, this request should be followed by a service-reroute-confirm to complete the reroute operation.";
+  }
+  rpc service-reroute-confirm {
+    input {
+      leaf service-name {
+        type string;
+        mandatory true;
+        description
+          "Identifier for the service to be re-routed in
+           the ROADM network, e.g., CLFI, CLCI, etc.";
+      }
+      uses org-openroadm-routing-constraints:routing-constraints;
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+    description
+      "Whether this request passed initial validation and was accepted for processing. Once the request completes processing, a
+       service-rpc-result Notification shall be sent.";
+  }
+  rpc network-re-optimization {
+    input {
+      leaf service-name {
+        type string;
+        description
+          "Identifier for the service in the ROADM network,
+           e.g., CLFI, CLCI, etc. whose path is to be checked by the RNC
+           for re-optimization";
+      }
+      leaf a-end {
+        type string;
+        description
+          "Services whose A-ends are terminated at the
+           specified office location are to be checked by the RNC for
+           re-optimization";
+      }
+      leaf z-end {
+        type string;
+        description
+          "Services whose Z-ends are terminated at the
+           specified office location are to be checked by the RNC for
+           re-optimization ";
+      }
+      leaf pass-through {
+        type string;
+        description
+          "Services that are pass-through (either via
+           regen or express) at the specified office location are to
+           be checked by the RNC for re-optimization";
+      }
+      leaf customer-code {
+        type string;
+        description
+          "Services that belong to the specified customer
+           are to be checked by the RNC for re-optimization ";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+      leaf optimization-candidate {
+        type string;
+      }
+    }
+  }
+  container service-list {
+    description
+      "List of service. Can only be created, deleted, modified, etc. using special RPCs.";
+    list services {
+      key "service-name";
+      uses org-openroadm-common-service-types:service;
+    }
+  }
+  container temp-service-list {
+    description
+      "List of temporary services Can only be created, deleted, modified, etc. using special RPCs.";
+    list services {
+      key "common-id";
+      uses org-openroadm-common-service-types:service {
+        refine "service-name" {
+          mandatory false;
+        }
+      }
+    }
+  }
+  notification service-rpc-result {
+    description
+      "This Notification indicates result of  service RPC";
+    leaf notification-type {
+      type org-openroadm-common-service-types:service-notification-types;
+    }
+    uses org-openroadm-common-types:rpc-response-status;
+    uses org-openroadm-common-service-types:service-notification-result;
+  }
+  notification service-traffic-flow {
+    description
+      "This Notification indicates that traffic is flowing again on the service after an administrative action has completed";
+    leaf service-name {
+      type string;
+      description
+        "Identifier for the service being reported on";
+      mandatory true;
+    }
+    leaf actual-date {
+      type yang:date-and-time;
+      description
+        "Actual date and time traffic started flowing";
+    }
+  }
+  notification service-notification {
+    description
+      "This Notification that a service has been added, modified or removed.
+       A resourceCreation notification shall contain the created service in its entirety.
+       A resourceMofified notification shall contain just the modified field, plus the service identifier
+       A resourceDeleted notification shall just contain the service identifier";
+    leaf notificationType {
+      type org-openroadm-resource-types:resource-notification-type;
+      description
+        "Whether this notification indicates a service creation, service modification or service deletion.";
+    }
+    uses org-openroadm-common-service-types:service;
+  }
+}
diff --git a/pom.xml b/pom.xml
index f7ecf930fd7f701e7810e109f2480d8f7735e10d..6af9b748fd14fe93a937da7fd379cd517e65ab52 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -45,6 +45,17 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   </modules>
 
   <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
+  <!--
+      Jenkins-releng tests reports more than 600 lines of javadoc warnings on ordmodels
+      and api folders generated-sources for unclear reasons.
+      This behavior was impossible to reproduce locally.
+      The javadoc plugin build section below removes most of those useless warnings.
+      ordmodels/pom.xml and api/pom.xml have been modified similarly with a build and
+      a reporting sections to remove the rest of the warnings.
+      Note that javadoc plugins maven implementation still suffers from several bugs.
+      Tests shows that many configurations options are not correctly supported.
+      (proxy, sourceFilesExclude, etc...).
+  -->
   <build>
     <plugins>
       <plugin>
@@ -61,6 +72,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
           <skip>true</skip>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <sourcepath>*/target/generated-sources/mdsal-binding/*</sourcepath>
+          <excludePackageNames>*</excludePackageNames>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
index 86700bc86828fc16667f5e7d5bdd4836eb7522bb..8ddd081d44c15a75b89fa3e3835fee7504fbc54f 100644 (file)
@@ -16,7 +16,6 @@ import com.google.common.cache.LoadingCache;
 import java.util.Collection;
 import java.util.List;
 import java.util.Set;
-import java.util.concurrent.Future;
 import java.util.stream.Collectors;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -58,7 +57,6 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
-import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -111,39 +109,31 @@ public class RendererNotificationsImpl implements DataTreeChangeListener<Node> {
         alarmListener = new AlarmNotificationListener();
         LOG.info("Registering notification listener on {} for node: {}", AlarmNotification.QNAME, nodeId);
         // Register notification listener
-        final ListenerRegistration<OrgOpenroadmAlarmListener>
-            accessAlarmNotificationListenerRegistration =
-                notificationService.get().registerNotificationListener(alarmListener);
+
 
         final OrgOpenroadmDeOperationsListener deOperationsListener;
         deOperationsListener = new DeOperationsListener();
         LOG.info("Registering notification listener on OrgOpenroadmDeOperationsListener for node: {}", nodeId);
         // Register notification listener
-        final ListenerRegistration<OrgOpenroadmDeOperationsListener>
-            accessDeOperationasNotificationListenerRegistration =
-                notificationService.get().registerNotificationListener(deOperationsListener);
+
 
         final OrgOpenroadmDeviceListener deviceListener;
         deviceListener = new DeviceListener();
         LOG.info("Registering notification listener on OrgOpenroadmDeviceListener for node: {}", nodeId);
         // Register notification listener
-        final ListenerRegistration<OrgOpenroadmDeviceListener>
-            accessDeviceNotificationListenerRegistration = notificationService.get()
-                .registerNotificationListener(deviceListener);
+
 
         final OrgOpenroadmLldpListener lldpListener;
         lldpListener = new LldpListener();
         LOG.info("Registering notification listener on OrgOpenroadmLldpListener for node: {}", nodeId);
         // Register notification listener
-        final ListenerRegistration<OrgOpenroadmLldpListener> accessLldpNotificationListenerRegistration =
-            notificationService.get().registerNotificationListener(lldpListener);
+
 
         final OrgOpenroadmTcaListener tcaListener;
         tcaListener = new TcaListener();
         LOG.info("Registering notification listener on OrgOpenroadmTcaListener for node: {}", nodeId);
         // Register notification listener
-        final ListenerRegistration<OrgOpenroadmTcaListener> accessTcaNotificationListenerRegistration =
-            notificationService.get().registerNotificationListener(tcaListener);
+
 
         // Listening to NETCONF datastream
         final String streamName = "NETCONF";
@@ -156,8 +146,7 @@ public class RendererNotificationsImpl implements DataTreeChangeListener<Node> {
         final CreateSubscriptionInputBuilder createSubscriptionInputBuilder = new CreateSubscriptionInputBuilder();
         createSubscriptionInputBuilder.setStream(new StreamNameType(streamName));
         LOG.info("Triggering notification stream {} for node {}", streamName, nodeId);
-        final Future<RpcResult<Void>> subscription = rpcService.createSubscription(createSubscriptionInputBuilder
-            .build());
+
     }
 
     public void close() {
@@ -204,9 +193,8 @@ public class RendererNotificationsImpl implements DataTreeChangeListener<Node> {
                             /*
                              * TODO: check for required
                              * capabilities to listen for notifications
-                             * registerNotificationListener(rootNode.
-                             * getDataAfter(). getNodeId());
                              */
+                            registerNotificationListener(rootNode.getDataAfter(). getNodeId());
                             currentMountedDevice.add(nodeId);
                             new PortMapping(dataBroker, mountService, nodeId).createMappingData();
                             break;
index d37243ea5c1afda7382b58395d1512d1ce95d874..1cd38e87da19531275c1f7cc8785d393ba88025f 100644 (file)
@@ -589,6 +589,8 @@ public class PortMapping {
      *            Unique Identifier for the node of interest.
      * @param logicalConnPoint
      *            Name of the logical point
+     * @param db
+     *            Databroker / MD-SAL data store
      *
      * @return Result Mapping object if success otherwise null.
      */
diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmEthIterface.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmEthIterface.java
new file mode 100644 (file)
index 0000000..9ba7673
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright © 2017 AT&T and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.transportpce.renderer.openroadminterface;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.MountPointService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.ethernet.interfaces.rev161014.EthAttributes.AutoNegotiation;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.ethernet.interfaces.rev161014.EthAttributes.Duplex;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.ethernet.interfaces.rev161014.EthAttributes.Fec;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.ethernet.interfaces.rev161014.Interface1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.ethernet.interfaces.rev161014.Interface1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.ethernet.interfaces.rev161014.ethernet.container.EthernetBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.EthernetCsmacd;
+
+public class OpenRoadmEthIterface extends OpenRoadmInterfaces {
+
+    public OpenRoadmEthIterface(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint,
+            String serviceName) {
+        super(db, mps, nodeId, logicalConnPoint, serviceName);
+
+    }
+
+    public String createInterface() {
+        InterfaceBuilder ethInterfaceBldr = getIntfBuilder(portMap);
+        ethInterfaceBldr.setType(EthernetCsmacd.class);
+        ethInterfaceBldr.setName(logicalConnPoint + "-ETHERNET");
+        ethInterfaceBldr.setKey(new InterfaceKey(logicalConnPoint + "-ETHERNET"));
+
+        // Ethernet interface specific data
+        EthernetBuilder ethIfBuilder = new EthernetBuilder();
+        ethIfBuilder.setAutoNegotiation(AutoNegotiation.Enabled);
+        ethIfBuilder.setDuplex(Duplex.Full);
+        ethIfBuilder.setFec(Fec.Off);
+        ethIfBuilder.setSpeed(new Long(100000));
+        ethIfBuilder.setMtu(new Long(9000));
+
+        // Create Interface1 type object required for adding as augmentation
+        Interface1Builder ethIf1Builder = new Interface1Builder();
+        ethInterfaceBldr.addAugmentation(Interface1.class, ethIf1Builder.setEthernet(ethIfBuilder.build()).build());
+
+        // Post interface on the device
+        if (postInterface(ethInterfaceBldr)) {
+            return ethInterfaceBldr.getName();
+        } else {
+            return null;
+        }
+
+    }
+
+}
index a23d84e24e84e8bfef40a247626680eedc6e8b23..333177d43193adaf3661134c03d29eff03535945 100644 (file)
@@ -35,25 +35,48 @@ public class OpenRoadmInterfaces {
     protected final DataBroker db;
     protected final DataBroker netconfNodeDataBroker;
     protected final String nodeId;
+    protected final MountPointService mps;
     protected final Mapping portMap;
     protected final String logicalConnPoint;
+    private final String serviceName;
     private static final Logger LOG = LoggerFactory.getLogger(OpenRoadmInterfaces.class);
 
     public OpenRoadmInterfaces(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint) {
         this.db = db;
+        this.mps = mps;
         this.logicalConnPoint = logicalConnPoint;
         this.nodeId = nodeId;
-        this.portMap = PortMapping.getMapping(nodeId, logicalConnPoint, db);
+        if (logicalConnPoint != null) {
+            this.portMap = PortMapping.getMapping(nodeId, logicalConnPoint, db);
+        } else {
+            this.portMap = null;
+        }
+        this.serviceName = null;
+        netconfNodeDataBroker = PortMapping.getDeviceDataBroker(nodeId, mps);
+    }
+
+    public OpenRoadmInterfaces(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint,
+            String serviceName) {
+        this.db = db;
+        this.mps = mps;
+        this.logicalConnPoint = logicalConnPoint;
+        this.nodeId = nodeId;
+        if (logicalConnPoint != null) {
+            this.portMap = PortMapping.getMapping(nodeId, logicalConnPoint, db);
+        } else {
+            this.portMap = null;
+        }
+        this.serviceName = serviceName;
         netconfNodeDataBroker = PortMapping.getDeviceDataBroker(nodeId, mps);
     }
 
     /**
-     * This methods creates a generic interface builder object to set the value
-     * that are common irrespective of the interface type.
+     * This methods creates a generic interface builder object to set the value that
+     * are common irrespective of the interface type.
      *
      * @param portMap
-     *            Mapping object containing attributes required to create
-     *            interface on the device.
+     *            Mapping object containing attributes required to create interface
+     *            on the device.
      *
      * @return InterfaceBuilder object with the data.
      */
@@ -69,8 +92,8 @@ public class OpenRoadmInterfaces {
     }
 
     /**
-     * This methods does an edit-config operation on the openROADM device in
-     * order to create the given interface.
+     * This methods does an edit-config operation on the openROADM device in order
+     * to create the given interface.
      *
      * <p>
      * Before posting the interface it checks if:
@@ -87,28 +110,26 @@ public class OpenRoadmInterfaces {
      * @return Result of operation true/false based on success/failure.
      */
     public boolean postInterface(InterfaceBuilder ifBuilder) {
-
         String intf2Post = ifBuilder.getName();
         Interface intf2PostCheck = getInterface(intf2Post);
-        if (intf2PostCheck != null) {
-            if (intf2PostCheck.getAdministrativeState() == AdminStates.InService) {
-                LOG.info("Interface with same name in service already exists");
-                return true;
-            }
+        if (intf2PostCheck != null && intf2PostCheck.getAdministrativeState() == AdminStates.InService) {
+            LOG.info("Interface with same name in service already exists on node " + nodeId);
+            return true;
         }
+
         // Post interface with its specific augmentation to the device
         if (netconfNodeDataBroker != null) {
-            InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(
-                Interface.class, new InterfaceKey(ifBuilder.getName()));
+            InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
+                    .child(Interface.class, new InterfaceKey(ifBuilder.getName()));
             final WriteTransaction writeTransaction = netconfNodeDataBroker.newWriteOnlyTransaction();
             writeTransaction.put(LogicalDatastoreType.CONFIGURATION, interfacesIID, ifBuilder.build());
             final CheckedFuture<Void, TransactionCommitFailedException> submit = writeTransaction.submit();
             try {
                 submit.checkedGet();
-                LOG.info("Successfully posted interface " + ifBuilder.getName());
+                LOG.info("Successfully posted interface " + ifBuilder.getName() + " on node " + nodeId);
                 return true;
             } catch (TransactionCommitFailedException ex) {
-                LOG.warn("Failed to post {} ", ifBuilder.getName(),ex);
+                LOG.warn("Failed to post {} ", ifBuilder.getName() + " on node " + nodeId, ex);
                 return false;
             }
 
@@ -119,8 +140,8 @@ public class OpenRoadmInterfaces {
 
     /**
      * This private does a get on the interface subtree of the device with the
-     * interface name as the key and return the class corresponding to the
-     * interface type.
+     * interface name as the key and return the class corresponding to the interface
+     * type.
      *
      * @param interfaceName
      *            Name of the interface
@@ -130,25 +151,25 @@ public class OpenRoadmInterfaces {
 
     public Interface getInterface(String interfaceName) {
         ReadOnlyTransaction rtx = netconfNodeDataBroker.newReadOnlyTransaction();
-        InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(
-            Interface.class, new InterfaceKey(interfaceName));
+        InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
+                .child(Interface.class, new InterfaceKey(interfaceName));
         try {
             Optional<Interface> interfaceObject = rtx.read(LogicalDatastoreType.CONFIGURATION, interfacesIID).get();
             if (interfaceObject.isPresent()) {
                 return interfaceObject.get();
             } else {
-                LOG.info("Interface subtree is not present for " + interfaceName);
+                LOG.info("Interface subtree is not present for " + interfaceName + " on node " + nodeId);
             }
         } catch (InterruptedException | ExecutionException ex) {
-            LOG.info("Read failed on interface subtree for",ex);
+            LOG.info("Read failed on interface subtree for" + interfaceName + " on node " + nodeId, ex);
             return null;
         }
         return null;
     }
 
     /**
-     * This methods does an edit-config operation on the openROADM device in
-     * order to delete the given interface.
+     * This methods does an edit-config operation on the openROADM device in order
+     * to delete the given interface.
      *
      * <p>
      * Before deleting the method:
@@ -175,35 +196,35 @@ public class OpenRoadmInterfaces {
                 // post interface with updated admin state
                 if (postInterface(ifBuilder)) {
                     InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
-                        .child(Interface.class, new InterfaceKey(interfaceName));
+                            .child(Interface.class, new InterfaceKey(interfaceName));
                     final WriteTransaction writeTransaction = netconfNodeDataBroker.newWriteOnlyTransaction();
                     writeTransaction.delete(LogicalDatastoreType.CONFIGURATION, interfacesIID);
                     final CheckedFuture<Void, TransactionCommitFailedException> submit = writeTransaction.submit();
 
                     try {
                         submit.checkedGet();
-                        LOG.info("Successfully deleted " + interfaceName);
+                        LOG.info("Successfully deleted " + interfaceName + " on node " + nodeId);
                         return true;
 
                     } catch (TransactionCommitFailedException ex) {
-                        LOG.error("Failed to delete interface {} ", interfaceName, ex);
+                        LOG.error("Failed to delete interface " + interfaceName + " on node " + nodeId);
                         return false;
                     }
 
                 } else {
 
-                    LOG.error("Error changing the state of interface " + interfaceName);
+                    LOG.error("Error changing the state of interface " + interfaceName + " on node " + nodeId);
                     return false;
                 }
             } else {
-                LOG.info("Interface does not exist, cannot delete");
+                LOG.info("Interface does not exist, cannot delete on node " + nodeId);
                 return false;
             }
 
         } else {
 
-            LOG.info("Device databroker not found");
+            LOG.info("Device databroker not found on node " + nodeId);
             return false;
         }
     }
-}
\ No newline at end of file
+}
index eae5b81cc693c388b5c3d896b9668dc02c747d87..3743d125114bd988429bb03589255d44ff93d456 100644 (file)
@@ -8,23 +8,29 @@
 
 package org.opendaylight.transportpce.renderer.openroadminterface;
 
+import java.math.BigDecimal;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.MountPointService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.PowerDBm;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceKey;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.OpticalChannel;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.Interface1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.Interface1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.OchAttributes.ModulationFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.RateIdentity;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.och.container.OchBuilder;
 
 public class OpenRoadmOchInterface extends OpenRoadmInterfaces {
 
-    public OpenRoadmOchInterface(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint) {
-        super(db, mps, nodeId, logicalConnPoint);
+    public OpenRoadmOchInterface(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint,
+            String serviceName) {
+        super(db, mps, nodeId, logicalConnPoint, serviceName);
     }
 
     /**
-     * This methods creates an OCH interface on the given termination point.
+     * This methods creates an OCH interface on the given termination point on
+     * Roadm.
      *
      * @param waveNumber
      *            wavelength number of the OCH interface.
@@ -44,8 +50,36 @@ public class OpenRoadmOchInterface extends OpenRoadmInterfaces {
         OchBuilder ocIfBuilder = new OchBuilder();
         ocIfBuilder.setWavelengthNumber(waveNumber);
 
-        //Add supporting OMS interface
-        ochInterfaceBldr.setSupportingInterface(portMap.getSupportingOms());
+        // Add supporting OMS interface
+        if (portMap.getSupportingOms() != null) {
+            ochInterfaceBldr.setSupportingInterface(portMap.getSupportingOms());
+        }
+        // Create Interface1 type object required for adding as augmentation
+        Interface1Builder ochIf1Builder = new Interface1Builder();
+        ochInterfaceBldr.addAugmentation(Interface1.class, ochIf1Builder.setOch(ocIfBuilder.build()).build());
+
+        // Post interface on the device
+        if (postInterface(ochInterfaceBldr)) {
+            return ochInterfaceBldr.getName();
+        } else {
+            return null;
+        }
+    }
+
+    public String createInterface(Long waveNumber, Class<? extends RateIdentity> rate, ModulationFormat format) {
+
+        // Create generic interface
+        InterfaceBuilder ochInterfaceBldr = getIntfBuilder(portMap);
+        ochInterfaceBldr.setType(OpticalChannel.class);
+        ochInterfaceBldr.setName(logicalConnPoint + "-" + waveNumber);
+        ochInterfaceBldr.setKey(new InterfaceKey(logicalConnPoint + "-" + waveNumber));
+
+        // OCH interface specific data
+        OchBuilder ocIfBuilder = new OchBuilder();
+        ocIfBuilder.setWavelengthNumber(waveNumber);
+        ocIfBuilder.setModulationFormat(format);
+        ocIfBuilder.setRate(rate);
+        ocIfBuilder.setTransmitPower(new PowerDBm(new BigDecimal("-5")));
 
         // Create Interface1 type object required for adding as augmentation
         Interface1Builder ochIf1Builder = new Interface1Builder();
@@ -58,4 +92,5 @@ public class OpenRoadmOchInterface extends OpenRoadmInterfaces {
             return null;
         }
     }
+
 }
index 17a1b29fb048d8d2bcb2a22964a74cdf035e7c3a..f3a6b927c9690ce8f930b2ba1579f9fcf99b875e 100644 (file)
@@ -10,23 +10,54 @@ package org.opendaylight.transportpce.renderer.openroadminterface;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.MountPointService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.OtnOdu;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.Interface1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.Interface1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.ODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.OduAttributes.MonitoringMode;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev161014.odu.container.OduBuilder;
 
 public class OpenRoadmOdu4Interface extends OpenRoadmInterfaces {
 
-    public OpenRoadmOdu4Interface(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint) {
-        super(db, mps, nodeId, logicalConnPoint);
+    public OpenRoadmOdu4Interface(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint,
+            String serviceName) {
+        super(db, mps, nodeId, logicalConnPoint, serviceName);
 
     }
 
     /**
      * This methods creates an ODU interface on the given termination point.
      *
+     * @param supportingOtuInterface
+     *          supporting Otu Interface
      *
      * @return Name of the interface if successful, otherwise return null.
      */
 
-    public String createInterface() {
-        // TODO:implement this method
-        return null;
+    public String createInterface(String supportingOtuInterface) {
+
+        InterfaceBuilder oduInterfaceBldr = getIntfBuilder(portMap);
+        oduInterfaceBldr.setType(OtnOdu.class);
+        oduInterfaceBldr.setSupportingInterface(supportingOtuInterface);
+        oduInterfaceBldr.setName(logicalConnPoint + "-ODU");
+        oduInterfaceBldr.setKey(new InterfaceKey(logicalConnPoint + "-ODU"));
+
+        // ODU interface specific data
+        OduBuilder oduIfBuilder = new OduBuilder();
+        oduIfBuilder.setRate(ODU4.class);
+        oduIfBuilder.setMonitoringMode(MonitoringMode.Monitored);
+
+        // Create Interface1 type object required for adding as augmentation
+        Interface1Builder oduIf1Builder = new Interface1Builder();
+        oduInterfaceBldr.addAugmentation(Interface1.class, oduIf1Builder.setOdu(oduIfBuilder.build()).build());
+
+        // Post interface on the device
+        if (postInterface(oduInterfaceBldr)) {
+            return oduInterfaceBldr.getName();
+        } else {
+            return null;
+        }
     }
 }
index 7597b366a60b496dca7f661f6fe449706bdc4ad7..abffa1ee54cc7e19e1e785a4625c0f197c726fd5 100644 (file)
@@ -10,24 +10,55 @@ package org.opendaylight.transportpce.renderer.openroadminterface;
 
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.MountPointService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceKey;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.interfaces.rev161014.OtnOtu;
+
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.Interface1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.Interface1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.OTU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.OtuAttributes.Fec;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.otu.container.OtuBuilder;
 
 public class OpenRoadmOtu4Interface extends OpenRoadmInterfaces {
 
-    public OpenRoadmOtu4Interface(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint) {
-        super(db, mps, nodeId, logicalConnPoint);
+    public OpenRoadmOtu4Interface(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint,
+            String serviceName) {
+        super(db, mps, nodeId, logicalConnPoint, serviceName);
 
     }
 
     /**
      * This methods creates an OTU interface on the given termination point.
      *
+     * @param supportOchInterface
+     *          support Och Interface
      *
      * @return Name of the interface if successful, otherwise return null.
      */
 
-    public String createInterface() {
-        // TODO: Implement this method
-        return null;
-    }
+    public String createInterface(String supportOchInterface) {
+        // Create generic interface
+        InterfaceBuilder otuInterfaceBldr = getIntfBuilder(portMap);
+        otuInterfaceBldr.setType(OtnOtu.class);
+        otuInterfaceBldr.setSupportingInterface(supportOchInterface);
+        otuInterfaceBldr.setName(logicalConnPoint + "-OTU");
+        otuInterfaceBldr.setKey(new InterfaceKey(logicalConnPoint + "-OTU"));
+
+        // OTU interface specific data
+        OtuBuilder otuIfBuilder = new OtuBuilder();
+        otuIfBuilder.setFec(Fec.Scfec);
+        otuIfBuilder.setRate(OTU4.class);
 
+        // Create Interface1 type object required for adding as augmentation
+        Interface1Builder otuIf1Builder = new Interface1Builder();
+        otuInterfaceBldr.addAugmentation(Interface1.class, otuIf1Builder.setOtu(otuIfBuilder.build()).build());
+
+        // Post interface on the device
+        if (postInterface(otuInterfaceBldr)) {
+            return otuInterfaceBldr.getName();
+        } else {
+            return null;
+        }
+    }
 }
diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmXponderInterface.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmXponderInterface.java
new file mode 100644 (file)
index 0000000..107bfd8
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright © 2017 AT&T and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.transportpce.renderer.openroadminterface;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.MountPointService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.OchAttributes.ModulationFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.RateIdentity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OpenRoadmXponderInterface extends OpenRoadmInterfaces {
+
+    private static final Logger LOG = LoggerFactory.getLogger(OpenRoadmXponderInterface.class);
+    private final  String serviceName;
+
+    public OpenRoadmXponderInterface(DataBroker db, MountPointService mps, String nodeId, String logicalConnPoint,
+        String serviceName) {
+        super(db, mps, nodeId, logicalConnPoint,serviceName);
+        this.serviceName = serviceName;
+
+    }
+
+    public boolean createLineInterfaces(Long waveNumber, Class<? extends RateIdentity> rate, ModulationFormat format) {
+
+        String supportOchInterface = new OpenRoadmOchInterface(db, mps, nodeId, logicalConnPoint,serviceName)
+                .createInterface(waveNumber, rate, format);
+        String supportingOtuInterface;
+        String supportingOduInterface;
+
+        if (supportOchInterface != null) {
+            supportingOtuInterface = new OpenRoadmOtu4Interface(db, mps, nodeId, logicalConnPoint,serviceName)
+                    .createInterface(supportOchInterface);
+        } else {
+            LOG.error("Unable to create OCH interface on the transponder");
+            return false;
+        }
+        if (supportingOtuInterface != null) {
+            supportingOduInterface = new OpenRoadmOdu4Interface(db, mps, nodeId, logicalConnPoint,serviceName)
+                    .createInterface(supportingOtuInterface);
+        } else {
+            LOG.error("Unable to create OTU interface on the transponder");
+            return false;
+        }
+        if (supportingOduInterface != null) {
+            return true;
+        } else {
+            LOG.error("Unable to create ODU interface on the transponder");
+            return false;
+        }
+    }
+
+    public boolean createClientInterfaces() {
+
+        if (new OpenRoadmEthIterface(db, mps, nodeId, logicalConnPoint,serviceName).createInterface() != null) {
+            return true;
+        }
+        return false;
+    }
+}
index af220f7bbd05757e206c205acd0dbd8a32198c75..993a6a7622d92afbd09c244f0368fe137ddae5b7 100644 (file)
@@ -64,16 +64,11 @@ public class CrossConnect {
      * This method return the RoadmConnection subtree for a given connection
      * number.
      *
-     * @param connectionNumber
-     *            Name of the cross connect.
-     *
      * @return Roadm connection subtree from the device.
      */
-    public RoadmConnections getCrossConnect(String connectionNumber) {
-        if (connectionNumber == null && this.connectionNumber != null) {
-            connectionNumber = this.connectionNumber;
-        }
-        if (deviceDb != null) {
+    public RoadmConnections getCrossConnect() {
+
+        if (deviceDb != null && connectionNumber != null) {
             ReadOnlyTransaction rtx = deviceDb.newReadOnlyTransaction();
             Optional<RoadmConnections> roadmConnectionsObject;
             try {
@@ -131,21 +126,7 @@ public class CrossConnect {
         }
     }
 
-    /**
-     * This method does a delete(edit-config) on roadm connection subtree for a
-     * given connection number.
-     *
-     * @param connectionNumber
-     *            Name of the cross connect.
-     * @return true/false based on status of operation.
-     */
 
-    public boolean deleteCrossConnect(String connectionNumber) {
-        if (connectionNumber == null && this.connectionNumber != null) {
-            connectionNumber = this.connectionNumber;
-        }
-        return deleteCrossConnect();
-    }
 
     /**
      * This method does a delete(edit-config) on roadm connection subtree for a
@@ -157,7 +138,7 @@ public class CrossConnect {
     public boolean deleteCrossConnect() {
 
         //Check if cross connect exists before delete
-        if (getCrossConnect(connectionNumber) == null) {
+        if (getCrossConnect() == null) {
             LOG.info("Cross connect does not exist, halting delete");
             return false;
         }
@@ -180,25 +161,7 @@ public class CrossConnect {
         }
     }
 
-    /**
-     * This method does an edit-config on roadm connection subtree for a given
-     * connection number in order to set power level for use by the optical
-     * power control.
-     *
-     * @param mode
-     *            Optical control modelcan be off, power or gainLoss.
-     * @param value
-     *            Power value in DBm.
-     * @param connectionNumber
-     *            Name of the cross connect.
-     * @return true/false based on status of operation.
-     */
-    public boolean setPowerLevel(OpticalControlMode mode, PowerDBm value, String connectionNumber) {
-        if (connectionNumber == null && this.connectionNumber != null) {
-            connectionNumber = this.connectionNumber;
-        }
-        return setPowerLevel(mode, value);
-    }
+
 
     /**
      * This method does an edit-config on roadm connection subtree for a given
@@ -213,7 +176,7 @@ public class CrossConnect {
      */
     public boolean setPowerLevel(OpticalControlMode mode, PowerDBm value) {
 
-        RoadmConnections rdmConn = getCrossConnect(connectionNumber);
+        RoadmConnections rdmConn = getCrossConnect();
         if (rdmConn != null) {
             RoadmConnectionsBuilder rdmConnBldr = new RoadmConnectionsBuilder(rdmConn);
             rdmConnBldr.setOpticalControlMode(mode);
index 2a357f2dda99fb86fd7fd4c7bfb1e90c84b561e7..1cabf6dc9b9c4bee55731da8cb2560a67898693a 100644 (file)
@@ -18,6 +18,9 @@ import org.opendaylight.controller.md.sal.binding.api.MountPointService;
 import org.opendaylight.transportpce.renderer.mapping.PortMapping;
 import org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmInterfaces;
 import org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmOchInterface;
+import org.opendaylight.transportpce.renderer.openroadminterface.OpenRoadmXponderInterface;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.OchAttributes.ModulationFormat;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.optical.channel.interfaces.rev161014.R100G;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.RendererService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathOutput;
@@ -101,11 +104,14 @@ public class DeviceRenderer implements RendererService {
      */
     public ServicePathOutputBuilder setupServicePath(ServicePathInput input) {
 
+        String serviceName = input.getServiceName();
         List<Nodes> nodes = input.getNodes();
         ServicePathOutputBuilder setServBldr = new ServicePathOutputBuilder();
         LOG.info(currentMountedDevice.toString());
+        int crossConnectFlag;
         for (Nodes n : nodes) {
             LOG.info("Starting provisioning for node : " + n.getNodeId());
+            crossConnectFlag = 0;
             String nodeId = n.getNodeId();
             // if the node is currently mounted then proceed
             if (currentMountedDevice.contains(n.getNodeId())) {
@@ -113,30 +119,52 @@ public class DeviceRenderer implements RendererService {
                 String destTp = n.getDestTp();
 
                 Long waveNumber = input.getWaveNumber();
-                String srcIf = new OpenRoadmOchInterface(db, mps, nodeId, srcTp).createInterface(waveNumber);
-                // if source interface creation was successful then proceed
-                // otherwise return.
-                if (srcIf == null) {
-                    LOG.warn("Unable to create OCH interface on " + nodeId + " at " + srcTp);
-                    return setServBldr.setResult("Unable to create OCH interface on " + nodeId + " at " + srcTp);
+                if (destTp.contains("NETWORK")) {
+                    crossConnectFlag++;
+                    if (!new OpenRoadmXponderInterface(db, mps, nodeId, destTp, serviceName)
+                            .createLineInterfaces(waveNumber, R100G.class, ModulationFormat.Qpsk)) {
+
+                        return setServBldr.setResult("Unable to LINE interface on " + nodeId + " at " + destTp);
+                    }
+                }
+                if (srcTp.contains("CLIENT")) {
+                    crossConnectFlag++;
+                    if (!new OpenRoadmXponderInterface(db, mps, nodeId, srcTp, serviceName).createClientInterfaces()) {
+                        return setServBldr.setResult("Unable to Client interface on " + nodeId + " at " + srcTp);
+                    }
                 }
-                // if destination interface creation was then proceed otherwise
-                // return.
-                String dstIf = new OpenRoadmOchInterface(db, mps, nodeId, destTp).createInterface(waveNumber);
-                if (dstIf == null) {
-                    LOG.warn("Unable to create OCH interface on " + nodeId + " at " + destTp);
-                    return setServBldr.setResult("Unable to create OCH interface on " + nodeId + " at " + destTp);
+                String srcIf;
+                String dstIf;
+                if (srcTp.contains("TTP") || srcTp.contains("PP")) {
+                    srcIf = new OpenRoadmOchInterface(db, mps, nodeId, srcTp, serviceName).createInterface(waveNumber);
+                    // if source interface creation was successful then proceed
+                    // otherwise return.
+                    if (srcIf == null) {
+                        LOG.warn("Unable to create OCH interface on " + nodeId + " at " + srcTp);
+                        return setServBldr.setResult("Unable to create OCH interface on " + nodeId + " at " + srcTp);
+                    }
                 }
-                LOG.info("Creating cross connect between source :" + srcTp + " destination " + destTp + " for node " + n
-                    .getNodeId());
-                DataBroker netconfNodeDataBroker = PortMapping.getDeviceDataBroker(nodeId, mps);
-                CrossConnect roadmConnections = new CrossConnect(netconfNodeDataBroker);
-                if (roadmConnections.postCrossConnect(waveNumber, srcTp, destTp) == true) {
-                    nodesProvisioned.add(nodeId);
-                    roadmConnections.getConnectionPortTrail(nodeId, mps, waveNumber, srcTp, destTp);
-
-                } else {
-                    return setServBldr.setResult("Unable to post Roadm-connection for node " + nodeId);
+                if (destTp.contains("TTP") || destTp.contains("PP")) {
+                    dstIf = new OpenRoadmOchInterface(db, mps, nodeId, destTp, serviceName).createInterface(waveNumber);
+                    // if destination interface creation was successful then proceed
+                    // otherwise return.
+                    if (dstIf == null) {
+                        LOG.warn("Unable to create OCH interface on " + nodeId + " at " + destTp);
+                        return setServBldr.setResult("Unable to create OCH interface on " + nodeId + " at " + destTp);
+                    }
+                }
+                if (crossConnectFlag < 1) {
+                    LOG.info("Creating cross connect between source :" + srcTp + " destination " + destTp + " for node "
+                            + n.getNodeId());
+                    DataBroker netconfNodeDataBroker = PortMapping.getDeviceDataBroker(nodeId, mps);
+                    String crossConnectName = srcTp + "-" + destTp + "-" + waveNumber;
+                    CrossConnect roadmConnections = new CrossConnect(netconfNodeDataBroker);
+                    if (roadmConnections.postCrossConnect(waveNumber, srcTp, destTp)) {
+                        nodesProvisioned.add(nodeId);
+                        roadmConnections.getConnectionPortTrail(nodeId, mps, waveNumber, srcTp, destTp);
+                    } else {
+                        return setServBldr.setResult("Unable to post Roadm-connection for node " + nodeId);
+                    }
                 }
             } else {
                 LOG.warn(nodeId + " is not mounted on the controller");
@@ -146,6 +174,7 @@ public class DeviceRenderer implements RendererService {
         return setServBldr.setResult("Roadm-connection successfully created for nodes " + nodesProvisioned.toString());
     }
 
+
     /**
      * This method removes wavelength path based on following steps: For each
      * node:
@@ -178,22 +207,45 @@ public class DeviceRenderer implements RendererService {
 
             // if the node is currently mounted then proceed.
             if (currentMountedDevice.contains(nodeId)) {
+
+                if (destTp.contains("NETWORK")) {
+                    if (new OpenRoadmInterfaces(db, mps, nodeId, destTp)
+                             .deleteInterface(destTp + "-ODU") == false) {
+                        LOG.error("Failed to delete interface " + destTp + "-ODU");
+                    }
+                    if (new OpenRoadmInterfaces(db, mps, nodeId, destTp)
+                             .deleteInterface(destTp + "-OTU") == false) {
+                        LOG.error("Failed to delete interface " + destTp + "-OTU");
+                    }
+                    if (new OpenRoadmInterfaces(db, mps, nodeId, destTp)
+                             .deleteInterface(destTp + "-" + waveNumber) == false) {
+                        LOG.error("Failed to delete interface " + destTp + "-" + waveNumber);
+                    }
+                }
+                if (srcTp.contains("CLIENT")) {
+                    // Deleting interface on source termination point
+                    if (new OpenRoadmInterfaces(db, mps, nodeId, srcTp)
+                            .deleteInterface(srcTp + "-ETHERNET") == false) {
+                        LOG.error("Failed to delete Ethernet interface  on " + srcTp);
+                    }
+                    continue;
+                }
                 String connectionNumber = srcTp + "-" + destTp + "-" + waveNumber;
                 CrossConnect roadmConnection = new CrossConnect(PortMapping.getDeviceDataBroker(nodeId, mps),
-                    connectionNumber);
+                        connectionNumber);
                 if (!roadmConnection.deleteCrossConnect()) {
                     LOG.error("Failed to delete {} ", srcTp + "-" + destTp + "-" + waveNumber);
                 }
                 // Deleting interface on source termination point
-                if (new OpenRoadmInterfaces(db, mps, nodeId, srcTp).deleteInterface(srcTp + "-" + waveNumber
-                    .toString()) == false) {
+                if (!new OpenRoadmInterfaces(db, mps, nodeId, srcTp)
+                        .deleteInterface(srcTp + "-" + waveNumber.toString())) {
                     LOG.error("Failed to delete interface " + srcTp + "-" + waveNumber.toString());
                 }
 
                 // Deleting interface on destination termination point
-                if (new OpenRoadmInterfaces(db, mps, nodeId, srcTp).deleteInterface(destTp + "-" + waveNumber
-                    .toString()) == false) {
-                    LOG.error("Failed to delete interface " + srcTp + "-" + waveNumber.toString());
+                if (!new OpenRoadmInterfaces(db, mps, nodeId, destTp)
+                        .deleteInterface(destTp + "-" + waveNumber.toString())) {
+                    LOG.error("Failed to delete interface " + destTp + "-" + waveNumber.toString());
                 }
             } else {
                 LOG.warn(nodeId + " is not mounted on the controller");
@@ -202,4 +254,4 @@ public class DeviceRenderer implements RendererService {
         }
         return delServBldr.setResult("Request processed");
     }
-}
\ No newline at end of file
+}
index 3ddf0e6ebff8d59ea6b6c105b17551ddbe3b23e3..5bc4333fe1d49cf26659b2a2134760aac9e69d2e 100644 (file)
@@ -13,7 +13,8 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/* Class to check coherency between hard & sof constraints.
+/**
+ * Class to check coherency between hard and soft constraints.
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
  *
  */
@@ -30,7 +31,8 @@ public class CheckCoherencyHardSoft {
         this.soft = soft;
     }
 
-    /*function to check coherency between hard & soft constraints.
+    /**
+     * function to check coherency between hard and soft constraints.
      * @return  <code> true </code>  if coherent
      *          <code> false </code> else
      */
index 1747b4adb910fa3ce09872584f62c5119376ed6f..ddc37bdcadf781e5073e3d8ba8f1e4b3f98341c7 100644 (file)
@@ -11,8 +11,8 @@ package org.opendaylight.transportpce.servicehandler;
 import com.google.common.util.concurrent.FutureCallback;
 import org.slf4j.Logger;
 
-/*
- * Class to log future logging from datastore actions (write & modify & delete..).
+/**
+ * Class to log future logging from datastore actions (write, modify and delete..).
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
  */
 
index df9192211f1ada7415bb25bcb7158654ae5b3f18..081ac68f6ad8f1f61dd15178eb6b285216d1b25f 100644 (file)
@@ -43,9 +43,10 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
- * class for Mapping and Sending PCE requests : - path-computation-request -
- * cancel-resource-reserve.
+/**
+ * Class for Mapping and Sending PCE requests :
+ * - path-computation-request
+ * - cancelCresource-reserve.
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
  *
  */
@@ -66,7 +67,7 @@ public class MappingAndSendingPCRequest {
     private String error;
     private final ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(5));
 
-    /*
+    /**
      * MappingAndSendingPCRequest Class constructor for RPC serviceReconfigure.
      *
      * @param rpcRegistry
@@ -97,7 +98,7 @@ public class MappingAndSendingPCRequest {
         setError("");
     }
 
-    /*
+    /**
      * MappingAndSendingPCRequest Class constructor for RPC
      * serviceFeasibilityCheck.
      *
@@ -123,7 +124,7 @@ public class MappingAndSendingPCRequest {
         setError("");
     }
 
-    /*
+    /**
      * MappingAndSendingPCRequest Class constructor for RPC serviceCreate.
      *
      * @param rpcRegistry
@@ -148,7 +149,7 @@ public class MappingAndSendingPCRequest {
         setError("");
     }
 
-    /*
+    /**
      * MappingAndSendingPCRequest Class constructor for modify Service in ODL
      * Datastore.
      *
@@ -172,7 +173,7 @@ public class MappingAndSendingPCRequest {
         setError("");
     }
 
-    /*
+    /**
      * Build pathComputationRequestInput or cancelResourceReserveInput with
      * input parameters (serviceReconfigureInput or serviceFeasibilityCheckInput.
      *
@@ -223,7 +224,8 @@ public class MappingAndSendingPCRequest {
                 .setServiceHandlerHeader(serviceHandlerHeader.build()).build();
     }
 
-    /* Send cancelResourceReserve request to PCE.
+    /**
+     * Send cancelResourceReserve request to PCE.
      *
      * @return CancelResourceReserveOutput data response from PCE
      */
@@ -281,7 +283,8 @@ public class MappingAndSendingPCRequest {
         this.error = error;
     }
 
-    /*Send pathComputationRequest request to PCE.
+    /**
+     * Send pathComputationRequest request to PCE.
      *
      * @return PathComputationRequestOutput data response from PCE
      */
index 18531c2516278113d383fd4e0f5c85e5c7ab2831..3e91980e21896454804bba417b8ae450a6fc835e 100644 (file)
@@ -65,7 +65,7 @@ import org.slf4j.LoggerFactory;
 
 
 
-/*
+/**
  * Class for Mapping and Sending
  * Service Implemention requests :
  * - service implementation
@@ -90,7 +90,7 @@ public class MappingAndSendingSIRequest {
     private final ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(5));
 
 
-    /*
+    /**
      * MappingAndSendingSIRequest class constructor
      * for RPC serviceCreate.
      *
@@ -242,7 +242,7 @@ public class MappingAndSendingSIRequest {
         .build();
     }
 
-    /*
+    /**
      * MappingAndSendingSIRequest class constructor
      * for RPC serviceReconfigure.
      *
@@ -393,7 +393,7 @@ public class MappingAndSendingSIRequest {
     }
 
 
-    /*
+    /**
      * MappingAndSendingSIRequest class constructor
      * for RPC serviceDelete.
      *
@@ -543,7 +543,7 @@ public class MappingAndSendingSIRequest {
         LOG.info("ServiceImplementationRequestInput : " + serviceImplementationRequestInput.toString());
     }
 
-    /*
+    /**
      * Create RxDirection with Port
      * information.
      *
@@ -595,7 +595,7 @@ public class MappingAndSendingSIRequest {
         return result;
     }
 
-    /*
+    /**
      * Send serviceImplementation request to Render.
      *
      * @return ServiceImplementationRequestOutput data response from Renderer
@@ -639,7 +639,7 @@ public class MappingAndSendingSIRequest {
 
     }
 
-    /*
+    /**
      * Send serviceDelete request to Render.
      *
      * @return ServiceDeleteOutput data response from Renderer
index e61f605e5ce856d9d86c3a731974f8e238c28953..cf3a09aa9dbb858c2a6283aada79accf54fb7484 100644 (file)
@@ -29,7 +29,7 @@ import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
+/**
  * Class for mapping
  * Hard/soft constraint from Service 1.2
  * to servicePath 1.4.
@@ -46,8 +46,7 @@ public class MappingConstraints {
     private org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
         .routing.constraints.rev170426.routing.constraints.sp.SoftConstraints servicePathSoftConstraints;
 
-
-    /*
+    /**
      * MappingConstraints class constructor
      * for hard/soft from service 1.2.
      *
@@ -59,7 +58,7 @@ public class MappingConstraints {
         setServiceSoftConstraints(soft);
     }
 
-    /*
+    /**
      * MappingConstraints class constructor
      * for hard/soft from servicePath 1.4.
      *
@@ -74,7 +73,7 @@ public class MappingConstraints {
         setServicePathSoftConstraints(soft);
     }
 
-    /*
+    /**
      * map hard/soft constraints from Service 1.2
      * to ServicePath 1.4.
      */
index 494ff75af4b9986eadd1423196e130f31cde556b..e7bd93f3f1e780c769499108fadbb38b5cea9424 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.transportpce.servicehandler;
 
 import java.util.Map;
 
-/*
+/**
  * Enum class to identify ServiceAEnd / serviceZEnd.
  *
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
@@ -37,7 +37,7 @@ enum MyEndpoint {
         VALUE_MAP = b.build();
     }
 
-    /*
+    /**
      * Get integer value.
      *
      * @return integer value.
@@ -46,7 +46,7 @@ enum MyEndpoint {
         return value;
     }
 
-    /*
+    /**
      * Get Endpoint value.
      *
      * @param valueArg
index 63350057e2dda4a201314483249910bbf3fe1a6e..0af2ad526d3f479da0e6a9642f750792a704d512 100644 (file)
@@ -14,7 +14,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev1
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
+/**
  * Class for checking service sdnc-request-header compliancy.
  *
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
@@ -34,7 +34,7 @@ public class ServicehandlerCompliancyCheck {
     /* Response message from procedure. */
     private String message;
 
-    /*
+    /**
      * ServicehandlerCompliancyCheck class constructor.
      *
      * @param sdncRequestHeader
@@ -55,7 +55,7 @@ public class ServicehandlerCompliancyCheck {
         this.setMessage("");
     }
 
-    /*
+    /**
      * ServicehandlerCompliancyCheck class constructor.
      *
      * @param sdncRequestHeader
@@ -72,7 +72,7 @@ public class ServicehandlerCompliancyCheck {
         this.setMessage("");
     }
 
-    /*
+    /**
      * ServicehandlerCompliancyCheck class constructor.
      *
      * @param serviceName
@@ -89,7 +89,7 @@ public class ServicehandlerCompliancyCheck {
         this.setMessage("");
     }
 
-    /*
+    /**
      * ServicehandlerCompliancyCheck class constructor.
      *
      * @param serviceName
@@ -103,7 +103,7 @@ public class ServicehandlerCompliancyCheck {
         this.setMessage("");
     }
 
-    /*
+    /**
      * Check if a String is not null and not equal to void.
      *
      * @param value
@@ -119,7 +119,7 @@ public class ServicehandlerCompliancyCheck {
 
     }
 
-    /*
+    /**
      * Check Compliancy of Service request.
      *
      * @param contype
index d55d9d063a7aad02f0927212fecbafbdde3a516f..b385b14ffa6847840016c2a69a89a8e8c210aadc 100644 (file)
@@ -17,7 +17,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev1
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
+/**
  * Class for checking missing info on Tx/Rx for A/Z end.
  *
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
@@ -32,7 +32,7 @@ public class ServicehandlerTxRxCheck {
     /* type serviceEndpoint : serviceAEnd / serviceZEnd. */
     private String service = null;
 
-    /*
+    /**
      * ServicehandlerTxRxCheck class constructor.
      *
      * @param endPoint
@@ -48,7 +48,7 @@ public class ServicehandlerTxRxCheck {
         }
     }
 
-    /*
+    /**
      * Check if a String is not null and not equal to ''.
      *
      * @param value
@@ -64,7 +64,7 @@ public class ServicehandlerTxRxCheck {
 
     }
 
-    /*
+    /**
      * check if Port info is compliant.
      *
      * @param port
@@ -89,7 +89,7 @@ public class ServicehandlerTxRxCheck {
 
     }
 
-    /*
+    /**
      * Check if lgx info is compliant.
      *
      * @param lgx
@@ -111,7 +111,7 @@ public class ServicehandlerTxRxCheck {
         return result;
     }
 
-    /*
+    /**
      * Check if Tx/Rx Direction complaincy info.
      *
      * @param txDirection
@@ -149,7 +149,7 @@ public class ServicehandlerTxRxCheck {
         return result;
     }
 
-    /*
+    /**
      * Check Compliancy of Service TxRx info.
      *
      * @return true if String ok false if not
index 355681ebdd1ff157fdf21b920267d9762828f27c..fea237842df999aa76994340254adb58df293d89 100644 (file)
@@ -130,8 +130,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
-/*
- * Class to implement ServicehandlerService & ServicehandlerListener.
+/**
+ * Class to implement ServicehandlerService and ServicehandlerListener.
  *
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
  *
@@ -194,8 +194,9 @@ public class ServicehandlerImpl implements ServicehandlerService, StubpceListene
 
         LOG.info("checking Service Compliancy ...");
         /*
-         * Upon receipt of service-create RPC, service header and sdnc-request
-         * header compliancy are verified.
+         * Upon receipt of service
+         * -create RPC, service header and sdnc
+         * -request header compliancy are verified.
          */
         compliancyCheck = new ServicehandlerCompliancyCheck(input.getSdncRequestHeader(), input.getServiceName(),
                 input.getConnectionType(), RpcActions.ServiceCreate);
index 32929b9a46322068cfa41deb01d53e9e7e47284f..29e838d16d1047921735fc94e1e7f1c50d94d967 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
+/**
  * Class to register
  * Servicehandler Service and Notification.
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
@@ -51,7 +51,7 @@ public class ServicehandlerProvider {
         this.notificationPublishService = notificationPublishService;
     }
 
-    /*
+    /**
      * Method called when the blueprint container is created.
      */
     public void init() {
@@ -62,7 +62,7 @@ public class ServicehandlerProvider {
         rpcRegistration = rpcRegistry.addRpcImplementation(ServicehandlerService.class, consumer);
     }
 
-    /*
+    /**
      * Method called when the blueprint container is destroyed.
      */
     public void close() {
index 023c2b4e9e70188f08d630ac7a8852ef55283fd9..12d2b0dee6e86b9fc738779d65a108f67f72dd84 100644 (file)
@@ -14,7 +14,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
-/*
+/**
  * Class to check RPCs Compliancy.
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
  *
index 9a710c6e688adbfa39adbb9d7b45338c40357b4d..0ad88a6e59f41e8b6360acf56c0345d3978eb01c 100644 (file)
@@ -32,7 +32,7 @@ import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
+/**
  * Class for Sending
  * PCE requests :
  * - path-computation-request
index 558b56610b7cbc811dbf017ee2e952c1a565290a..41ac6e991c47908879ae0fe893faef4c0d05adb7 100644 (file)
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
-/*
+/**
  * Class to implement
  * StubpceService
  * StubpceListener.
index a1f2162187013bfd2aa20b9c4a9c674a9647bff3..0b1fe228e37c8800f4b92382d6016ae44dfb9911 100644 (file)
@@ -19,9 +19,9 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
+/**
  * Class to register
- * Stubpce Service & Notification.
+ * Stubpce Service and Notification.
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
  *
  */
@@ -41,7 +41,7 @@ public class StubpceProvider {
         this.notificationPublishService = notificationPublishService;
     }
 
-    /*
+    /**
      * Method called when the blueprint container is created.
      */
     public void init() {
@@ -50,7 +50,7 @@ public class StubpceProvider {
         rpcRegistration = rpcRegistry.addRpcImplementation(StubpceService.class, consumer);
     }
 
-    /*
+    /**
      * Method called when the blueprint container is destroyed.
      */
     public void close() {
index 36751b1ca1e1f1e5dde14503a81a21055bbc8139..8f17cc0d6980cd2a3c1c195b8c62e73d08a1ffc5 100644 (file)
@@ -17,9 +17,8 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topolo
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
- *Class for Sending
- * Renderer requests :
+/**
+ * Class for Sending Renderer requests :
  * - Service-implementation-request
  * - Service-delete-request.
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
index aa39144e489cfff31090c39b243ec93ef1e00abb..16132378cea15cf2cbaab98c048d6badbd5b2e55 100644 (file)
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
-/*
+/**
  * Class to implement StubrendererService.
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
  *
index 7b5b4c18d6f06244925e2f3127a7352240062634..066bf1897f0d16b0142df78f3fa7d4113974a983 100644 (file)
@@ -19,8 +19,8 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/*
- *Class to register Stubrenderer Service & Notification.
+/**
+ * Class to register Stubrenderer Service and Notification.
  * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
  *
  */
@@ -40,7 +40,7 @@ public class StubrendererProvider {
         this.notificationPublishService = notificationPublishService;
     }
 
-    /*
+    /**
      * Method called when the blueprint container is created.
      */
     public void init() {
@@ -49,7 +49,7 @@ public class StubrendererProvider {
         rpcRegistration = rpcRegistry.addRpcImplementation(StubrendererService.class, consumer);
     }
 
-    /*
+    /**
      * Method called when the blueprint container is destroyed.
      */
     public void close() {