Removed pcep-stateful02 implementation 22/22722/6
authorDana Kutenicsova <dkutenic@cisco.com>
Tue, 16 Jun 2015 18:57:17 +0000 (20:57 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 3 Aug 2015 16:51:08 +0000 (16:51 +0000)
EOL for pcep-stateful02 is scheduled for Beryllium

Change-Id: I55b58c350273c760366aabb92bae03010d622f42
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
78 files changed:
artifacts/pom.xml
features/pcep/pom.xml
features/pcep/src/main/features/features.xml
integration-tests/pom.xml
integration-tests/src/test/java/org/opendaylight/protocol/integration/pcep/AbstractPcepOsgiTest.java
pcep/controller-config/src/main/resources/initial/32-pcep.xml
pcep/controller-config/src/main/resources/initial/39-pcep-provider.xml
pcep/ietf-stateful02/.project [deleted file]
pcep/ietf-stateful02/pom.xml [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/CrabbeInitiated00PCEPParserModule.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/CrabbeInitiated00PCEPParserModuleFactory.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/IetfStateful02PCEPParserModule.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/IetfStateful02PCEPParserModuleFactory.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/Stateful02PCEPSessionProposalFactoryModule.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/Stateful02PCEPSessionProposalFactoryModuleFactory.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/InitiatedActivator.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/LSPCleanupTlvParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PCEPOpenObjectParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PCEStatefulCapabilityTlvParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PcinitiateMessageParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspDbVersionTlvParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspObjectParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspSymbolicNameTlvParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspaObjectParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02NodeIdentifierTlvParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02OpenObjectParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCReplyMessageParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCReportMessageParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCRequestMessageParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCUpdateRequestMessageParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02RSVPErrorSpecTlvParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02SessionProposalFactory.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02StatefulCapabilityTlvParser.java [deleted file]
pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/StatefulActivator.java [deleted file]
pcep/ietf-stateful02/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator [deleted file]
pcep/ietf-stateful02/src/main/yang/odl-pcep-crabbe-initiated00.yang [deleted file]
pcep/ietf-stateful02/src/main/yang/odl-pcep-ietf-stateful02-cfg.yang [deleted file]
pcep/ietf-stateful02/src/main/yang/odl-pcep-ietf-stateful02.yang [deleted file]
pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/CrabbeInitiated00PCEPParserModuleTest.java [deleted file]
pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/IetfStateful02PCEPParserModuleTest.java [deleted file]
pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPMessageTest.java [deleted file]
pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPObjectParserTest.java [deleted file]
pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPTlvParserTest.java [deleted file]
pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/Stateful02PCEPSessionProposalFactoryModuleTest.java [deleted file]
pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/Stateful02SessionProposalFactoryTest.java [deleted file]
pcep/ietf-stateful02/src/test/resources/PCEPLspObject1WithTLV.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCEPLspaObject1LowerBounds.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCEPOpenMessage1.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCEPOpenObject1.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCEPRequestMessage1.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCRep.3.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCRep.5.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCRpt.1.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCRpt.2.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCRpt.3.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCRpt.5.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCUpd.2.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/PCUpd.5.bin [deleted file]
pcep/ietf-stateful02/src/test/resources/Pcinit.bin [deleted file]
pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/CrabbeInitiated00PCEPParserModule.java [deleted file]
pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/CrabbeInitiated00PCEPParserModuleFactory.java [deleted file]
pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/IetfStateful02PCEPParserModule.java [deleted file]
pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/IetfStateful02PCEPParserModuleFactory.java [deleted file]
pcep/pom.xml
pcep/topology-provider/pom.xml
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/SessionListenerState.java
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListener.java [deleted file]
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListenerFactory.java [deleted file]
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful07TopologySessionListener.java
pcep/topology-provider/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModule.java [deleted file]
pcep/topology-provider/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModuleFactory.java [deleted file]
pcep/topology-provider/src/main/yang/odl-pcep-topology-provider-cfg.yang
pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListenerTest.java [deleted file]
pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/TopologyProgrammingTest.java
pcep/topology-provider/src/test/java/org/opendaylight/controller/config/yang/pcep/topology/provider/PCEPTopologyProviderModuleTest.java
pcep/topology-provider/src/test/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModuleTest.java [deleted file]
pcep/tunnel-provider/pom.xml
pcep/tunnel-provider/src/test/java/org/opendaylight/controller/config/yang/pcep/tunnel/provider/PCEPTunnelTopologyProviderModuleTest.java

index 6c92fddb63bd0f726c356ee369d444fad0c50d02..7642b66cb3d499540a8b3fbad2f51d869412a12d 100644 (file)
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>pcep-ietf-stateful02</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>pcep-ietf-stateful02</artifactId>
-                <version>${project.version}</version>
-                <type>test-jar</type>
-                <scope>test</scope>
-            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>pcep-ietf-stateful07</artifactId>
index 9b1d383cb1ad36f99cf8b5a5060af8ad85cd340d..f8f5349c0512b78cd1412495826eba509a2b87c5 100644 (file)
           <groupId>${project.groupId}</groupId>
           <artifactId>pcep-spi</artifactId>
       </dependency>
-      <dependency>
-          <groupId>${project.groupId}</groupId>
-          <artifactId>pcep-ietf-stateful02</artifactId>
-      </dependency>
       <dependency>
           <groupId>${project.groupId}</groupId>
           <artifactId>pcep-ietf-stateful07</artifactId>
index 0d8aa84efb48eaf51bb0ae1cb5f8046148d6b646..8790c1ee34c4bdcfa037641854c24cd6e1db6c1f 100644 (file)
@@ -20,7 +20,6 @@
     <feature name='odl-bgpcep-pcep-all' version='${project.version}'>
         <feature version='${project.version}'>odl-bgpcep-pcep</feature>
         <feature version='${project.version}'>odl-bgpcep-pcep-impl</feature>
-        <feature version='${project.version}'>odl-bgpcep-pcep-stateful02</feature>
         <feature version='${project.version}'>odl-bgpcep-pcep-stateful07</feature>
         <feature version='${project.version}'>odl-bgpcep-pcep-segment-routing</feature>
         <feature version='${project.version}'>odl-bgpcep-pcep-topology</feature>
         <bundle>mvn:org.opendaylight.bgpcep/pcep-topology-spi/{{VERSION}}</bundle>
     </feature>
 
-    <feature name='odl-bgpcep-pcep-stateful02' version='${project.version}'>
-        <feature version='${project.version}'>odl-bgpcep-pcep-impl</feature>
-        <feature version='${project.version}'>odl-bgpcep-pcep-topology</feature>
-        <bundle>mvn:org.opendaylight.bgpcep/pcep-ietf-stateful02/{{VERSION}}</bundle>
-    </feature>
-
     <feature name='odl-bgpcep-pcep-stateful07' version='${project.version}'>
         <feature version='${project.version}'>odl-bgpcep-pcep-impl</feature>
         <feature version='${project.version}'>odl-bgpcep-pcep-topology</feature>
 
     <feature name='odl-bgpcep-pcep-topology-provider' version='${project.version}'>
         <feature version='${project.version}'>odl-bgpcep-programming-impl</feature>
-        <feature version='${project.version}'>odl-bgpcep-pcep-stateful02</feature>
         <feature version='${project.version}'>odl-bgpcep-pcep-stateful07</feature>
         <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
         <bundle>mvn:org.opendaylight.bgpcep/pcep-topology-provider/{{VERSION}}</bundle>
index 9d67c69975b9e8a8fefe2f4653d9b6f24842e489..0d163521ef51bbe5eaf533a226e9c16e1d536992 100644 (file)
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-ietf-stateful02</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
 
         <dependency>
             <groupId>${project.groupId}</groupId>
index b13609de7c3742e66397e671c2311f02470040eb..e481c4c8892329137bb00bbfdbaa1f075f76a78c 100644 (file)
@@ -78,7 +78,6 @@ public class AbstractPcepOsgiTest {
                 mavenBundle("org.opendaylight.bgpcep", "pcep-api").versionAsInProject(), //
                 mavenBundle("org.opendaylight.bgpcep", "pcep-impl").versionAsInProject(), //
                 mavenBundle("org.opendaylight.bgpcep", "pcep-spi").versionAsInProject(), //
-                mavenBundle("org.opendaylight.bgpcep", "pcep-ietf-stateful02").versionAsInProject(), //
                 mavenBundle("org.opendaylight.bgpcep", "pcep-ietf-stateful07").versionAsInProject(), //
                 mavenBundle("org.opendaylight.tcpmd5", "tcpmd5-api").versionAsInProject(), //
                 mavenBundle("org.opendaylight.tcpmd5", "tcpmd5-netty").versionAsInProject(), //
index 4ee3e11091e7fb9e6e2a2e435a66a420c805ab03..5c369e189e42b95dbcfe88e6b94b0c0ff0b7248a 100644 (file)
@@ -14,8 +14,7 @@
         <capability>urn:opendaylight:params:xml:ns:yang:controller:pcep:impl?module=odl-pcep-impl-cfg&amp;revision=2013-06-27</capability>
         <capability>urn:opendaylight:params:xml:ns:yang:controller:pcep:spi?module=odl-pcep-spi-cfg&amp;revision=2013-11-15</capability>
         <capability>urn:opendaylight:params:xml:ns:yang:controller:programming:spi?module=odl-programming-spi-cfg&amp;revision=2013-11-15</capability>
-    <capability>urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful02:cfg?module=odl-pcep-ietf-stateful02-cfg&amp;revision=2014-02-21</capability>
-    <capability>urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful07:cfg?module=odl-pcep-ietf-stateful07-cfg&amp;revision=2015-07-14</capability>
+        <capability>urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful07:cfg?module=odl-pcep-ietf-stateful07-cfg&amp;revision=2015-07-14</capability>
     </required-capabilities>
     <configuration>
 
                         <name>pcep-parser-base</name>
                     </extension>
 
-                    <!--
-                         Only one pair of stateful & initiated parsers can be loaded at a time
-                         -->
-
                     <!-- This block is draft-ietf-pce-stateful-pce-07 + draft-ietf-pce-inititated-pce-00 -->
                     <extension>
                         <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
                         <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
                         <name>pcep-parser-sync-optimizations</name>
                     </extension>
-
-
-                    <!-- This block is draft-ietf-pce-stateful-pce-02 + draft-crabbe-pce-inititated-pce-00 -->
-                    <!--extension>
-                        <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
-                        <name>pcep-parser-ietf-stateful02</name>
-                    </extension>
-                    <extension>
-                        <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
-                        <name>pcep-parser-crabbe-initiated00</name>
-                    </extension-->
                 </module>
                 <module>
                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">prefix:pcep-parser-base</type>
                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful07:cfg">prefix:pcep-parser-sync-optimizations</type>
                     <name>pcep-parser-sync-optimizations</name>
                 </module>
-                <module>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful02:cfg">prefix:pcep-parser-ietf-stateful02</type>
-                    <name>pcep-parser-ietf-stateful02</name>
-                </module>
-                <module>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful02:cfg">prefix:pcep-parser-crabbe-initiated00</type>
-                    <name>pcep-parser-crabbe-initiated00</name>
-                </module>
                 <module>
                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">prefix:pcep-session-proposal-factory-impl</type>
                     <name>global-pcep-session-proposal-factory</name>
                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful07:cfg">prefix:pcep-session-proposal-factory-stateful07</type>
                     <name>stateful07-prop</name>
                 </module>
-                <module>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful02:cfg">prefix:pcep-session-proposal-factory-stateful02</type>
-                    <name>stateful02-prop</name>
-                </module>
                 <module>
                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">prefix:pcep-dispatcher-impl</type>
                     <name>global-pcep-dispatcher</name>
                         <name>pcep-parser-ietf-stateful07</name>
                         <provider>/config/modules/module[name='pcep-parser-ietf-stateful07']/instance[name='pcep-parser-ietf-stateful07']</provider>
                     </instance>
-                    <instance>
-                        <name>pcep-parser-crabbe-initiated00</name>
-                        <provider>/config/modules/module[name='pcep-parser-crabbe-initiated00']/instance[name='pcep-parser-crabbe-initiated00']</provider>
-                    </instance>
-                    <instance>
-                        <name>pcep-parser-ietf-stateful02</name>
-                        <provider>/config/modules/module[name='pcep-parser-ietf-stateful02']/instance[name='pcep-parser-ietf-stateful02']</provider>
-                    </instance>
                     <instance>
                         <name>pcep-parser-sync-optimizations</name>
                         <provider>/config/modules/module[name='pcep-parser-sync-optimizations']/instance[name='pcep-parser-sync-optimizations']</provider>
                         <name>stateful07-proposal</name>
                         <provider>/config/modules/module[name='pcep-session-proposal-factory-stateful07']/instance[name='stateful07-prop']</provider>
                     </instance>
-                    <instance>
-                        <name>stateful02-proposal</name>
-                        <provider>/config/modules/module[name='pcep-session-proposal-factory-stateful02']/instance[name='stateful02-prop']</provider>
-                    </instance>
                 </service>
 
                 <service>
index adfad1598da473ed3245906772ac144bb1b507a2..1df45399899199f6ebbd5f20d573062179f379ff 100644 (file)
 
         <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
             <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-                <module>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">prefix:pcep-topology-stateful02</type>
-                    <name>global</name>
-                </module>
                 <module>
                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">prefix:pcep-topology-stateful07</type>
                     <name>global</name>
                 </service>
                 <service>
                     <type xmlns:pcep="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">pcep:pcep-topology-stateful</type>
-                    <instance>
-                        <name>stateful02</name>
-                        <provider>/config/modules/module[name='pcep-topology-stateful02']/instance[name='global']</provider>
-                    </instance>
                     <instance>
                         <name>stateful07</name>
                         <provider>/config/modules/module[name='pcep-topology-stateful07']/instance[name='global']</provider>
diff --git a/pcep/ietf-stateful02/.project b/pcep/ietf-stateful02/.project
deleted file mode 100644 (file)
index 62f29b5..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. 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
--->
-<projectDescription>
-
-       <name>pcep-ietf-stateful02</name>
-
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.m2e.core.maven2Builder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>
-       </natures>
-</projectDescription>
diff --git a/pcep/ietf-stateful02/pom.xml b/pcep/ietf-stateful02/pom.xml
deleted file mode 100644 (file)
index 0f8631c..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Cisco Systems, Inc. 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
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <scm>
-        <connection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</connection>
-        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</developerConnection>
-        <url>https://wiki.opendaylight.org/view/BGP_LS_PCEP:Main</url>
-        <tag>HEAD</tag>
-    </scm>
-    <parent>
-        <groupId>org.opendaylight.bgpcep</groupId>
-        <artifactId>pcep-parent</artifactId>
-        <version>0.5.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>pcep-ietf-stateful02</artifactId>
-    <description>PCE IETF Stateful model plugin</description>
-    <packaging>bundle</packaging>
-    <name>${project.artifactId}</name>
-    <prerequisites>
-        <maven>3.0.4</maven>
-    </prerequisites>
-
-    <dependencies>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>concepts</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-spi</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-topology-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-tunnel-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>topology-tunnel-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>rsvp-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-impl</artifactId>
-        </dependency>
-
-        <!--
-            FIXME: this is in support of the generated code. This should not
-                   be here, but the plugin should bring it in.
-        -->
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-binding</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>concepts</artifactId>
-        </dependency>
-
-        <!--
-             FIXME: these are IETF models which are pre-generated in SAL infra.
-                    This should not be here, but rather should somehow be
-                    discovered by the plugin.
-        -->
-        <dependency>
-            <groupId>org.opendaylight.yangtools.model</groupId>
-            <artifactId>ietf-inet-types</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools.model</groupId>
-            <artifactId>ietf-topology</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-buffer</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-         <!--test dependencies -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-manager</artifactId>
-            <type>test-jar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-manager</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>mockito-configuration</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-spi</artifactId>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.opendaylight.yangtools</groupId>
-                <artifactId>yang-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/CrabbeInitiated00PCEPParserModule.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/CrabbeInitiated00PCEPParserModule.java
deleted file mode 100644 (file)
index d487113..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.config.yang.pcep.stateful02.cfg;
-
-import org.opendaylight.protocol.pcep.crabbe.initiated00.InitiatedActivator;
-
-/**
-*
-*/
-@Deprecated
-public final class CrabbeInitiated00PCEPParserModule extends
-        org.opendaylight.controller.config.yang.pcep.stateful02.cfg.AbstractCrabbeInitiated00PCEPParserModule {
-
-    public CrabbeInitiated00PCEPParserModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public CrabbeInitiated00PCEPParserModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final CrabbeInitiated00PCEPParserModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new InitiatedActivator();
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/CrabbeInitiated00PCEPParserModuleFactory.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/CrabbeInitiated00PCEPParserModuleFactory.java
deleted file mode 100644 (file)
index d9147d2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.config.yang.pcep.stateful02.cfg;
-
-/**
-*
-*/
-@Deprecated
-public class CrabbeInitiated00PCEPParserModuleFactory extends
-        org.opendaylight.controller.config.yang.pcep.stateful02.cfg.AbstractCrabbeInitiated00PCEPParserModuleFactory {
-
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/IetfStateful02PCEPParserModule.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/IetfStateful02PCEPParserModule.java
deleted file mode 100644 (file)
index 4c8569a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.config.yang.pcep.stateful02.cfg;
-
-import org.opendaylight.protocol.pcep.ietf.stateful02.StatefulActivator;
-
-/**
-*
-*/
-@Deprecated
-public final class IetfStateful02PCEPParserModule extends
-        org.opendaylight.controller.config.yang.pcep.stateful02.cfg.AbstractIetfStateful02PCEPParserModule {
-
-    public IetfStateful02PCEPParserModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public IetfStateful02PCEPParserModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final IetfStateful02PCEPParserModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new StatefulActivator();
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/IetfStateful02PCEPParserModuleFactory.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/IetfStateful02PCEPParserModuleFactory.java
deleted file mode 100644 (file)
index c39e711..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.config.yang.pcep.stateful02.cfg;
-
-/**
-*
-*/
-@Deprecated
-public class IetfStateful02PCEPParserModuleFactory extends
-        org.opendaylight.controller.config.yang.pcep.stateful02.cfg.AbstractIetfStateful02PCEPParserModuleFactory {
-
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/Stateful02PCEPSessionProposalFactoryModule.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/Stateful02PCEPSessionProposalFactoryModule.java
deleted file mode 100644 (file)
index f7e3bae..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.config.yang.pcep.stateful02.cfg;
-
-import com.google.common.base.Preconditions;
-import java.net.InetSocketAddress;
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-import org.opendaylight.protocol.pcep.PCEPSessionProposalFactory;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02SessionProposalFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- */
-@Deprecated
-public final class Stateful02PCEPSessionProposalFactoryModule extends org.opendaylight.controller.config.yang.pcep.stateful02.cfg.AbstractStateful02PCEPSessionProposalFactoryModule {
-    private static final Logger LOG = LoggerFactory.getLogger(Stateful02PCEPSessionProposalFactoryModule.class);
-
-    private static final String NOT_SET = "value is not set.";
-    private static final int RATIO = 4;
-
-    public Stateful02PCEPSessionProposalFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-        final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public Stateful02PCEPSessionProposalFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-        final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-        final Stateful02PCEPSessionProposalFactoryModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    protected void customValidation() {
-        JmxAttributeValidationException.checkNotNull(getActive(), NOT_SET, activeJmxAttribute);
-        JmxAttributeValidationException.checkNotNull(getInitiated(), NOT_SET, initiatedJmxAttribute);
-        JmxAttributeValidationException.checkNotNull(getDeadTimerValue(), NOT_SET, deadTimerValueJmxAttribute);
-        JmxAttributeValidationException.checkNotNull(getKeepAliveTimerValue(), NOT_SET, keepAliveTimerValueJmxAttribute);
-        JmxAttributeValidationException.checkNotNull(getTimeout(), NOT_SET, timeoutJmxAttribute);
-        if (getKeepAliveTimerValue() != 0) {
-            JmxAttributeValidationException.checkCondition(getKeepAliveTimerValue() >= 1, "minimum value is 1.",
-                keepAliveTimerValueJmxAttribute);
-            if (getDeadTimerValue() != 0 && (getDeadTimerValue() / getKeepAliveTimerValue() != RATIO)) {
-                LOG.warn("DeadTimerValue should be 4 times greater than KeepAliveTimerValue");
-            }
-        }
-        if (getActive() && !getStateful()) {
-            setStateful(true);
-        }
-        JmxAttributeValidationException.checkNotNull(getStateful(), "value is not set.", statefulJmxAttribute);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        final Stateful02SessionProposalFactory inner = new Stateful02SessionProposalFactory(getDeadTimerValue(), getKeepAliveTimerValue(), getStateful(), getActive(), getInitiated(), getTimeout());
-        return new PCEPSessionProposalFactoryCloseable(inner);
-    }
-
-    private static final class PCEPSessionProposalFactoryCloseable implements PCEPSessionProposalFactory, AutoCloseable {
-        private final Stateful02SessionProposalFactory inner;
-
-        public PCEPSessionProposalFactoryCloseable(final Stateful02SessionProposalFactory inner) {
-            this.inner = Preconditions.checkNotNull(inner);
-        }
-
-        @Override
-        public void close() {
-        }
-
-        @Override
-        public Open getSessionProposal(final InetSocketAddress inetSocketAddress, final int sessionId) {
-            return this.inner.getSessionProposal(inetSocketAddress, sessionId);
-        }
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/Stateful02PCEPSessionProposalFactoryModuleFactory.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/controller/config/yang/pcep/stateful02/cfg/Stateful02PCEPSessionProposalFactoryModuleFactory.java
deleted file mode 100644 (file)
index 0e00694..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.config.yang.pcep.stateful02.cfg;
-
-/**
- *
- */
-@Deprecated
-public class Stateful02PCEPSessionProposalFactoryModuleFactory extends
-        org.opendaylight.controller.config.yang.pcep.stateful02.cfg.AbstractStateful02PCEPSessionProposalFactoryModuleFactory {
-
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/InitiatedActivator.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/InitiatedActivator.java
deleted file mode 100644 (file)
index b10c19a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.crabbe.initiated00;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
-import org.opendaylight.protocol.pcep.spi.pojo.AbstractPCEPExtensionProviderActivator;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Pcinitiate;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.lsp.cleanup.tlv.LspCleanup;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
-
-@Deprecated
-public class InitiatedActivator extends AbstractPCEPExtensionProviderActivator {
-    @Override
-    protected List<AutoCloseable> startImpl(final PCEPExtensionProviderContext context) {
-        final List<AutoCloseable> regs = new ArrayList<>();
-
-        regs.add(context.registerMessageParser(PcinitiateMessageParser.TYPE,
-                new PcinitiateMessageParser(context.getObjectHandlerRegistry())));
-        regs.add(context.registerMessageSerializer(Pcinitiate.class, new PcinitiateMessageParser(context.getObjectHandlerRegistry())));
-
-        regs.add(context.registerObjectParser(PCEPOpenObjectParser.CLASS, PCEPOpenObjectParser.TYPE,
-                new PCEPOpenObjectParser(context.getTlvHandlerRegistry(), context.getVendorInformationTlvRegistry())));
-        regs.add(context.registerObjectSerializer(Open.class, new PCEPOpenObjectParser(context.getTlvHandlerRegistry(),
-                context.getVendorInformationTlvRegistry())));
-
-        regs.add(context.registerTlvParser(LSPCleanupTlvParser.TYPE, new LSPCleanupTlvParser()));
-        regs.add(context.registerTlvSerializer(LspCleanup.class, new LSPCleanupTlvParser()));
-
-        regs.add(context.registerTlvParser(PCEStatefulCapabilityTlvParser.TYPE, new PCEStatefulCapabilityTlvParser()));
-        regs.add(context.registerTlvSerializer(Stateful.class, new PCEStatefulCapabilityTlvParser()));
-
-        return regs;
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/LSPCleanupTlvParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/LSPCleanupTlvParser.java
deleted file mode 100644 (file)
index 25f7f16..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.crabbe.initiated00;
-
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
-
-import com.google.common.base.Preconditions;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvParser;
-import org.opendaylight.protocol.pcep.spi.TlvSerializer;
-import org.opendaylight.protocol.pcep.spi.TlvUtil;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.lsp.cleanup.tlv.LspCleanup;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.lsp.cleanup.tlv.LspCleanupBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-
-@Deprecated
-public final class LSPCleanupTlvParser implements TlvParser, TlvSerializer {
-
-    public static final int TYPE = 26;
-
-    private static final int CONTENT_LENGTH = 4;
-
-    @Override
-    public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
-        Preconditions.checkArgument(tlv instanceof LspCleanup, "LSPCleanupTlv is mandatory.");
-        final ByteBuf body = Unpooled.buffer(CONTENT_LENGTH);
-        writeUnsignedInt(((LspCleanup) tlv).getTimeout(), body);
-        TlvUtil.formatTlv(TYPE, body, buffer);
-    }
-
-    @Override
-    public Tlv parseTlv(final ByteBuf buffer) throws PCEPDeserializerException {
-        if (buffer == null) {
-            return null;
-        }
-        return new LspCleanupBuilder().setTimeout(buffer.readUnsignedInt()).build();
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PCEPOpenObjectParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PCEPOpenObjectParser.java
deleted file mode 100644 (file)
index f3abb24..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.crabbe.initiated00;
-
-import io.netty.buffer.ByteBuf;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02OpenObjectParser;
-import org.opendaylight.protocol.pcep.spi.TlvRegistry;
-import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.lsp.cleanup.tlv.LspCleanup;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.TlvsBuilder;
-
-/**
- * Parser for Open object
- */
-@Deprecated
-public final class PCEPOpenObjectParser extends Stateful02OpenObjectParser {
-
-    public PCEPOpenObjectParser(final TlvRegistry tlvReg, final VendorInformationTlvRegistry viTlvReg) {
-        super(tlvReg, viTlvReg);
-    }
-
-    @Override
-    public void addTlv(final TlvsBuilder tbuilder, final Tlv tlv) {
-        super.addTlv(tbuilder, tlv);
-        final Tlvs2Builder statefulBuilder = new Tlvs2Builder();
-        if (tbuilder.getAugmentation(Tlvs2.class) != null) {
-            final Tlvs2 t = tbuilder.getAugmentation(Tlvs2.class);
-            if (t.getStateful() != null) {
-                statefulBuilder.setStateful(t.getStateful());
-            }
-        }
-        final Tlvs1Builder cleanupBuilder = new Tlvs1Builder();
-        if (tbuilder.getAugmentation(Tlvs1.class) != null) {
-            final Tlvs1 t = tbuilder.getAugmentation(Tlvs1.class);
-            if (t.getLspCleanup() != null) {
-                cleanupBuilder.setLspCleanup(t.getLspCleanup());
-            }
-        }
-        if (tlv instanceof Stateful) {
-            statefulBuilder.setStateful((Stateful) tlv);
-        } else if (tlv instanceof LspCleanup) {
-            cleanupBuilder.setLspCleanup((LspCleanup) tlv);
-        }
-        tbuilder.addAugmentation(Tlvs2.class, statefulBuilder.build());
-        tbuilder.addAugmentation(Tlvs1.class, cleanupBuilder.build());
-    }
-
-    @Override
-    public void serializeTlvs(final Tlvs tlvs, final ByteBuf body) {
-        if (tlvs == null) {
-            return;
-        }
-        super.serializeTlvs(tlvs, body);
-        if (tlvs.getAugmentation(Tlvs1.class) != null) {
-            final Tlvs1 cleanupTlv = tlvs.getAugmentation(Tlvs1.class);
-            if (cleanupTlv.getLspCleanup() != null) {
-                serializeTlv(cleanupTlv.getLspCleanup(), body);
-            }
-        }
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PCEStatefulCapabilityTlvParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PCEStatefulCapabilityTlvParser.java
deleted file mode 100644 (file)
index 47fa76b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.crabbe.initiated00;
-
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeBitSet;
-
-import com.google.common.base.Preconditions;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.util.BitSet;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02StatefulCapabilityTlvParser;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvUtil;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.StatefulBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-
-/**
- * Parser for {@link Stateful}
- */
-@Deprecated
-public final class PCEStatefulCapabilityTlvParser extends Stateful02StatefulCapabilityTlvParser {
-
-    private static final int I_FLAG_OFFSET = 29;
-
-    @Override
-    public Stateful parseTlv(final ByteBuf buffer) throws PCEPDeserializerException {
-        if (buffer == null) {
-            return null;
-        }
-        if (buffer.readableBytes() < FLAGS_F_LENGTH) {
-            throw new PCEPDeserializerException("Wrong length of array of bytes. Passed: " + buffer.readableBytes() + "; Expected: >= "
-                    + FLAGS_F_LENGTH + ".");
-        }
-        final BitSet flags = ByteArray.bytesToBitSet(ByteArray.readBytes(buffer, FLAGS_F_LENGTH));
-
-        final StatefulBuilder sb = new StatefulBuilder();
-        sb.setIncludeDbVersion(flags.get(S_FLAG_OFFSET));
-        sb.setLspUpdateCapability(flags.get(U_FLAG_OFFSET));
-
-        if (flags.get(I_FLAG_OFFSET)) {
-            sb.addAugmentation(Stateful1.class, new Stateful1Builder().setInitiation(Boolean.TRUE).build());
-        }
-
-        return sb.build();
-    }
-
-    @Override
-    public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
-        Preconditions.checkArgument(tlv instanceof Stateful, "StatefulCapabilityTlv is mandatory.");
-        final Stateful sct = (Stateful) tlv;
-        final ByteBuf body = Unpooled.buffer();
-        final BitSet flags = new BitSet(FLAGS_F_LENGTH * Byte.SIZE);
-        final Stateful1 sfi = sct.getAugmentation(Stateful1.class);
-        if (sfi != null) {
-            flags.set(I_FLAG_OFFSET, sfi.isInitiation());
-        }
-        if (sct.isLspUpdateCapability() != null) {
-            flags.set(U_FLAG_OFFSET, sct.isLspUpdateCapability());
-        }
-        if (sct.isIncludeDbVersion() != null) {
-            flags.set(S_FLAG_OFFSET, sct.isIncludeDbVersion());
-        }
-        writeBitSet(flags, FLAGS_F_LENGTH, body);
-        TlvUtil.formatTlv(TYPE, body, buffer);
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PcinitiateMessageParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/crabbe/initiated00/PcinitiateMessageParser.java
deleted file mode 100644 (file)
index 2a9c28d..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.crabbe.initiated00;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.util.List;
-import org.opendaylight.protocol.pcep.spi.AbstractMessageParser;
-import org.opendaylight.protocol.pcep.spi.MessageUtil;
-import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Pcinitiate;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.PcinitiateBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.PcinitiateMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.pcinitiate.message.Requests;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.pcinitiate.message.RequestsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.Bandwidth;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.object.EndpointsObj;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Ero;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.Metrics;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.MetricsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.metric.object.Metric;
-
-/**
- * Parser for {@link Pcinitiate}
- */
-@Deprecated
-public class PcinitiateMessageParser extends AbstractMessageParser {
-    public static final int TYPE = 12;
-
-    public PcinitiateMessageParser(final ObjectRegistry registry) {
-        super(registry);
-    }
-
-    @Override
-    public void serializeMessage(final Message message, final ByteBuf out) {
-        Preconditions.checkArgument(message instanceof Pcinitiate, "Wrong instance of Message. Passed instance of %s. Need Pcinitiate.", message.getClass());
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.PcinitiateMessage init = ((Pcinitiate) message).getPcinitiateMessage();
-        final ByteBuf buffer = Unpooled.buffer();
-        for (final Requests req : init.getRequests()) {
-            serializeObject(req.getEndpointsObj(), buffer);
-            serializeObject(req.getLspa(), buffer);
-            serializeObject(req.getEro(), buffer);
-            serializeObject(req.getBandwidth(), buffer);
-            if (req.getMetrics() != null && !req.getMetrics().isEmpty()) {
-                for (final Metrics m : req.getMetrics()) {
-                    serializeObject(m.getMetric(), buffer);
-                }
-            }
-        }
-        MessageUtil.formatMessage(TYPE, buffer, out);
-    }
-
-    @Override
-    protected Message validate(final List<Object> objects, final List<Message> errors) throws PCEPDeserializerException {
-        Preconditions.checkArgument(objects != null, "Passed list can't be null.");
-        final PcinitiateMessageBuilder builder = new PcinitiateMessageBuilder();
-        final List<Requests> reqs = Lists.newArrayList();
-        while (!objects.isEmpty()) {
-            reqs.add(this.getValidRequest(objects));
-        }
-        builder.setRequests(reqs);
-        return new PcinitiateBuilder().setPcinitiateMessage(builder.build()).build();
-    }
-
-    private Requests getValidRequest(final List<Object> objects) {
-        final RequestsBuilder builder = new RequestsBuilder();
-        builder.setEndpointsObj((EndpointsObj) objects.get(0));
-        objects.remove(0);
-
-        builder.setLspa((Lspa) objects.get(0));
-        objects.remove(0);
-        final List<Metrics> metrics = Lists.newArrayList();
-
-        Object obj;
-        State state = State.INIT;
-        while (!objects.isEmpty() && !state.equals(State.END)) {
-            obj = objects.get(0);
-
-            switch (state) {
-            case INIT:
-                state = State.ERO_IN;
-                if (obj instanceof Ero) {
-                    builder.setEro((Ero) obj);
-                    break;
-                }
-            case ERO_IN:
-                state = State.BANDWIDTH_IN;
-                if (obj instanceof Bandwidth) {
-                    builder.setBandwidth((Bandwidth) obj);
-                    break;
-                }
-            case BANDWIDTH_IN:
-                state = State.METRIC_IN;
-                if (obj instanceof Metric) {
-                    metrics.add(new MetricsBuilder().setMetric((Metric) obj).build());
-                    state = State.BANDWIDTH_IN;
-                    break;
-                }
-            case METRIC_IN:
-                state = State.END;
-                break;
-            case END:
-                break;
-            default:
-                break;
-            }
-            if (!state.equals(State.END)) {
-                objects.remove(0);
-            }
-        }
-        builder.setMetrics(metrics);
-        return builder.build();
-    }
-
-    private enum State {
-        INIT, ERO_IN, BANDWIDTH_IN, METRIC_IN, END
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspDbVersionTlvParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspDbVersionTlvParser.java
deleted file mode 100644 (file)
index bdb32aa..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedLong;
-
-import com.google.common.base.Preconditions;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.math.BigInteger;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvParser;
-import org.opendaylight.protocol.pcep.spi.TlvSerializer;
-import org.opendaylight.protocol.pcep.spi.TlvUtil;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.db.version.tlv.LspDbVersion;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.db.version.tlv.LspDbVersionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-
-/**
- * Parser for {@link LspDbVersion}
- */
-@Deprecated
-public final class Stateful02LspDbVersionTlvParser implements TlvParser, TlvSerializer {
-
-    public static final int TYPE = 23;
-
-    private static final int CONTENT_LENGTH = Long.SIZE / Byte.SIZE;
-
-    @Override
-    public LspDbVersion parseTlv(final ByteBuf buffer) throws PCEPDeserializerException {
-        if (buffer == null) {
-            return null;
-        }
-        return new LspDbVersionBuilder().setVersion(BigInteger.valueOf(buffer.readLong())).build();
-    }
-
-    @Override
-    public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
-        Preconditions.checkArgument(tlv instanceof LspDbVersion, "LspDbVersionTlv is mandatory.");
-        final ByteBuf body = Unpooled.buffer(CONTENT_LENGTH);
-        final LspDbVersion ldvTlv = (LspDbVersion) tlv;
-        Preconditions.checkArgument(ldvTlv.getVersion() != null, "Version is mandatory.");
-        writeUnsignedLong(ldvTlv.getVersion(), body);
-        TlvUtil.formatTlv(TYPE, body, buffer);
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspObjectParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspObjectParser.java
deleted file mode 100644 (file)
index 163419c..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeMedium;
-
-import com.google.common.base.Preconditions;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.util.BitSet;
-import java.util.List;
-import org.opendaylight.protocol.pcep.spi.AbstractObjectWithTlvsParser;
-import org.opendaylight.protocol.pcep.spi.ObjectUtil;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvRegistry;
-import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PlspId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.db.version.tlv.LspDbVersion;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.LspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.lsp.Tlvs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.lsp.TlvsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.RsvpErrorSpec;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ObjectHeader;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.vendor.information.tlvs.VendorInformationTlv;
-
-/**
- * Parser for {@link Lsp}
- */
-@Deprecated
-public class Stateful02LspObjectParser extends AbstractObjectWithTlvsParser<TlvsBuilder> {
-
-    public static final int CLASS = 32;
-
-    public static final int TYPE = 1;
-
-    /*
-     * first 4b are restricted
-     */
-    private static final int DELEGATE_FLAG_OFFSET = 15;
-    private static final int SYNC_FLAG_OFFSET = 14;
-    private static final int OPERATIONAL_FLAG_OFFSET = 13;
-    private static final int REMOVE_FLAG_OFFSET = 12;
-
-    private static final int ONE_B_OFFSET = 12;
-    private static final int TWO_B_OFFSET = 4;
-
-    private static final int FLAGS_SIZE = 2;
-
-    public Stateful02LspObjectParser(final TlvRegistry tlvReg, final VendorInformationTlvRegistry viTlvReg) {
-        super(tlvReg, viTlvReg);
-    }
-
-    @Override
-    public Lsp parseObject(final ObjectHeader header, final ByteBuf bytes) throws PCEPDeserializerException {
-        Preconditions.checkArgument(bytes != null && bytes.isReadable(), "Array of bytes is mandatory. Can't be null or empty.");
-        final LspBuilder builder = new LspBuilder();
-        builder.setIgnore(header.isIgnore());
-        builder.setProcessingRule(header.isProcessingRule());
-        final int[] plspIdRaw = { bytes.readUnsignedByte(), bytes.readUnsignedByte(), bytes.getUnsignedByte(2) };
-        builder.setPlspId(new PlspId((long) ((plspIdRaw[0] << ONE_B_OFFSET) | (plspIdRaw[1] << TWO_B_OFFSET) | (plspIdRaw[2] >> TWO_B_OFFSET))));
-        final BitSet flags = ByteArray.bytesToBitSet(ByteArray.readBytes(bytes, FLAGS_SIZE));
-        builder.setDelegate(flags.get(DELEGATE_FLAG_OFFSET));
-        builder.setSync(flags.get(SYNC_FLAG_OFFSET));
-        builder.setRemove(flags.get(REMOVE_FLAG_OFFSET));
-        builder.setOperational(flags.get(OPERATIONAL_FLAG_OFFSET));
-        final TlvsBuilder b = new TlvsBuilder();
-        parseTlvs(b, bytes.slice());
-        builder.setTlvs(b.build());
-        return builder.build();
-    }
-
-    @Override
-    public void addTlv(final TlvsBuilder builder, final Tlv tlv) {
-        if (tlv instanceof RsvpErrorSpec) {
-            builder.setRsvpErrorSpec((RsvpErrorSpec) tlv);
-        } else if (tlv instanceof SymbolicPathName) {
-            builder.setSymbolicPathName((SymbolicPathName) tlv);
-        } else if (tlv instanceof LspDbVersion) {
-            builder.setLspDbVersion((LspDbVersion) tlv);
-        }
-    }
-
-    @Override
-    public void serializeObject(final Object object, final ByteBuf buffer) {
-        Preconditions.checkArgument(object instanceof Lsp, "Wrong instance of PCEPObject. Passed %s. Needed LspObject.", object.getClass());
-        final Lsp specObj = (Lsp) object;
-        final ByteBuf body = Unpooled.buffer();
-        final PlspId plsp = specObj.getPlspId();
-        Preconditions.checkArgument(plsp != null, "PLSP-ID not present");
-        writeMedium(plsp.getValue().intValue() << TWO_B_OFFSET, body);
-
-        final BitSet flags = new BitSet(2 * Byte.SIZE);
-        if (specObj.isDelegate() != null) {
-            flags.set(DELEGATE_FLAG_OFFSET, specObj.isDelegate());
-        }
-        if (specObj.isRemove() != null) {
-            flags.set(REMOVE_FLAG_OFFSET, specObj.isRemove());
-        }
-        if (specObj.isSync() != null) {
-            flags.set(SYNC_FLAG_OFFSET, specObj.isSync());
-        }
-        if (specObj.isOperational() != null) {
-            flags.set(OPERATIONAL_FLAG_OFFSET, specObj.isOperational());
-        }
-        body.writeByte(ByteArray.bitSetToBytes(flags, FLAGS_SIZE)[1]);
-        serializeTlvs(specObj.getTlvs(), body);
-        ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), body, buffer);
-    }
-
-    public void serializeTlvs(final Tlvs tlvs, final ByteBuf body) {
-        if (tlvs == null) {
-            return;
-        }
-        if (tlvs.getRsvpErrorSpec() != null) {
-            serializeTlv(tlvs.getRsvpErrorSpec(), body);
-        }
-        if (tlvs.getSymbolicPathName() != null) {
-            serializeTlv(tlvs.getSymbolicPathName(), body);
-        }
-        if (tlvs.getLspDbVersion() != null) {
-            serializeTlv(tlvs.getLspDbVersion(), body);
-        }
-        serializeVendorInformationTlvs(tlvs.getVendorInformationTlv(), body);
-    }
-
-    @Override
-    protected final void addVendorInformationTlvs(final TlvsBuilder builder, final List<VendorInformationTlv> tlvs) {
-        if (!tlvs.isEmpty()) {
-            builder.setVendorInformationTlv(tlvs);
-        }
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspSymbolicNameTlvParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspSymbolicNameTlvParser.java
deleted file mode 100644 (file)
index 2b7442f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import com.google.common.base.Preconditions;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvParser;
-import org.opendaylight.protocol.pcep.spi.TlvSerializer;
-import org.opendaylight.protocol.pcep.spi.TlvUtil;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathNameBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-
-/**
- * Parser for {@link SymbolicPathName}
- */
-@Deprecated
-public final class Stateful02LspSymbolicNameTlvParser implements TlvParser, TlvSerializer {
-
-    public static final int TYPE = 17;
-
-    @Override
-    public SymbolicPathName parseTlv(final ByteBuf buffer) throws PCEPDeserializerException {
-        if (buffer == null) {
-            return null;
-        }
-        return new SymbolicPathNameBuilder().setPathName(
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.SymbolicPathName(ByteArray.readAllBytes(buffer))).build();
-    }
-
-    @Override
-    public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
-        Preconditions.checkArgument(tlv instanceof SymbolicPathName, "SymbolicPathNameTlv is mandatory.");
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.SymbolicPathName spn = ((SymbolicPathName) tlv).getPathName();
-        Preconditions.checkArgument(spn != null, "SymbolicPathName is mandatory");
-        TlvUtil.formatTlv(TYPE, Unpooled.copiedBuffer(spn.getValue()), buffer);
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspaObjectParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02LspaObjectParser.java
deleted file mode 100644 (file)
index 1d0ea8f..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import io.netty.buffer.ByteBuf;
-import org.opendaylight.protocol.pcep.impl.object.PCEPLspaObjectParser;
-import org.opendaylight.protocol.pcep.spi.TlvRegistry;
-import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.lspa.Tlvs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.lspa.TlvsBuilder;
-
-/**
- * Parser for LSPA object
- */
-@Deprecated
-public class Stateful02LspaObjectParser extends PCEPLspaObjectParser {
-
-    public Stateful02LspaObjectParser(final TlvRegistry tlvReg, final VendorInformationTlvRegistry viTlvReg) {
-        super(tlvReg, viTlvReg);
-    }
-
-    @Override
-    public void addTlv(final TlvsBuilder tbuilder, final Tlv tlv) {
-        super.addTlv(tbuilder, tlv);
-        final Tlvs2Builder nameBuilder = new Tlvs2Builder();
-        if (tbuilder.getAugmentation(Tlvs2.class) != null) {
-            final Tlvs2 t = tbuilder.getAugmentation(Tlvs2.class);
-            if (t.getSymbolicPathName() != null) {
-                nameBuilder.setSymbolicPathName(t.getSymbolicPathName());
-            }
-        }
-        if (tlv instanceof SymbolicPathName) {
-            nameBuilder.setSymbolicPathName((SymbolicPathName) tlv);
-        }
-        tbuilder.addAugmentation(Tlvs2.class, nameBuilder.build());
-    }
-
-    @Override
-    public void serializeTlvs(final Tlvs tlvs, final ByteBuf body) {
-        if (tlvs == null) {
-            return;
-        }
-        super.serializeTlvs(tlvs, body);
-        if (tlvs.getAugmentation(Tlvs2.class) != null) {
-            final Tlvs2 nameTlvs = tlvs.getAugmentation(Tlvs2.class);
-            if (nameTlvs.getSymbolicPathName() != null) {
-                serializeTlv(nameTlvs.getSymbolicPathName(), body);
-            }
-        }
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02NodeIdentifierTlvParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02NodeIdentifierTlvParser.java
deleted file mode 100644 (file)
index afe280e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import com.google.common.base.Preconditions;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvParser;
-import org.opendaylight.protocol.pcep.spi.TlvSerializer;
-import org.opendaylight.protocol.pcep.spi.TlvUtil;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.NodeIdentifier;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.node.identifier.tlv.NodeIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-
-@Deprecated
-public final class Stateful02NodeIdentifierTlvParser implements TlvParser, TlvSerializer {
-
-    public static final int TYPE = 24;
-
-    @Override
-    public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
-        Preconditions.checkArgument(tlv instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.node.identifier.tlv.NodeIdentifier, "NodeIdentifierTlv is mandatory.");
-        TlvUtil.formatTlv(TYPE, Unpooled.copiedBuffer(((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.node.identifier.tlv.NodeIdentifier) tlv).getNodeId().getValue()), buffer);
-    }
-
-    @Override
-    public Tlv parseTlv(final ByteBuf buffer) throws PCEPDeserializerException {
-        if (buffer == null) {
-            return null;
-        }
-        return new NodeIdentifierBuilder().setNodeId(new NodeIdentifier(ByteArray.readAllBytes(buffer))).build();
-    }
-}
\ No newline at end of file
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02OpenObjectParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02OpenObjectParser.java
deleted file mode 100644 (file)
index b5d3ab6..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import io.netty.buffer.ByteBuf;
-import org.opendaylight.protocol.pcep.impl.object.PCEPOpenObjectParser;
-import org.opendaylight.protocol.pcep.spi.TlvRegistry;
-import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.node.identifier.tlv.NodeIdentifier;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.TlvsBuilder;
-
-/**
- * Parser for Open Object
- */
-@Deprecated
-public class Stateful02OpenObjectParser extends PCEPOpenObjectParser {
-
-    public Stateful02OpenObjectParser(final TlvRegistry tlvReg, final VendorInformationTlvRegistry viTlvReg) {
-        super(tlvReg, viTlvReg);
-    }
-
-    @Override
-    public void addTlv(final TlvsBuilder tbuilder, final Tlv tlv) {
-        super.addTlv(tbuilder, tlv);
-        final Tlvs2Builder statefulBuilder = new Tlvs2Builder();
-        if (tbuilder.getAugmentation(Tlvs2.class) != null) {
-            final Tlvs2 t = tbuilder.getAugmentation(Tlvs2.class);
-            if (t.getStateful() != null) {
-                statefulBuilder.setStateful(t.getStateful());
-            }
-            if (t.getNodeIdentifier() != null) {
-                statefulBuilder.setNodeIdentifier(t.getNodeIdentifier());
-            }
-        }
-        if (tlv instanceof Stateful) {
-            statefulBuilder.setStateful((Stateful) tlv);
-        } else if (tlv instanceof NodeIdentifier) {
-            statefulBuilder.setNodeIdentifier((NodeIdentifier) tlv);
-        }
-        tbuilder.addAugmentation(Tlvs2.class, statefulBuilder.build());
-    }
-
-    @Override
-    public void serializeTlvs(final Tlvs tlvs, final ByteBuf body) {
-        if (tlvs == null) {
-            return;
-        }
-        super.serializeTlvs(tlvs, body);
-        if (tlvs.getAugmentation(Tlvs2.class) != null) {
-            final Tlvs2 statefulTlvs = tlvs.getAugmentation(Tlvs2.class);
-            if (statefulTlvs.getStateful() != null) {
-                serializeTlv(statefulTlvs.getStateful(), body);
-            }
-            if (statefulTlvs.getNodeIdentifier() != null) {
-                serializeTlv(statefulTlvs.getNodeIdentifier(), body);
-            }
-        }
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCReplyMessageParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCReplyMessageParser.java
deleted file mode 100644 (file)
index cfdf213..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.util.List;
-import org.opendaylight.protocol.pcep.impl.message.PCEPReplyMessageParser;
-import org.opendaylight.protocol.pcep.spi.MessageUtil;
-import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
-import org.opendaylight.protocol.pcep.spi.PCEPErrors;
-import org.opendaylight.protocol.pcep.spi.VendorInformationObjectRegistry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Replies1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Replies1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Pcrep;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Ero;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.Metrics;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.Replies;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.RepliesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.Result;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.FailureCase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.FailureCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.SuccessCase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.SuccessCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure._case.NoPath;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.success._case.SuccessBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.success._case.success.Paths;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.success._case.success.PathsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.Rp;
-
-/**
- * Parser for {@link Pcrep}
- */
-@Deprecated
-public final class Stateful02PCReplyMessageParser extends PCEPReplyMessageParser {
-
-    public Stateful02PCReplyMessageParser(final ObjectRegistry registry, final VendorInformationObjectRegistry viReg) {
-        super(registry, viReg);
-    }
-
-    @Override
-    public void serializeMessage(final Message message, final ByteBuf out) {
-        Preconditions.checkArgument(message instanceof Pcrep, "Wrong instance of Message. Passed instance of %s. Need Pcrep.", message.getClass());
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.PcrepMessage repMsg = ((Pcrep) message).getPcrepMessage();
-        Preconditions.checkArgument(repMsg.getReplies() != null && !repMsg.getReplies().isEmpty(), "Replies cannot be null or empty.");
-        final ByteBuf buffer = Unpooled.buffer();
-        for (final Replies reply : repMsg.getReplies()) {
-            Preconditions.checkArgument(reply.getRp() != null, "Reply must contain RP object.");
-            serializeObject(reply.getRp(), buffer);
-            if (reply.getAugmentation(Replies1.class) != null && reply.getAugmentation(Replies1.class).getLsp() != null) {
-                serializeObject(reply.getAugmentation(Replies1.class).getLsp(), buffer);
-            }
-            if (reply.getResult() != null) {
-                if (reply.getResult() instanceof FailureCase) {
-                    final FailureCase f = ((FailureCase) reply.getResult());
-                    serializeObject(f.getNoPath(), buffer);
-                    serializeObject(f.getLspa(), buffer);
-                    serializeObject(f.getBandwidth(), buffer);
-                    if (f.getMetrics() != null && !f.getMetrics().isEmpty()) {
-                        for (final Metrics m : f.getMetrics()) {
-                            serializeObject(m.getMetric(), buffer);
-                        }
-                    }
-                    serializeObject(f.getIro(), buffer);
-                } else {
-                    final SuccessCase s = (SuccessCase) reply.getResult();
-                    for (final Paths p : s.getSuccess().getPaths()) {
-                        serializeObject(p.getEro(), buffer);
-                        serializeObject(p.getLspa(), buffer);
-                        serializeObject(p.getOf(), buffer);
-                        serializeObject(p.getBandwidth(), buffer);
-                        if (p.getMetrics() != null && !p.getMetrics().isEmpty()) {
-                            for (final Metrics m : p.getMetrics()) {
-                                serializeObject(m.getMetric(), buffer);
-                            }
-                        }
-                        serializeObject(p.getIro(), buffer);
-                    }
-                }
-            }
-        }
-        MessageUtil.formatMessage(TYPE, buffer, out);
-    }
-
-    @Override
-    protected Replies getValidReply(final List<Object> objects, final List<Message> errors) {
-        if (!(objects.get(0) instanceof Rp)) {
-            errors.add(createErrorMsg(PCEPErrors.RP_MISSING, Optional.<Rp>absent()));
-            return null;
-        }
-        final Rp rp = (Rp) objects.get(0);
-        objects.remove(0);
-        Result res = null;
-        Lsp lsp = null;
-        if (objects.get(0) instanceof Lsp) {
-            lsp = (Lsp) objects.get(0);
-            objects.remove(0);
-        }
-        if (!objects.isEmpty()) {
-            if (objects.get(0) instanceof NoPath) {
-                final NoPath noPath = (NoPath) objects.get(0);
-                objects.remove(0);
-                final FailureCaseBuilder builder = new FailureCaseBuilder();
-                builder.setNoPath(noPath);
-                while (!objects.isEmpty()) {
-                    parseAttributes(builder, objects);
-                }
-                res = builder.build();
-            } else if (objects.get(0) instanceof Ero) {
-                final Ero ero = (Ero) objects.get(0);
-                objects.remove(0);
-                final SuccessBuilder builder = new SuccessBuilder();
-                final List<Paths> paths = Lists.newArrayList();
-                final PathsBuilder pBuilder = new PathsBuilder();
-                pBuilder.setEro(ero);
-                while (!objects.isEmpty()) {
-                    parsePath(pBuilder, objects);
-                    paths.add(pBuilder.build());
-                }
-                builder.setPaths(paths);
-                res = new SuccessCaseBuilder().setSuccess(builder.build()).build();
-            }
-        }
-        return new RepliesBuilder().setRp(rp).addAugmentation(Replies1.class, new Replies1Builder().setLsp(lsp).build()).setResult(res).build();
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCReportMessageParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCReportMessageParser.java
deleted file mode 100644 (file)
index 09fac37..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.util.List;
-import org.opendaylight.protocol.pcep.spi.AbstractMessageParser;
-import org.opendaylight.protocol.pcep.spi.MessageUtil;
-import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.PCEPErrors;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Pcrpt;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PcrptBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.PcrptMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.Reports;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.ReportsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.reports.Path;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.reports.PathBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.Bandwidth;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Ero;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.Iro;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.Metrics;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.MetricsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.metric.object.Metric;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.Rp;
-
-/**
- * Parser for {@link Pcrpt}
- */
-@Deprecated
-public final class Stateful02PCReportMessageParser extends AbstractMessageParser {
-
-    public static final int TYPE = 10;
-
-    public Stateful02PCReportMessageParser(final ObjectRegistry registry) {
-        super(registry);
-    }
-
-    @Override
-    public void serializeMessage(final Message message, final ByteBuf out) {
-        Preconditions.checkArgument(message instanceof Pcrpt, "Wrong instance of Message. Passed instance of %s. Need Pcrpt.", message.getClass());
-        final Pcrpt msg = (Pcrpt) message;
-        final List<Reports> reports = msg.getPcrptMessage().getReports();
-        final ByteBuf buffer = Unpooled.buffer();
-        for (final Reports report : reports) {
-            serializeObject(report.getLsp(), buffer);
-            final Path p = report.getPath();
-            if (p != null) {
-                serializeObject(p.getEro(), buffer);
-                serializeObject(p.getLspa(), buffer);
-                serializeObject(p.getBandwidth(), buffer);
-                if (p.getMetrics() != null && !p.getMetrics().isEmpty()) {
-                    for (final Metrics m : p.getMetrics()) {
-                        serializeObject(m.getMetric(), buffer);
-                    }
-                }
-                serializeObject(p.getIro(), buffer);
-            }
-        }
-        MessageUtil.formatMessage(TYPE, buffer, out);
-    }
-
-    @Override
-    public Message validate(final List<Object> objects, final List<Message> errors) throws PCEPDeserializerException {
-        Preconditions.checkArgument(objects != null, "Passed list can't be null.");
-        if (objects.isEmpty()) {
-            throw new PCEPDeserializerException("Pcrpt message cannot be empty.");
-        }
-
-        final List<Reports> reports = Lists.newArrayList();
-
-        while (!objects.isEmpty()) {
-            final Reports report = getValidReports(objects, errors);
-            if (reports != null) {
-                reports.add(report);
-            }
-        }
-        return new PcrptBuilder().setPcrptMessage(new PcrptMessageBuilder().setReports(reports).build()).build();
-    }
-
-    private Reports getValidReports(final List<Object> objects, final List<Message> errors) {
-        final ReportsBuilder builder = new ReportsBuilder();
-        if (objects.get(0) instanceof Lsp) {
-            builder.setLsp((Lsp) objects.get(0));
-            objects.remove(0);
-        } else {
-            errors.add(createErrorMsg(PCEPErrors.LSP_MISSING, Optional.<Rp>absent()));
-            return null;
-        }
-        if (!objects.isEmpty()) {
-            final PathBuilder pBuilder = new PathBuilder();
-            parsePath(objects, pBuilder);
-            builder.setPath(pBuilder.build());
-        }
-        return builder.build();
-    }
-
-    private void parsePath(final List<Object> objects, final PathBuilder builder) {
-        final List<Metrics> pathMetrics = Lists.newArrayList();
-        Object obj;
-        State state = State.Init;
-        while (!objects.isEmpty() && !state.equals(State.End)) {
-            obj = objects.get(0);
-            switch (state) {
-            case Init:
-                state = State.EroIn;
-                if (obj instanceof Ero) {
-                    builder.setEro((Ero) obj);
-                    break;
-                }
-            case EroIn:
-                state = State.LspaIn;
-                if (obj instanceof Lspa) {
-                    builder.setLspa((Lspa) obj);
-                    break;
-                }
-            case LspaIn:
-                state = State.BandwidthIn;
-                if (obj instanceof Bandwidth) {
-                    builder.setBandwidth((Bandwidth) obj);
-                    break;
-                }
-            case BandwidthIn:
-                state = State.MetricIn;
-                if (obj instanceof Metric) {
-                    pathMetrics.add(new MetricsBuilder().setMetric((Metric) obj).build());
-                    state = State.BandwidthIn;
-                    break;
-                }
-            case MetricIn:
-                state = State.IroIn;
-                if (obj instanceof Iro) {
-                    builder.setIro((Iro) obj);
-                    break;
-                }
-            case IroIn:
-                state = State.End;
-                break;
-            case End:
-                break;
-            }
-            if (!state.equals(State.End)) {
-                objects.remove(0);
-            }
-        }
-        if (!pathMetrics.isEmpty()) {
-            builder.setMetrics(pathMetrics);
-        }
-    }
-
-    private enum State {
-        Init, EroIn, LspaIn, BandwidthIn, MetricIn, IroIn, End
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCRequestMessageParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCRequestMessageParser.java
deleted file mode 100644 (file)
index 11dcc27..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.Lists;
-import io.netty.buffer.ByteBuf;
-import java.util.List;
-import org.opendaylight.protocol.pcep.impl.message.PCEPRequestMessageParser;
-import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
-import org.opendaylight.protocol.pcep.spi.PCEPErrors;
-import org.opendaylight.protocol.pcep.spi.VendorInformationObjectRegistry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.P2p1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.P2p1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.Bandwidth;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.classtype.object.ClassType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.exclude.route.object.Xro;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.Iro;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.load.balancing.object.LoadBalancing;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.Metrics;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.MetricsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.metric.object.Metric;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.of.object.Of;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.requests.SegmentComputation;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.requests.SegmentComputationBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.requests.segment.computation.P2p;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.requests.segment.computation.P2pBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.requests.segment.computation.p2p.ReportedRoute;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.requests.segment.computation.p2p.ReportedRouteBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.reported.route.object.Rro;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.Rp;
-
-/**
- * Parser for Pcreq
- */
-@Deprecated
-public final class Stateful02PCRequestMessageParser extends PCEPRequestMessageParser {
-
-    public Stateful02PCRequestMessageParser(final ObjectRegistry registry, final VendorInformationObjectRegistry viReg) {
-        super(registry, viReg);
-    }
-
-    @Override
-    protected void serializeP2P(final ByteBuf buffer, final P2p p2p) {
-        serializeObject(p2p.getEndpointsObj(), buffer);
-        if (p2p.getAugmentation(P2p1.class) != null) {
-            serializeObject(p2p.getAugmentation(P2p1.class).getLsp(), buffer);
-        }
-        final ReportedRoute rr = p2p.getReportedRoute();
-        if (rr != null) {
-            serializeObject(rr.getRro(), buffer);
-            serializeObject(rr.getBandwidth(), buffer);
-        }
-        serializeObject(p2p.getLoadBalancing(), buffer);
-        serializeObject(p2p.getLspa(), buffer);
-        serializeObject(p2p.getBandwidth(), buffer);
-        if (p2p.getMetrics() != null) {
-            for (final Metrics m : p2p.getMetrics()) {
-                serializeObject(m.getMetric(), buffer);
-            }
-        }
-        serializeObject(p2p.getIro(), buffer);
-        serializeObject(p2p.getRro(), buffer);
-        serializeObject(p2p.getXro(), buffer);
-        serializeObject(p2p.getOf(), buffer);
-        serializeObject(p2p.getClassType(), buffer);
-    }
-
-    @Override
-    protected SegmentComputation getSegmentComputation(final P2pBuilder builder, final List<Object> objects, final List<Message> errors,
-            final Rp rp) {
-        final List<Metrics> metrics = Lists.newArrayList();
-
-        State state = State.Init;
-        while (!objects.isEmpty() && state != State.End) {
-            Object obj = objects.get(0);
-
-            switch (state) {
-            case Init:
-                state = State.LspIn;
-                if (obj instanceof Lsp) {
-                    builder.addAugmentation(P2p1.class, new P2p1Builder().setLsp((Lsp) obj).build());
-                    break;
-                }
-            case LspIn:
-                state = State.ReportedIn;
-                if (obj instanceof Rro) {
-                    final ReportedRouteBuilder rrBuilder = new ReportedRouteBuilder();
-                    rrBuilder.setRro((Rro) obj);
-                    objects.remove(0);
-                    obj = objects.get(0);
-                    if (obj instanceof Bandwidth) {
-                        rrBuilder.setBandwidth((Bandwidth) obj);
-                    }
-                    break;
-                }
-            case ReportedIn:
-                state = State.LoadBIn;
-                if (obj instanceof LoadBalancing) {
-                    builder.setLoadBalancing((LoadBalancing) obj);
-                    break;
-                }
-            case LoadBIn:
-                state = State.LspaIn;
-                if (obj instanceof Lspa) {
-                    builder.setLspa((Lspa) obj);
-                    break;
-                }
-            case LspaIn:
-                state = State.BandwidthIn;
-                if (obj instanceof Bandwidth) {
-                    builder.setBandwidth((Bandwidth) obj);
-                    break;
-                }
-            case BandwidthIn:
-                state = State.MetricIn;
-                if (obj instanceof Metric) {
-                    metrics.add(new MetricsBuilder().setMetric((Metric) obj).build());
-                    state = State.BandwidthIn;
-                    break;
-                }
-            case MetricIn:
-                state = State.IroIn;
-                if (obj instanceof Iro) {
-                    builder.setIro((Iro) obj);
-                    break;
-                }
-            case IroIn:
-                state = State.RroIn;
-                if (obj instanceof Rro) {
-                    builder.setRro((Rro) obj);
-                    break;
-                }
-            case RroIn:
-                state = State.XroIn;
-                if (obj instanceof Xro) {
-                    builder.setXro((Xro) obj);
-                    break;
-                }
-            case XroIn:
-                state = State.OfIn;
-                if (obj instanceof Of) {
-                    builder.setOf((Of) obj);
-                    break;
-                }
-            case OfIn:
-                state = State.CtIn;
-                if (obj instanceof ClassType) {
-                    final ClassType classType = (ClassType) obj;
-                    if (!classType.isProcessingRule()) {
-                        errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.of(rp)));
-                    } else {
-                        builder.setClassType(classType);
-                    }
-                    break;
-                }
-            case CtIn:
-                state = State.End;
-                break;
-            case End:
-                break;
-            }
-            if (!state.equals(State.End)) {
-                objects.remove(0);
-            }
-        }
-        if (!metrics.isEmpty()) {
-            builder.setMetrics(metrics);
-        }
-
-        if (rp.isReoptimization()
-                && builder.getBandwidth() != null
-                && !builder.getReportedRoute().getBandwidth().getBandwidth().equals(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.Bandwidth(new byte[] { 0 }))
-                && builder.getReportedRoute().getRro() == null) {
-            errors.add(createErrorMsg(PCEPErrors.RRO_MISSING, Optional.of(rp)));
-            return null;
-        }
-        return new SegmentComputationBuilder().setP2p(builder.build()).build();
-    }
-
-    private enum State {
-        Init, LspIn, ReportedIn, LoadBIn, LspaIn, BandwidthIn, MetricIn, IroIn, RroIn, XroIn, OfIn, CtIn, End
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCUpdateRequestMessageParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02PCUpdateRequestMessageParser.java
deleted file mode 100644 (file)
index e792949..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.util.List;
-import org.opendaylight.protocol.pcep.spi.AbstractMessageParser;
-import org.opendaylight.protocol.pcep.spi.MessageUtil;
-import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.PCEPErrors;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Pcupd;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PcupdBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.PcupdMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.Updates;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.UpdatesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.updates.Path;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.updates.PathBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.Bandwidth;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Ero;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.Iro;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.Metrics;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.MetricsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.metric.object.Metric;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.Rp;
-
-/**
- * Parser for {@link Pcupd}
- */
-@Deprecated
-public final class Stateful02PCUpdateRequestMessageParser extends AbstractMessageParser {
-
-    public static final int TYPE = 11;
-
-    public Stateful02PCUpdateRequestMessageParser(final ObjectRegistry registry) {
-        super(registry);
-    }
-
-    @Override
-    public void serializeMessage(final Message message, final ByteBuf out) {
-        Preconditions.checkArgument(message instanceof Pcupd, "Wrong instance of Message. Passed instance of %s. Need Pcupd.", message.getClass());
-        final Pcupd msg = (Pcupd) message;
-        final List<Updates> updates = msg.getPcupdMessage().getUpdates();
-        final ByteBuf buffer = Unpooled.buffer();
-        for (final Updates update : updates) {
-            serializeObject(update.getLsp(), buffer);
-            final Path p = update.getPath();
-            if (p != null) {
-                serializeObject(p.getEro(), buffer);
-                serializeObject(p.getLspa(), buffer);
-                serializeObject(p.getBandwidth(), buffer);
-                if (p.getMetrics() != null && !p.getMetrics().isEmpty()) {
-                    for (final Metrics m : p.getMetrics()) {
-                        serializeObject(m.getMetric(), buffer);
-                    }
-                }
-                serializeObject(p.getIro(), buffer);
-            }
-        }
-        MessageUtil.formatMessage(TYPE, buffer, out);
-    }
-
-    @Override
-    protected Message validate(final List<Object> objects, final List<Message> errors) throws PCEPDeserializerException {
-        Preconditions.checkArgument(objects != null, "Passed list can't be null.");
-        if (objects.isEmpty()) {
-            throw new PCEPDeserializerException("Pcup message cannot be empty.");
-        }
-
-        final List<Updates> updateRequests = Lists.newArrayList();
-
-        while (!objects.isEmpty()) {
-            final Updates update = getValidUpdates(objects, errors);
-            if (update != null) {
-                updateRequests.add(update);
-            }
-        }
-        if (!objects.isEmpty()) {
-            throw new PCEPDeserializerException("Unprocessed Objects: " + objects);
-        }
-        return new PcupdBuilder().setPcupdMessage(new PcupdMessageBuilder().setUpdates(updateRequests).build()).build();
-    }
-
-    private Updates getValidUpdates(final List<Object> objects, final List<Message> errors) {
-        final UpdatesBuilder builder = new UpdatesBuilder();
-        if (objects.get(0) instanceof Lsp) {
-            builder.setLsp((Lsp) objects.get(0));
-            objects.remove(0);
-        } else {
-            errors.add(createErrorMsg(PCEPErrors.LSP_MISSING, Optional.<Rp>absent()));
-            return null;
-        }
-        if (!objects.isEmpty()) {
-            final PathBuilder pBuilder = new PathBuilder();
-            if (objects.get(0) instanceof Ero) {
-                pBuilder.setEro((Ero) objects.get(0));
-                objects.remove(0);
-            } else {
-                errors.add(createErrorMsg(PCEPErrors.ERO_MISSING, Optional.<Rp>absent()));
-                return null;
-            }
-            parsePath(objects, pBuilder);
-            builder.setPath(pBuilder.build());
-        }
-        return builder.build();
-    }
-
-    private void parsePath(final List<Object> objects, final PathBuilder pBuilder) {
-        final List<Metrics> pathMetrics = Lists.newArrayList();
-        Object obj;
-        State state = State.Init;
-        while (!objects.isEmpty() && !state.equals(State.End)) {
-            obj = objects.get(0);
-            switch (state) {
-            case Init:
-                state = State.LspaIn;
-                if (obj instanceof Lspa) {
-                    pBuilder.setLspa((Lspa) obj);
-                    break;
-                }
-            case LspaIn:
-                state = State.BandwidthIn;
-                if (obj instanceof Bandwidth) {
-                    pBuilder.setBandwidth((Bandwidth) obj);
-                    break;
-                }
-            case BandwidthIn:
-                state = State.MetricIn;
-                if (obj instanceof Metric) {
-                    pathMetrics.add(new MetricsBuilder().setMetric((Metric) obj).build());
-                    state = State.BandwidthIn;
-                    break;
-                }
-            case MetricIn:
-                state = State.IroIn;
-                if (obj instanceof Iro) {
-                    pBuilder.setIro((Iro) obj);
-                    break;
-                }
-            case IroIn:
-                state = State.End;
-                break;
-            case End:
-                break;
-            }
-            if (!state.equals(State.End)) {
-                objects.remove(0);
-            }
-        }
-        if (!pathMetrics.isEmpty()) {
-            pBuilder.setMetrics(pathMetrics);
-        }
-    }
-
-    private enum State {
-        Init, LspaIn, BandwidthIn, MetricIn, IroIn, End
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02RSVPErrorSpecTlvParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02RSVPErrorSpecTlvParser.java
deleted file mode 100644 (file)
index c39d591..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeBitSet;
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv4Address;
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv6Address;
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedShort;
-
-import com.google.common.base.Preconditions;
-import com.google.common.primitives.UnsignedBytes;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.util.BitSet;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvParser;
-import org.opendaylight.protocol.pcep.spi.TlvSerializer;
-import org.opendaylight.protocol.pcep.spi.TlvUtil;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.protocol.util.Ipv4Util;
-import org.opendaylight.protocol.util.Ipv6Util;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.RsvpErrorSpec;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.RsvpErrorSpecBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.rsvp.error.spec.RsvpError;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.rsvp.error.spec.RsvpErrorBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.ErrorSpec.Flags;
-
-/**
- * Parser for {@link RsvpErrorSpec}
- */
-@Deprecated
-public final class Stateful02RSVPErrorSpecTlvParser implements TlvParser, TlvSerializer {
-
-    public static final int TYPE = 21;
-
-    private static final int FLAGS_F_LENGTH = 1;
-
-    private static final int IN_PLACE_FLAG_OFFSET = 7;
-    private static final int NOT_GUILTY_FLAGS_OFFSET = 6;
-
-    private static final int V4_RSVP_LENGTH = 8;
-    private static final int V6_RSVP_LENGTH = 20;
-
-    @Override
-    public RsvpErrorSpec parseTlv(final ByteBuf buffer) throws PCEPDeserializerException {
-        if (buffer == null) {
-            return null;
-        }
-        final RsvpErrorBuilder builder = new RsvpErrorBuilder();
-        if (buffer.readableBytes() == V4_RSVP_LENGTH) {
-            builder.setNode(new IpAddress(Ipv4Util.addressForByteBuf(buffer)));
-        } else if (buffer.readableBytes() == V6_RSVP_LENGTH) {
-            builder.setNode(new IpAddress(Ipv6Util.addressForByteBuf(buffer)));
-        }
-        final BitSet flags = ByteArray.bytesToBitSet(ByteArray.readBytes(buffer, FLAGS_F_LENGTH));
-        builder.setFlags(new Flags(flags.get(IN_PLACE_FLAG_OFFSET), flags.get(NOT_GUILTY_FLAGS_OFFSET)));
-        final short errorCode = (short) UnsignedBytes.toInt(buffer.readByte());
-        builder.setCode(errorCode);
-        final int errorValue = buffer.readUnsignedShort();
-        builder.setValue(errorValue);
-        return new RsvpErrorSpecBuilder().setRsvpError(builder.build()).build();
-    }
-
-    @Override
-    public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
-        Preconditions.checkArgument(tlv instanceof RsvpErrorSpec, "RSVPErrorSpecTlv is mandatory.");
-        final RsvpErrorSpec rsvpTlv = (RsvpErrorSpec) tlv;
-        final RsvpError rsvp = rsvpTlv.getRsvpError();
-        final ByteBuf body = Unpooled.buffer();
-        final BitSet flags = new BitSet(FLAGS_F_LENGTH * Byte.SIZE);
-        final Flags f = rsvp.getFlags();
-        if (f.isInPlace() != null) {
-            flags.set(IN_PLACE_FLAG_OFFSET, f.isInPlace());
-        }
-        if (f.isNotGuilty() != null) {
-            flags.set(NOT_GUILTY_FLAGS_OFFSET, f.isNotGuilty());
-        }
-        final IpAddress node = rsvp.getNode();
-        Preconditions.checkArgument(node != null, "Node is mandatory.");
-        if (node.getIpv4Address() != null) {
-            writeIpv4Address(node.getIpv4Address(), body);
-        } else {
-            writeIpv6Address(node.getIpv6Address(), body);
-        }
-        writeBitSet(flags, FLAGS_F_LENGTH, body);
-        Preconditions.checkArgument(rsvp.getCode() != null, "Code is mandatory.");
-        writeUnsignedByte(rsvp.getCode(), body);
-        Preconditions.checkArgument(rsvp.getValue() != null, "Value is mandatory.");
-        writeUnsignedShort(rsvp.getValue(), body);
-        TlvUtil.formatTlv(TYPE, body, buffer);
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02SessionProposalFactory.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02SessionProposalFactory.java
deleted file mode 100644 (file)
index 1ca8861..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import java.net.InetSocketAddress;
-import org.opendaylight.protocol.pcep.impl.BasePCEPSessionProposalFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.lsp.cleanup.tlv.LspCleanupBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.StatefulBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.TlvsBuilder;
-
-@Deprecated
-public class Stateful02SessionProposalFactory extends BasePCEPSessionProposalFactory {
-
-    private final boolean stateful, active, instant;
-
-    private final long timeout;
-
-    public Stateful02SessionProposalFactory(final int deadTimer, final int keepAlive, final boolean stateful, final boolean active,
-            final boolean instant, final int timeout) {
-        super(deadTimer, keepAlive);
-        this.stateful = stateful;
-        this.active = active;
-        this.instant = instant;
-        this.timeout = timeout;
-    }
-
-    @Override
-    protected void addTlvs(final InetSocketAddress address, final TlvsBuilder builder) {
-        if (Stateful02SessionProposalFactory.this.stateful) {
-            builder.addAugmentation(
-                    Tlvs2.class,
-                    new Tlvs2Builder().setStateful(
-                            new StatefulBuilder().setLspUpdateCapability(this.active).addAugmentation(Stateful1.class,
-                                    new Stateful1Builder().setInitiation(this.instant).build()).build()).build()).build();
-            builder.addAugmentation(Tlvs1.class,
-                    new Tlvs1Builder().setLspCleanup(new LspCleanupBuilder().setTimeout(this.timeout).build()).build());
-        }
-    }
-
-    public boolean isStateful() {
-        return this.stateful;
-    }
-
-    public boolean isActive() {
-        return this.active;
-    }
-
-    public boolean isInstant() {
-        return this.instant;
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02StatefulCapabilityTlvParser.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/Stateful02StatefulCapabilityTlvParser.java
deleted file mode 100644 (file)
index ba1c04b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeBitSet;
-
-import com.google.common.base.Preconditions;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.util.BitSet;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvParser;
-import org.opendaylight.protocol.pcep.spi.TlvSerializer;
-import org.opendaylight.protocol.pcep.spi.TlvUtil;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.StatefulBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-
-@Deprecated
-public class Stateful02StatefulCapabilityTlvParser implements TlvParser, TlvSerializer {
-
-    public static final int TYPE = 16;
-
-    protected static final int FLAGS_F_LENGTH = 4;
-
-    protected static final int S_FLAG_OFFSET = 30;
-    protected static final int U_FLAG_OFFSET = 31;
-
-    @Override
-    public Stateful parseTlv(final ByteBuf buffer) throws PCEPDeserializerException {
-        if (buffer == null) {
-            return null;
-        }
-        if (buffer.readableBytes() < FLAGS_F_LENGTH) {
-            throw new PCEPDeserializerException("Wrong length of array of bytes. Passed: " + buffer.readableBytes() + "; Expected: >= "
-                    + FLAGS_F_LENGTH + ".");
-        }
-        final BitSet flags = ByteArray.bytesToBitSet(ByteArray.readBytes(buffer, FLAGS_F_LENGTH));
-        final StatefulBuilder sb = new StatefulBuilder();
-        sb.setIncludeDbVersion(flags.get(S_FLAG_OFFSET));
-        sb.setLspUpdateCapability(flags.get(U_FLAG_OFFSET));
-        return sb.build();
-    }
-
-    @Override
-    public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
-        Preconditions.checkArgument(tlv instanceof Stateful, "StatefulCapabilityTlv is mandatory.");
-        final Stateful sct = (Stateful) tlv;
-        final ByteBuf body = Unpooled.buffer();
-        final BitSet flags = new BitSet(FLAGS_F_LENGTH * Byte.SIZE);
-        if (sct.isLspUpdateCapability() != null) {
-            flags.set(U_FLAG_OFFSET, sct.isLspUpdateCapability());
-        }
-        if (sct.isIncludeDbVersion() != null) {
-            flags.set(S_FLAG_OFFSET, sct.isIncludeDbVersion());
-        }
-        writeBitSet(flags, FLAGS_F_LENGTH, body);
-        TlvUtil.formatTlv(TYPE, body, buffer);
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/StatefulActivator.java b/pcep/ietf-stateful02/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful02/StatefulActivator.java
deleted file mode 100644 (file)
index fba9980..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf.stateful02;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
-import org.opendaylight.protocol.pcep.spi.pojo.AbstractPCEPExtensionProviderActivator;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Pcrpt;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Pcupd;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.db.version.tlv.LspDbVersion;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.node.identifier.tlv.NodeIdentifier;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.RsvpErrorSpec;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Pcrep;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Pcreq;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
-
-@Deprecated
-public class StatefulActivator extends AbstractPCEPExtensionProviderActivator {
-    @Override
-    protected List<AutoCloseable> startImpl(final PCEPExtensionProviderContext context) {
-        final List<AutoCloseable> regs = new ArrayList<>();
-
-        regs.add(context.registerMessageParser(Stateful02PCUpdateRequestMessageParser.TYPE,
-                new Stateful02PCUpdateRequestMessageParser(context.getObjectHandlerRegistry())));
-        regs.add(context.registerMessageSerializer(Pcupd.class,
-                new Stateful02PCUpdateRequestMessageParser(context.getObjectHandlerRegistry())));
-
-        regs.add(context.registerMessageParser(Stateful02PCReportMessageParser.TYPE,
-                new Stateful02PCReportMessageParser(context.getObjectHandlerRegistry())));
-        regs.add(context.registerMessageSerializer(Pcrpt.class, new Stateful02PCReportMessageParser(context.getObjectHandlerRegistry())));
-
-        regs.add(context.registerMessageParser(Stateful02PCReplyMessageParser.TYPE,
-                new Stateful02PCReplyMessageParser(context.getObjectHandlerRegistry(), context.getVendorInformationObjectRegistry())));
-        regs.add(context.registerMessageSerializer(Pcrep.class, new Stateful02PCReplyMessageParser(context.getObjectHandlerRegistry(),
-                context.getVendorInformationObjectRegistry())));
-
-        regs.add(context.registerMessageParser(Stateful02PCRequestMessageParser.TYPE,
-                new Stateful02PCRequestMessageParser(context.getObjectHandlerRegistry(),
-                        context.getVendorInformationObjectRegistry())));
-        regs.add(context.registerMessageSerializer(Pcreq.class, new Stateful02PCRequestMessageParser(context.getObjectHandlerRegistry(),
-                context.getVendorInformationObjectRegistry())));
-
-        regs.add(context.registerObjectParser(Stateful02LspObjectParser.CLASS, Stateful02LspObjectParser.TYPE,
-                new Stateful02LspObjectParser(context.getTlvHandlerRegistry(), context.getVendorInformationTlvRegistry())));
-        regs.add(context.registerObjectSerializer(Lsp.class, new Stateful02LspObjectParser(context.getTlvHandlerRegistry(),
-                context.getVendorInformationTlvRegistry())));
-
-        regs.add(context.registerObjectParser(Stateful02OpenObjectParser.CLASS, Stateful02OpenObjectParser.TYPE,
-                new Stateful02OpenObjectParser(context.getTlvHandlerRegistry(), context.getVendorInformationTlvRegistry())));
-        regs.add(context.registerObjectSerializer(Open.class, new Stateful02OpenObjectParser(context.getTlvHandlerRegistry(),
-                context.getVendorInformationTlvRegistry())));
-
-        regs.add(context.registerObjectParser(Stateful02LspaObjectParser.CLASS, Stateful02LspaObjectParser.TYPE,
-                new Stateful02LspaObjectParser(context.getTlvHandlerRegistry(),
-                        context.getVendorInformationTlvRegistry())));
-        regs.add(context.registerObjectSerializer(Lspa.class, new Stateful02LspaObjectParser(context.getTlvHandlerRegistry(),
-                context.getVendorInformationTlvRegistry())));
-
-        regs.add(context.registerTlvParser(Stateful02StatefulCapabilityTlvParser.TYPE, new Stateful02StatefulCapabilityTlvParser()));
-        regs.add(context.registerTlvSerializer(Stateful.class, new Stateful02StatefulCapabilityTlvParser()));
-
-        regs.add(context.registerTlvParser(Stateful02LspDbVersionTlvParser.TYPE, new Stateful02LspDbVersionTlvParser()));
-        regs.add(context.registerTlvSerializer(LspDbVersion.class, new Stateful02LspDbVersionTlvParser()));
-
-        regs.add(context.registerTlvParser(Stateful02NodeIdentifierTlvParser.TYPE, new Stateful02NodeIdentifierTlvParser()));
-        regs.add(context.registerTlvSerializer(NodeIdentifier.class, new Stateful02NodeIdentifierTlvParser()));
-
-        regs.add(context.registerTlvParser(Stateful02LspSymbolicNameTlvParser.TYPE, new Stateful02LspSymbolicNameTlvParser()));
-        regs.add(context.registerTlvSerializer(SymbolicPathName.class, new Stateful02LspSymbolicNameTlvParser()));
-
-        regs.add(context.registerTlvParser(Stateful02RSVPErrorSpecTlvParser.TYPE, new Stateful02RSVPErrorSpecTlvParser()));
-        regs.add(context.registerTlvSerializer(RsvpErrorSpec.class, new Stateful02RSVPErrorSpecTlvParser()));
-
-        return regs;
-    }
-}
diff --git a/pcep/ietf-stateful02/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator b/pcep/ietf-stateful02/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator
deleted file mode 100644 (file)
index 431e633..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-org.opendaylight.protocol.pcep.ietf.stateful02.StatefulActivator
-org.opendaylight.protocol.pcep.crabbe.initiated00.InitiatedActivator
diff --git a/pcep/ietf-stateful02/src/main/yang/odl-pcep-crabbe-initiated00.yang b/pcep/ietf-stateful02/src/main/yang/odl-pcep-crabbe-initiated00.yang
deleted file mode 100644 (file)
index de5de53..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-module odl-pcep-crabbe-initiated00 {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:pcep:crabbe:initiated:00";
-    prefix "initiated00";
-
-    import pcep-types { prefix pcep; revision-date 2013-10-05; }
-    import pcep-message { prefix msg; revision-date 2013-10-07; }
-    import network-topology { prefix nt; revision-date 2013-10-21; }
-    import network-topology-pcep { prefix topo; revision-date 2013-10-24; }
-    import odl-pcep-ietf-stateful02 { prefix stateful; revision-date 2014-01-10 ;}
-
-    organization "Cisco Systems, Inc.";
-    contact "Dana Kutenicsova <dkutenic@cisco.com>";
-
-    description
-        "This module contains the data model of PCEP extensions defined
-        in draft-crabbe-pce-pce-initiated-lsp-00.
-
-        Copyright (c)2014 Cisco Systems, Inc. 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";
-
-    revision "2014-01-13" {
-        description
-            "Initial revision.";
-        reference "https://tools.ietf.org/html/draft-crabbe-pce-pce-initiated-lsp-00";
-    }
-
-    grouping pcinitiate-message {
-        uses pcep:message;
-
-        container pcinitiate-message {
-            description "LSP Initiate Message";
-            reference "http://tools.ietf.org/html/draft-crabbe-pce-pce-initiated-lsp-00#section-5.1";
-
-            uses pcep:message-header;
-
-            list requests {
-                uses pcep:endpoints-object;
-
-                uses pcep:explicit-route-object;
-
-                uses pcep:lsp-attributes;
-            }
-        }
-    }
-
-    grouping lsp-cleanup-tlv {
-        description "LSP Cleanup TLV";
-        reference "http://tools.ietf.org/html/draft-crabbe-pce-pce-initiated-lsp-00#section-6.2.1";
-        container lsp-cleanup {
-            uses pcep:tlv;
-            leaf timeout {
-                type uint32 {
-                    range 0..4294967295;
-                }
-                mandatory true;
-            }
-        }
-    }
-
-    grouping initiated-capability-tlv {
-        leaf initiation {
-            type boolean;
-            default false;
-        }
-    }
-
-    augment "/msg:open/msg:open-message/msg:open/msg:tlvs" {
-        uses lsp-cleanup-tlv;
-    }
-
-    augment "/msg:open/msg:open-message/msg:open/msg:tlvs/stateful:stateful" {
-        uses initiated-capability-tlv;
-    }
-
-    augment "/pcinitiate/pcinitiate-message/requests/lspa/tlvs" {
-        uses stateful:symbolic-path-name-tlv;
-    }
-
-    notification pcinitiate {
-        uses pcinitiate-message;
-    }
-
-    augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:stateful-tlv/stateful:stateful" {
-        uses initiated-capability-tlv;
-    }
-}
-
diff --git a/pcep/ietf-stateful02/src/main/yang/odl-pcep-ietf-stateful02-cfg.yang b/pcep/ietf-stateful02/src/main/yang/odl-pcep-ietf-stateful02-cfg.yang
deleted file mode 100644 (file)
index eb9de85..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-// vi: set smarttab et sw=4 tabstop=4:
-module odl-pcep-ietf-stateful02-cfg {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:stateful02:cfg";
-    prefix "pcep-stateful02";
-
-    import config { prefix config; revision-date 2013-04-05; }
-    import odl-pcep-api-cfg { prefix pcep; revision-date 2013-04-09; }
-    import odl-pcep-spi-cfg { prefix spi; revision-date 2013-11-15; }
-
-    organization "Cisco Systems, Inc.";
-
-    contact "Robert Varga <rovarga@cisco.com>";
-
-    description
-        "This module contains the base YANG definitions for
-         draft-ietf-pce-stateful-pce-02 extensions.
-
-        Copyright (c)2013 Cisco Systems, Inc. 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";
-
-    revision "2014-02-21" {
-        description
-            "Updated revision dates for imports.";
-    }
-
-    identity pcep-session-proposal-factory-stateful02 {
-        base config:module-type;
-        config:java-name-prefix "Stateful02PCEPSessionProposalFactory";
-        config:provided-service pcep:pcep-session-proposal-factory;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case pcep-session-proposal-factory-stateful02 {
-            when "/config:modules/config:module/config:type = 'pcep-session-proposal-factory-stateful02'";
-
-            leaf dead-timer-value {
-                type uint8;
-                default 120;
-            }
-
-            leaf keep-alive-timer-value {
-                type uint8;
-                default 30;
-            }
-
-            leaf initiated {
-                type boolean;
-                default true;
-            }
-
-            leaf stateful {
-                type boolean;
-                default true;
-            }
-
-            leaf active {
-                type boolean;
-                default true;
-            }
-
-            leaf timeout {
-                type uint16;
-                default 180;
-            }
-        }
-    }
-
-    identity pcep-parser-ietf-stateful02 {
-        base config:module-type;
-        config:provided-service spi:extension;
-        config:java-name-prefix IetfStateful02PCEPParser;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case pcep-parser-ietf-stateful02 {
-            when "/config:modules/config:module/config:type = 'pcep-parser-ietf-stateful02'";
-        }
-    }
-
-    identity pcep-parser-crabbe-initiated00 {
-        base config:module-type;
-        config:provided-service spi:extension;
-        config:java-name-prefix CrabbeInitiated00PCEPParser;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case pcep-parser-crabbe-initiated00 {
-            when "/config:modules/config:module/config:type = 'pcep-parser-crabbe-initiated00'";
-        }
-    }
-}
-
diff --git a/pcep/ietf-stateful02/src/main/yang/odl-pcep-ietf-stateful02.yang b/pcep/ietf-stateful02/src/main/yang/odl-pcep-ietf-stateful02.yang
deleted file mode 100644 (file)
index 6f65494..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-module odl-pcep-ietf-stateful02 {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:pcep:crabbe:stateful:02";
-    prefix "stateful02";
-
-    import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
-    import pcep-types { prefix pcep; revision-date 2013-10-05; }
-    import pcep-message { prefix msg; revision-date 2013-10-07; }
-    import rsvp { prefix rsvp; revision-date 2013-08-20; }
-    import network-topology { prefix nt; revision-date 2013-10-21; }
-    import network-topology-pcep { prefix topo; revision-date 2013-10-24; }
-    import topology-tunnel { prefix tt; revision-date 2013-08-19; }
-    import topology-tunnel-pcep { prefix tun; revision-date 2013-08-20; }
-    import topology-tunnel-pcep-programming { prefix ttpp; revision-date 2013-10-30; }
-
-    organization "Cisco Systems, Inc.";
-    contact "Dana Kutenicsova <dkutenic@cisco.com>";
-
-    description
-        "This module contains the data model of PCEP extensions defined
-        in draft-ietf-pce-stateful-pce.
-
-        Copyright (c)2014 Cisco Systems, Inc. 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";
-
-    revision "2014-01-10" {
-        description
-            "Initial revision.";
-        reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02";
-    }
-
-    typedef plsp-id {
-        type uint32 {
-            range 0..1048576;
-        }
-    }
-
-    typedef symbolic-path-name {
-        type binary {
-            length 1..65535;
-        }
-    }
-
-    typedef node-identifier {
-        type binary {
-            length 1..65535;
-        }
-    }
-
-    grouping lsp-db-version-tlv {
-        description "LSP State Database Version TLV";
-        reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-7.2.3";
-
-        container lsp-db-version {
-            uses pcep:tlv;
-            leaf version {
-                type uint64;
-                mandatory true;
-            }
-        }
-    }
-
-    grouping node-identifier-tlv {
-        description "Node Identifier TLV";
-        reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-7.1.3";
-
-        container node-identifier {
-            uses pcep:tlv;
-            leaf node-id {
-                type node-identifier;
-                mandatory true;
-            }
-        }
-    }
-
-    grouping rsvp-error-spec-tlv {
-        description "RSVP Error Spec TLV";
-        reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-7.2.2";
-        container rsvp-error-spec {
-            uses pcep:tlv;
-            container rsvp-error {
-                uses rsvp:error-spec;
-            }
-        }
-    }
-
-    grouping stateful-capability-tlv {
-        description "Stateful PCE Capability TLV";
-        reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-7.1.1";
-
-        container stateful {
-            uses pcep:tlv;
-
-            leaf lsp-update-capability {
-                type boolean;
-                default false;
-            }
-            leaf include-db-version {
-                type boolean;
-                default false;
-            }
-        }
-    }
-
-    grouping symbolic-path-name-tlv {
-        description "Symbolic Path Name TLV";
-        reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-7.2.1";
-        container symbolic-path-name {
-            uses pcep:tlv;
-            leaf path-name {
-                type symbolic-path-name;
-                mandatory true;
-            }
-        }
-    }
-
-    grouping lsp-object {
-        description "LSP Object";
-        reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-7.2";
-
-        container lsp {
-            uses pcep:object;
-            container "tlvs" {
-                uses lsp-db-version-tlv;
-
-                uses rsvp-error-spec-tlv;
-
-                uses symbolic-path-name-tlv;
-
-                uses pcep:vendor-information-tlvs;
-            }
-
-            leaf plsp-id {
-                type plsp-id;
-                mandatory true;
-            }
-
-            leaf delegate {
-                type boolean;
-                default false;
-            }
-
-            leaf sync {
-                type boolean;
-                default false;
-            }
-
-            leaf remove {
-                type boolean;
-                default false;
-            }
-
-            leaf operational {
-                type boolean;
-                default false;
-            }
-        }
-    }
-
-    grouping pcupd-message {
-        uses pcep:message;
-
-        container pcupd-message {
-            description "State Update Request Message";
-            reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-6.2";
-
-            uses pcep:message-header;
-
-            list updates {
-                uses lsp-object;
-
-                container path {
-                    uses pcep:path-definition;
-                }
-            }
-        }
-    }
-
-    grouping pcrpt-message {
-        uses pcep:message;
-
-        container pcrpt-message {
-            description "State Report Message";
-            reference "http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-6.1";
-
-            uses pcep:message-header;
-
-            list reports {
-                uses lsp-object;
-
-                container path {
-                    uses pcep:path-definition;
-                }
-            }
-        }
-    }
-
-    notification pcupd {
-        uses pcupd-message;
-    }
-
-    notification pcrpt {
-        uses pcrpt-message;
-    }
-
-    augment "/msg:open/msg:open-message/msg:open/msg:tlvs" {
-        uses stateful-capability-tlv;
-
-        uses node-identifier-tlv;
-    }
-
-    augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" {
-        uses stateful-capability-tlv;
-
-        uses node-identifier-tlv;
-    }
-
-    augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2p" {
-        uses lsp-object;
-    }
-
-    augment "/msg:pcrep/msg:pcrep-message/msg:replies" {
-        uses lsp-object;
-    }
-
-    augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2p/msg:lspa/msg:tlvs" {
-        uses symbolic-path-name-tlv;
-    }
-
-    augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:reported-lsp" {
-        uses lsp-object;
-    }
-
-    augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:stateful-tlv" {
-        uses stateful-capability-tlv;
-    }
-
-    augment "/topo:ensure-lsp-operational/topo:input/topo:arguments" {
-        leaf operational {
-            type boolean;
-        }
-    }
-
-    augment "/topo:update-lsp/topo:input/topo:arguments" {
-        leaf operational {
-            type boolean;
-        }
-    }
-
-    typedef administrative-status {
-        type enumeration {
-            enum active;
-            enum inactive;
-        }
-        reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-02#section-7.2";
-    }
-
-    grouping cfg-attributes {
-        leaf administrative-status {
-            type administrative-status;
-        }
-    }
-
-    grouping oper-attributes {
-        leaf operational-status {
-            type boolean;
-            config false;
-        }
-    }
-
-    augment "/nt:network-topology/nt:topology/nt:link" {
-        when "../../tunnel-types/pcep-tunnel";
-
-        uses cfg-attributes;
-        uses oper-attributes;
-    }
-
-    augment "/nt:network-topology/nt:topology/tt:paths" {
-        when "../../tunnel-types/pcep-tunnel";
-
-        uses cfg-attributes;
-        uses oper-attributes;
-    }
-
-    augment "/ttpp:pcep-create-p2p-tunnel/ttpp:input" {
-        uses cfg-attributes;
-    }
-
-    augment "/ttpp:pcep-update-tunnel/ttpp:input" {
-        uses cfg-attributes;
-    }
-}
diff --git a/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/CrabbeInitiated00PCEPParserModuleTest.java b/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/CrabbeInitiated00PCEPParserModuleTest.java
deleted file mode 100644 (file)
index d3d8bb7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf;
-
-import com.google.common.collect.Lists;
-import javax.management.ObjectName;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.controller.config.api.jmx.CommitStatus;
-import org.opendaylight.controller.config.manager.impl.AbstractConfigTest;
-import org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver;
-import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
-import org.opendaylight.controller.config.yang.pcep.spi.SimplePCEPExtensionProviderContextModuleFactory;
-import org.opendaylight.controller.config.yang.pcep.spi.SimplePCEPExtensionProviderContextModuleTest;
-import org.opendaylight.controller.config.yang.pcep.stateful02.cfg.CrabbeInitiated00PCEPParserModuleFactory;
-
-public class CrabbeInitiated00PCEPParserModuleTest extends AbstractConfigTest {
-
-    private static final String FACTORY_NAME = CrabbeInitiated00PCEPParserModuleFactory.NAME;
-    private static final String INSTANCE_NAME = "pcep-parser-crabbe-initiated00-instance";
-
-    @Before
-    public void setUp() {
-        super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext, new CrabbeInitiated00PCEPParserModuleFactory(), new SimplePCEPExtensionProviderContextModuleFactory()));
-    }
-
-    @Test
-    public void testCreateBean() throws Exception {
-        CommitStatus status = createCrabbeInitiated00PCEPParserModuleInstance();
-        assertBeanCount(1, FACTORY_NAME);
-        assertStatus(status, 2, 0, 0);
-    }
-
-    @Test
-    public void testReusingOldInstance() throws Exception {
-        createCrabbeInitiated00PCEPParserModuleInstance();
-        ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
-        assertBeanCount(1, FACTORY_NAME);
-        CommitStatus status = transaction.commit();
-        assertBeanCount(1, FACTORY_NAME);
-        assertStatus(status, 0, 0, 2);
-    }
-
-    private CommitStatus createCrabbeInitiated00PCEPParserModuleInstance() throws Exception {
-        final ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
-        final ObjectName baseParserON = transaction.createModule(FACTORY_NAME, INSTANCE_NAME);
-
-        SimplePCEPExtensionProviderContextModuleTest.createPCEPExtensionsModuleInstance(transaction, Lists.newArrayList(baseParserON));
-        return transaction.commit();
-    }
-
-}
diff --git a/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/IetfStateful02PCEPParserModuleTest.java b/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/IetfStateful02PCEPParserModuleTest.java
deleted file mode 100644 (file)
index 5cf7b5f..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf;
-
-import com.google.common.collect.Lists;
-import javax.management.ObjectName;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.controller.config.api.jmx.CommitStatus;
-import org.opendaylight.controller.config.manager.impl.AbstractConfigTest;
-import org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver;
-import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
-import org.opendaylight.controller.config.yang.pcep.spi.SimplePCEPExtensionProviderContextModuleFactory;
-import org.opendaylight.controller.config.yang.pcep.spi.SimplePCEPExtensionProviderContextModuleTest;
-import org.opendaylight.controller.config.yang.pcep.stateful02.cfg.IetfStateful02PCEPParserModuleFactory;
-
-public class IetfStateful02PCEPParserModuleTest extends AbstractConfigTest {
-
-    private static final String FACTORY_NAME = IetfStateful02PCEPParserModuleFactory.NAME;
-    private static final String INSTANCE_NAME = "pcep-parser-ietf-stateful02-instance";
-
-    @Before
-    public void setUp() {
-        super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext, new IetfStateful02PCEPParserModuleFactory(), new SimplePCEPExtensionProviderContextModuleFactory()));
-    }
-
-    @Test
-    public void testCreateBean() throws Exception {
-        CommitStatus status = createStateful02PCEPParserModuleInstance();
-        assertBeanCount(1, FACTORY_NAME);
-        assertStatus(status, 2, 0, 0);
-    }
-
-    @Test
-    public void testReusingOldInstance() throws Exception {
-        createStateful02PCEPParserModuleInstance();
-        ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
-        assertBeanCount(1, FACTORY_NAME);
-        CommitStatus status = transaction.commit();
-        assertBeanCount(1, FACTORY_NAME);
-        assertStatus(status, 0, 0, 2);
-    }
-
-    private CommitStatus createStateful02PCEPParserModuleInstance() throws Exception {
-        final ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
-        final ObjectName baseParserON = transaction.createModule(FACTORY_NAME, INSTANCE_NAME);
-
-        SimplePCEPExtensionProviderContextModuleTest.createPCEPExtensionsModuleInstance(transaction, Lists.newArrayList(baseParserON));
-        return transaction.commit();
-    }
-
-}
diff --git a/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPMessageTest.java b/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPMessageTest.java
deleted file mode 100644 (file)
index 2efb63d..0000000
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-
-import com.google.common.collect.Lists;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.protocol.pcep.crabbe.initiated00.InitiatedActivator;
-import org.opendaylight.protocol.pcep.crabbe.initiated00.PcinitiateMessageParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02PCReplyMessageParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02PCReportMessageParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02PCRequestMessageParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02PCUpdateRequestMessageParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.StatefulActivator;
-import org.opendaylight.protocol.pcep.impl.Activator;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.pojo.SimplePCEPExtensionProviderContext;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ieee754.rev130819.Float32;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.PcinitiateBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.PcinitiateMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.pcinitiate.message.Requests;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.pcinitiate.message.RequestsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.P2p1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.P2p1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PcrptBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PcupdBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PlspId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Replies1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Replies1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.LspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.lsp.TlvsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.PcrptMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.Reports;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.ReportsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.reports.PathBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.PcupdMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.Updates;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.UpdatesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.PcrepBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.PcreqBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ClassType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.OfId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.RequestId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.Bandwidth;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.BandwidthBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.classtype.object.ClassTypeBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.address.family.Ipv4CaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.address.family.ipv4._case.Ipv4Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.object.EndpointsObj;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.object.EndpointsObjBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Ero;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.EroBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.Iro;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.IroBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.iro.Subobject;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.iro.SubobjectBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.load.balancing.object.LoadBalancingBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.Metrics;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.attributes.MetricsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.LspaBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.metric.object.MetricBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.of.object.OfBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.PcrepMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.Replies;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.RepliesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.FailureCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.SuccessCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure._case.NoPathBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.success._case.SuccessBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.success._case.success.Paths;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.success._case.success.PathsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.PcreqMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.requests.SegmentComputationBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.requests.segment.computation.P2pBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.reported.route.object.RroBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.Rp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.RpBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.AttributeFilter;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.AsNumberCase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.AsNumberCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.as.number._case.AsNumberBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.record.route.subobjects.subobject.type.IpPrefixCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.record.route.subobjects.subobject.type.ip.prefix._case.IpPrefixBuilder;
-
-public class PCEPMessageTest {
-
-    private Lspa lspa;
-    private Metrics metrics;
-    private Ero ero;
-    private EndpointsObj endpoints;
-    private AsNumberCase eroASSubobject;
-    private Activator act;
-    private Lsp lsp;
-    private Rp rpTrue;
-    private Iro iro;
-    private Bandwidth bandwidth;
-
-    private SimplePCEPExtensionProviderContext ctx;
-
-    @Before
-    public void setUp() throws Exception {
-        this.ctx = new SimplePCEPExtensionProviderContext();
-        this.act = new Activator();
-        this.act.start(this.ctx);
-
-        final LspaBuilder lspaBuilder = new LspaBuilder();
-        lspaBuilder.setProcessingRule(false);
-        lspaBuilder.setIgnore(false);
-        lspaBuilder.setLocalProtectionDesired(false);
-        lspaBuilder.setHoldPriority((short) 0);
-        lspaBuilder.setSetupPriority((short) 0);
-        lspaBuilder.setExcludeAny(new AttributeFilter(0L));
-        lspaBuilder.setIncludeAll(new AttributeFilter(0L));
-        lspaBuilder.setIncludeAny(new AttributeFilter(0L));
-        lspaBuilder.setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.lspa.TlvsBuilder().build());
-        this.lspa = lspaBuilder.build();
-
-        final LspBuilder lspBuilder = new LspBuilder();
-        lspBuilder.setIgnore(false);
-        lspBuilder.setProcessingRule(false);
-        lspBuilder.setDelegate(false);
-        lspBuilder.setPlspId(new PlspId(0L));
-        lspBuilder.setOperational(false);
-        lspBuilder.setSync(false);
-        lspBuilder.setRemove(false);
-        lspBuilder.setTlvs(new TlvsBuilder().build());
-        this.lsp = lspBuilder.build();
-
-        final MetricBuilder mBuilder = new MetricBuilder();
-        mBuilder.setIgnore(false);
-        mBuilder.setProcessingRule(false);
-        mBuilder.setComputed(false);
-        mBuilder.setBound(false);
-        mBuilder.setMetricType((short) 1);
-        mBuilder.setValue(new Float32(new byte[4]));
-        this.metrics = new MetricsBuilder().setMetric(mBuilder.build()).build();
-
-        this.eroASSubobject = new AsNumberCaseBuilder().setAsNumber(
-                new AsNumberBuilder().setAsNumber(
-                        new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber(0xFFFFL)).build()).build();
-
-        final EroBuilder eroBuilder = new EroBuilder();
-        eroBuilder.setIgnore(false);
-        eroBuilder.setProcessingRule(false);
-        final List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.ero.Subobject> eroSubs = Lists.newArrayList();
-        eroSubs.add(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.ero.SubobjectBuilder().setSubobjectType(
-                this.eroASSubobject).setLoose(true).build());
-        eroBuilder.setSubobject(eroSubs);
-        this.ero = eroBuilder.build();
-
-        final Ipv4Builder afi = new Ipv4Builder();
-        afi.setSourceIpv4Address(new Ipv4Address("162.245.17.14"));
-        afi.setDestinationIpv4Address(new Ipv4Address("255.255.255.255"));
-
-        final EndpointsObjBuilder epBuilder = new EndpointsObjBuilder();
-        epBuilder.setIgnore(false);
-        epBuilder.setProcessingRule(true);
-        epBuilder.setAddressFamily(new Ipv4CaseBuilder().setIpv4(afi.build()).build());
-        this.endpoints = epBuilder.build();
-
-        final RpBuilder rpBuilder = new RpBuilder();
-        rpBuilder.setProcessingRule(true);
-        rpBuilder.setIgnore(false);
-        rpBuilder.setReoptimization(false);
-        rpBuilder.setBiDirectional(false);
-        rpBuilder.setLoose(true);
-        rpBuilder.setMakeBeforeBreak(false);
-        rpBuilder.setOrder(false);
-        rpBuilder.setPathKey(false);
-        rpBuilder.setSupplyOf(false);
-        rpBuilder.setFragmentation(false);
-        rpBuilder.setP2mp(false);
-        rpBuilder.setEroCompression(false);
-        rpBuilder.setPriority((short) 1);
-        rpBuilder.setRequestId(new RequestId(10L));
-        rpBuilder.setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.rp.TlvsBuilder().build());
-        this.rpTrue = rpBuilder.build();
-
-        final IroBuilder iroBuilder = new IroBuilder();
-        iroBuilder.setIgnore(false);
-        iroBuilder.setProcessingRule(false);
-        final List<Subobject> iroSubs = Lists.newArrayList();
-        iroSubs.add(new SubobjectBuilder().setSubobjectType(this.eroASSubobject).build());
-        iroBuilder.setSubobject(iroSubs);
-        this.iro = iroBuilder.build();
-
-        this.bandwidth = new BandwidthBuilder().setIgnore(false).setProcessingRule(false).setBandwidth(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.Bandwidth(new byte[] {0x00, 0x00, 0x00, 0x00})).build();
-    }
-
-    @Test
-    public void testPcinitMsg() throws IOException, PCEPDeserializerException {
-        try (InitiatedActivator a = new InitiatedActivator()) {
-            a.start(this.ctx);
-            final ByteBuf result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/Pcinit.bin"));
-
-            final PcinitiateMessageParser parser = new PcinitiateMessageParser(this.ctx.getObjectHandlerRegistry());
-
-            final PcinitiateMessageBuilder builder = new PcinitiateMessageBuilder();
-            final RequestsBuilder rBuilder = new RequestsBuilder();
-
-            final List<Requests> reqs = Lists.newArrayList();
-            rBuilder.setEndpointsObj(this.endpoints);
-            rBuilder.setLspa(this.lspa);
-            rBuilder.setEro(this.ero);
-            rBuilder.setMetrics(Lists.newArrayList(this.metrics));
-            reqs.add(rBuilder.build());
-            builder.setRequests(reqs);
-
-            assertEquals(new PcinitiateBuilder().setPcinitiateMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                    result.readableBytes() - 4), Collections.<Message> emptyList()));
-            final ByteBuf buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcinitiateBuilder().setPcinitiateMessage(builder.build()).build(), buf);
-            assertArrayEquals(result.array(), buf.array());
-        }
-    }
-
-    @Test
-    public void testUpdMsg() throws IOException, PCEPDeserializerException {
-        try (StatefulActivator a = new StatefulActivator()) {
-            a.start(this.ctx);
-            ByteBuf result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCUpd.2.bin"));
-
-            final Stateful02PCUpdateRequestMessageParser parser = new Stateful02PCUpdateRequestMessageParser(this.ctx.getObjectHandlerRegistry());
-
-            final PcupdMessageBuilder builder = new PcupdMessageBuilder();
-
-            final List<Updates> updates = Lists.newArrayList();
-            org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.updates.PathBuilder pBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.updates.PathBuilder();
-            pBuilder.setEro(this.ero);
-            pBuilder.setLspa(this.lspa);
-            pBuilder.setIro(this.iro);
-            pBuilder.setMetrics(Lists.newArrayList(this.metrics));
-            pBuilder.setBandwidth(this.bandwidth);
-            updates.add(new UpdatesBuilder().setLsp(this.lsp).setPath(pBuilder.build()).build());
-            builder.setUpdates(updates);
-
-            assertEquals(new PcupdBuilder().setPcupdMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                    result.readableBytes() - 4), Collections.<Message> emptyList()));
-            ByteBuf buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcupdBuilder().setPcupdMessage(builder.build()).build(), buf);
-            assertArrayEquals(result.array(), buf.array());
-
-            result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCUpd.5.bin"));
-
-            final List<Updates> updates1 = Lists.newArrayList();
-            final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.updates.PathBuilder pBuilder1 = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.updates.PathBuilder();
-            pBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.updates.PathBuilder();
-            pBuilder.setEro(this.ero);
-            pBuilder.setLspa(this.lspa);
-            pBuilder1.setEro(this.ero);
-            pBuilder1.setLspa(this.lspa);
-            updates1.add(new UpdatesBuilder().setLsp(this.lsp).setPath(pBuilder.build()).build());
-            updates1.add(new UpdatesBuilder().setLsp(this.lsp).setPath(pBuilder1.build()).build());
-            builder.setUpdates(updates1);
-
-            assertEquals(new PcupdBuilder().setPcupdMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                    result.readableBytes() - 4), Collections.<Message> emptyList()));
-            buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcupdBuilder().setPcupdMessage(builder.build()).build(), buf);
-            assertArrayEquals(result.array(), buf.array());
-        }
-    }
-
-    @Test
-    public void testRptMsg() throws IOException, PCEPDeserializerException {
-        try (StatefulActivator a = new StatefulActivator()) {
-            a.start(this.ctx);
-            ByteBuf result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCRpt.1.bin"));
-
-            final Stateful02PCReportMessageParser parser = new Stateful02PCReportMessageParser(this.ctx.getObjectHandlerRegistry());
-
-            final PcrptMessageBuilder builder = new PcrptMessageBuilder();
-
-            final List<Reports> reports = Lists.newArrayList();
-            reports.add(new ReportsBuilder().setLsp(this.lsp).build());
-            builder.setReports(reports);
-
-            assertEquals(new PcrptBuilder().setPcrptMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                    result.readableBytes() - 4), Collections.<Message> emptyList()));
-            ByteBuf buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcrptBuilder().setPcrptMessage(builder.build()).build(), buf);
-            assertArrayEquals(result.array(), buf.array());
-
-            result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCRpt.2.bin"));
-
-            final List<Reports> reports1 = Lists.newArrayList();
-            reports1.add(new ReportsBuilder().setLsp(this.lsp).setPath(new PathBuilder().setEro(this.ero).setLspa(this.lspa).build()).build());
-            builder.setReports(reports1);
-
-            assertEquals(new PcrptBuilder().setPcrptMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                    result.readableBytes() - 4), Collections.<Message> emptyList()));
-            buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcrptBuilder().setPcrptMessage(builder.build()).build(), buf);
-            assertArrayEquals(result.array(), buf.array());
-
-            result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCRpt.3.bin"));
-
-            final List<Reports> reports2 = Lists.newArrayList();
-            final PathBuilder pBuilder = new PathBuilder();
-            pBuilder.setEro(this.ero);
-            pBuilder.setLspa(this.lspa);
-            pBuilder.setMetrics(Lists.newArrayList(this.metrics, this.metrics));
-            reports2.add(new ReportsBuilder().setLsp(this.lsp).setPath(pBuilder.build()).build());
-            builder.setReports(reports2);
-
-            assertEquals(new PcrptBuilder().setPcrptMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                    result.readableBytes() - 4), Collections.<Message> emptyList()));
-            buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcrptBuilder().setPcrptMessage(builder.build()).build(), buf);
-            assertArrayEquals(result.array(), buf.array());
-
-            result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCRpt.5.bin"));
-
-            final List<Reports> reports3 = Lists.newArrayList();
-            final PathBuilder pBuilder1 = new PathBuilder();
-            pBuilder1.setEro(this.ero);
-            pBuilder1.setLspa(this.lspa);
-            pBuilder1.setMetrics(Lists.newArrayList(this.metrics, this.metrics));
-            reports3.add(new ReportsBuilder().setLsp(this.lsp).setPath(pBuilder.build()).build());
-            reports3.add(new ReportsBuilder().setLsp(this.lsp).setPath(pBuilder1.build()).build());
-            builder.setReports(reports3);
-
-            assertEquals(new PcrptBuilder().setPcrptMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                    result.readableBytes() - 4), Collections.<Message> emptyList()));
-            buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcrptBuilder().setPcrptMessage(builder.build()).build(), buf);
-            assertArrayEquals(result.array(), buf.array());
-        }
-    }
-
-    @Test
-    public void testPcReqMsg() throws PCEPDeserializerException, IOException {
-        try (StatefulActivator a = new StatefulActivator()) {
-            a.start(this.ctx);
-
-            final OfBuilder ofBuilder = new OfBuilder();
-            ofBuilder.setIgnore(false);
-            ofBuilder.setProcessingRule(false);
-            ofBuilder.setCode(new OfId(0));
-            ofBuilder.setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.of.object.of.TlvsBuilder().build());
-
-            final RroBuilder rroBuilder = new RroBuilder();
-            rroBuilder.setSubobject(Lists.newArrayList(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.reported.route.object.rro.SubobjectBuilder().setProtectionAvailable(false).setProtectionInUse(false).setSubobjectType(new IpPrefixCaseBuilder().setIpPrefix(new IpPrefixBuilder().setIpPrefix(new IpPrefix(new Ipv4Prefix("127.1.0.0/32"))).build()).build()).build()));
-            rroBuilder.setIgnore(false);
-            rroBuilder.setProcessingRule(false);
-
-            final Stateful02PCRequestMessageParser parser = new Stateful02PCRequestMessageParser(this.ctx.getObjectHandlerRegistry(), this.ctx.getVendorInformationObjectRegistry());
-            final ByteBuf result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCEPRequestMessage1.bin"));
-            final PcreqMessageBuilder builder = new PcreqMessageBuilder();
-            final List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.Requests> reqs1 = Lists.newArrayList();
-            final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.RequestsBuilder rBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.RequestsBuilder();
-            rBuilder.setRp(this.rpTrue);
-            rBuilder.setSegmentComputation(new SegmentComputationBuilder().setP2p(new P2pBuilder()
-                .addAugmentation(P2p1.class, new P2p1Builder().setLsp(this.lsp).build())
-                .setEndpointsObj(this.endpoints)
-                .setBandwidth(this.bandwidth)
-                .setIro(this.iro)
-                .setLoadBalancing(new LoadBalancingBuilder().setMaxLsp((short) 1).setMinBandwidth(this.bandwidth.getBandwidth()).setIgnore(false).setProcessingRule(false).build())
-                .setLspa(this.lspa)
-                .setMetrics(Lists.newArrayList(this.metrics))
-                .setOf(ofBuilder.build())
-                .setRro(rroBuilder.build())
-                .setClassType(new ClassTypeBuilder().setProcessingRule(true).setIgnore(false).setClassType(new ClassType((short) 1)).build())
-                .build()).build());
-            reqs1.add(rBuilder.build());
-            builder.setRequests(reqs1);
-
-            parser.parseMessage(result.slice(4, result.readableBytes() - 4), Collections.<Message> emptyList());
-            assertEquals(new PcreqBuilder().setPcreqMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                result.readableBytes() - 4), Collections.<Message> emptyList()));
-            final ByteBuf buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcreqBuilder().setPcreqMessage(builder.build()).build(), buf);
-
-            assertArrayEquals(result.array(), buf.array());
-        }
-    }
-
-    @Test
-    public void testPcRepMsg() throws IOException, PCEPDeserializerException {
-        try (StatefulActivator a = new StatefulActivator()) {
-            a.start(this.ctx);
-            final Stateful02PCReplyMessageParser parser = new Stateful02PCReplyMessageParser(this.ctx.getObjectHandlerRegistry(), this.ctx.getVendorInformationObjectRegistry());
-
-            final OfBuilder ofBuilder = new OfBuilder();
-            ofBuilder.setIgnore(false);
-            ofBuilder.setProcessingRule(false);
-            ofBuilder.setCode(new OfId(0));
-            ofBuilder.setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.of.object.of.TlvsBuilder().build());
-
-            // test success case
-            final ByteBuf result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCRep.5.bin"));
-            final PcrepMessageBuilder builder = new PcrepMessageBuilder();
-            final List<Replies> replies4 = Lists.newArrayList();
-            RepliesBuilder rBuilder = new RepliesBuilder();
-            rBuilder.setRp(this.rpTrue);
-            rBuilder.addAugmentation(Replies1.class, new Replies1Builder().setLsp(this.lsp).build());
-            final List<Paths> paths = Lists.newArrayList();
-            final PathsBuilder paBuilder = new PathsBuilder();
-            paBuilder.setEro(this.ero);
-            paBuilder.setLspa(this.lspa);
-            paBuilder.setMetrics(Lists.newArrayList(this.metrics));
-            paBuilder.setIro(this.iro);
-            paBuilder.setOf(ofBuilder.build());
-            paths.add(paBuilder.build());
-            rBuilder.setResult(new SuccessCaseBuilder().setSuccess(new SuccessBuilder().setPaths(paths).build()).build()).build();
-            replies4.add(rBuilder.build());
-            builder.setReplies(replies4);
-
-            assertEquals(new PcrepBuilder().setPcrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                result.readableBytes() - 4), Collections.<Message> emptyList()));
-            final ByteBuf buf = Unpooled.buffer(result.readableBytes());
-            parser.serializeMessage(new PcrepBuilder().setPcrepMessage(builder.build()).build(), buf);
-            assertArrayEquals(result.array(), buf.array());
-
-            // test failure case
-            final NoPathBuilder npbuilder = new NoPathBuilder();
-            npbuilder.setProcessingRule(false);
-            npbuilder.setIgnore(false);
-            npbuilder.setNatureOfIssue((short) 0);
-            npbuilder.setUnsatisfiedConstraints(false);
-            npbuilder.setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure._case.no.path.TlvsBuilder().build());
-
-            final ByteBuf result2 = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCRep.3.bin"));
-            final List<Replies> replies3 = Lists.newArrayList();
-            rBuilder = new RepliesBuilder();
-            rBuilder.setRp(this.rpTrue);
-            rBuilder.addAugmentation(Replies1.class, new Replies1Builder().build());
-            rBuilder.setResult(new FailureCaseBuilder().setNoPath(npbuilder.build()).setLspa(this.lspa).setMetrics(Lists.newArrayList(this.metrics)).setIro(
-                this.iro).build());
-            replies3.add(rBuilder.build());
-            builder.setReplies(replies3);
-
-            assertEquals(new PcrepBuilder().setPcrepMessage(builder.build()).build(), parser.parseMessage(result2.slice(4,
-                    result2.readableBytes() - 4), Collections.<Message> emptyList()));
-            final ByteBuf buffer = Unpooled.buffer(result2.readableBytes());
-            parser.serializeMessage(new PcrepBuilder().setPcrepMessage(builder.build()).build(), buffer);
-            assertArrayEquals(result2.array(), buffer.array());
-        }
-    }
-}
diff --git a/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPObjectParserTest.java b/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPObjectParserTest.java
deleted file mode 100644 (file)
index c61c2a6..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. 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.protocol.pcep.ietf;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.io.IOException;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.protocol.pcep.crabbe.initiated00.PCEPOpenObjectParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02LspObjectParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02LspaObjectParser;
-import org.opendaylight.protocol.pcep.spi.ObjectHeaderImpl;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.pcep.spi.TlvRegistry;
-import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
-import org.opendaylight.protocol.pcep.spi.pojo.ServiceLoaderPCEPExtensionProviderContext;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.lsp.cleanup.tlv.LspCleanupBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PlspId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.LspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.StatefulBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathNameBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ProtocolVersion;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.LspaBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.OpenBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.AttributeFilter;
-
-public class PCEPObjectParserTest {
-
-    private TlvRegistry tlvRegistry;
-
-    private VendorInformationTlvRegistry viTlvRegistry;
-
-    @Before
-    public void setUp() throws Exception {
-        this.tlvRegistry = ServiceLoaderPCEPExtensionProviderContext.create().getTlvHandlerRegistry();
-        this.viTlvRegistry = ServiceLoaderPCEPExtensionProviderContext.getSingletonInstance().getVendorInformationTlvRegistry();
-    }
-
-    @Test
-    public void testOpenObjectWithTLV() throws PCEPDeserializerException, IOException {
-        final PCEPOpenObjectParser parser = new PCEPOpenObjectParser(this.tlvRegistry, this.viTlvRegistry);
-        final ByteBuf result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCEPOpenObject1.bin"));
-
-        final OpenBuilder builder = new OpenBuilder();
-        builder.setProcessingRule(false);
-        builder.setIgnore(false);
-        builder.setVersion(new ProtocolVersion((short) 1));
-        builder.setKeepalive((short) 30);
-        builder.setDeadTimer((short) 120);
-        builder.setSessionId((short) 1);
-
-        final Stateful tlv1 = new StatefulBuilder().setLspUpdateCapability(Boolean.TRUE).setIncludeDbVersion(Boolean.FALSE).addAugmentation(
-                Stateful1.class, new Stateful1Builder().setInitiation(true).build()).build();
-
-        final Tlvs2Builder statBuilder = new Tlvs2Builder();
-        statBuilder.setStateful(tlv1);
-
-        final Tlvs1Builder cleanupBuilder = new Tlvs1Builder();
-        cleanupBuilder.setLspCleanup(new LspCleanupBuilder().setTimeout(180L).build());
-
-        builder.setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.TlvsBuilder().addAugmentation(
-                Tlvs2.class, statBuilder.build()).addAugmentation(Tlvs1.class, cleanupBuilder.build()).build());
-
-        assertEquals(builder.build(), parser.parseObject(new ObjectHeaderImpl(false, false), result.slice(4, result.readableBytes() - 4)));
-        ByteBuf buf = Unpooled.buffer();
-        parser.serializeObject(builder.build(), buf);
-        assertArrayEquals(result.array(),ByteArray.getAllBytes(buf));
-    }
-
-    @Test
-    public void testLspaObjectWithTlv() throws IOException, PCEPDeserializerException {
-        final Stateful02LspaObjectParser parser = new Stateful02LspaObjectParser(this.tlvRegistry, this.viTlvRegistry);
-        final ByteBuf result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCEPLspaObject1LowerBounds.bin"));
-
-        final LspaBuilder builder = new LspaBuilder();
-        builder.setIgnore(false);
-        builder.setProcessingRule(false);
-        builder.setIncludeAny(new AttributeFilter(0l));
-        builder.setExcludeAny(new AttributeFilter(0l));
-        builder.setIncludeAll(new AttributeFilter(0l));
-        builder.setSetupPriority((short) 0);
-        builder.setHoldPriority((short) 0);
-        builder.setLocalProtectionDesired(false);
-
-        final SymbolicPathName tlv = new SymbolicPathNameBuilder().setPathName(
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.SymbolicPathName(new byte[] {
-                    (byte) 0x4d, (byte) 0x65, (byte) 0x64, (byte) 0x20, (byte) 0x74, (byte) 0x65, (byte) 0x73, (byte) 0x74, (byte) 0x20,
-                    (byte) 0x6f, (byte) 0x66, (byte) 0x20, (byte) 0x73, (byte) 0x79, (byte) 0x6d, (byte) 0x62, (byte) 0x6f, (byte) 0x6c,
-                    (byte) 0x69, (byte) 0x63, (byte) 0x20, (byte) 0x6e, (byte) 0x61, (byte) 0x6d, (byte) 0x65 })).build();
-
-        builder.setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.lspa.TlvsBuilder().addAugmentation(
-                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs2.class,
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs2Builder().setSymbolicPathName(
-                        tlv).build()).build());
-        // Tlvs container does not contain toString
-        final Object o = parser.parseObject(new ObjectHeaderImpl(true, true), result.slice(4, result.readableBytes() - 4));
-        assertEquals(
-                tlv,
-                ((Lspa) o).getTlvs().getAugmentation(
-                        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs2.class).getSymbolicPathName());
-        // assertEquals(builder.build(), parser.parseObject(new ObjectHeaderImpl(true, true), ByteArray.cutBytes(result,
-        // 4)));
-        ByteBuf buf = Unpooled.buffer();
-        parser.serializeObject(builder.build(), buf);
-        assertArrayEquals(result.array(),ByteArray.getAllBytes(buf));
-    }
-
-    @Test
-    public void testLspObjectWithTLV() throws IOException, PCEPDeserializerException {
-        final Stateful02LspObjectParser parser = new Stateful02LspObjectParser(this.tlvRegistry, this.viTlvRegistry);
-        final ByteBuf result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCEPLspObject1WithTLV.bin"));
-
-        final LspBuilder builder = new LspBuilder();
-        builder.setProcessingRule(true);
-        builder.setIgnore(true);
-        builder.setDelegate(false);
-        builder.setSync(false);
-        builder.setOperational(true);
-        builder.setRemove(true);
-        builder.setPlspId(new PlspId(0x12345L));
-
-        final SymbolicPathName tlv2 = new SymbolicPathNameBuilder().setPathName(
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.SymbolicPathName("Med".getBytes())).build();
-        builder.setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.lsp.TlvsBuilder().setSymbolicPathName(
-                tlv2).build());
-        assertEquals(builder.build(), parser.parseObject(new ObjectHeaderImpl(true, true), result.slice(4, result.readableBytes() - 4)));
-        ByteBuf buf = Unpooled.buffer();
-        parser.serializeObject(builder.build(), buf);
-        assertArrayEquals(result.array(),ByteArray.getAllBytes(buf));
-    }
-}
diff --git a/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPTlvParserTest.java b/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPTlvParserTest.java
deleted file mode 100644 (file)
index cfe3242..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. 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.protocol.pcep.ietf;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
-import java.math.BigInteger;
-import org.junit.Test;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02LspDbVersionTlvParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02LspSymbolicNameTlvParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02NodeIdentifierTlvParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02RSVPErrorSpecTlvParser;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02StatefulCapabilityTlvParser;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
-import org.opendaylight.protocol.util.ByteArray;
-import org.opendaylight.protocol.util.Ipv4Util;
-import org.opendaylight.protocol.util.Ipv6Util;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.db.version.tlv.LspDbVersion;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.db.version.tlv.LspDbVersionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.node.identifier.tlv.NodeIdentifier;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.node.identifier.tlv.NodeIdentifierBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.RsvpErrorSpec;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.RsvpErrorSpecBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.rsvp.error.spec.tlv.rsvp.error.spec.RsvpErrorBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.StatefulBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathNameBuilder;
-
-public class PCEPTlvParserTest {
-
-    private static final byte[] statefulBytes = { 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01 };
-    private static final byte[] symbolicNameBytes = { 0x00, 0x11, 0x00, 0x19, 0x4d, 0x65, 0x64, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x6f,
-        0x66, 0x20, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x69, 0x63, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00 };
-    private static final byte[] nodeIdentifierBytes = { 0x00, 0x18, 0x00, 0x19, 0x4d, 0x65, 0x64, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x6f,
-        0x66, 0x20, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x69, 0x63, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00 };
-    private static final byte[] rsvpErrorBytes = { 0x00, 0x15, 0x00, 0x08, 0x12, 0x34, 0x56, 0x78, 0x02, (byte) 0x92, 0x16, 0x02 };
-    private static final byte[] rsvpError6Bytes = { 0x00, 0x15, 0x00, 0x14, 0x12, 0x34, 0x56, 0x78, (byte) 0x9a, (byte) 0xbc, (byte) 0xde,
-        (byte) 0xf0, 0x12, 0x34, 0x56, 0x78, (byte) 0x9a, (byte) 0xbc, (byte) 0xde, (byte) 0xf0, 0x02, (byte) 0xd5, (byte) 0xc5,
-        (byte) 0xd9 };
-    private static final byte[] lspDbBytes = { 0x00, 0x17, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0xb4 };
-
-    @Test
-    public void testStatefulTlv() throws PCEPDeserializerException {
-        final Stateful02StatefulCapabilityTlvParser parser = new Stateful02StatefulCapabilityTlvParser();
-        final Stateful tlv = new StatefulBuilder().setLspUpdateCapability(Boolean.TRUE).setIncludeDbVersion(false).build();
-        assertEquals(tlv, parser.parseTlv(Unpooled.wrappedBuffer(ByteArray.cutBytes(statefulBytes, 4))));
-        final ByteBuf buff = Unpooled.buffer();
-        parser.serializeTlv(tlv, buff);
-        assertArrayEquals(statefulBytes, ByteArray.getAllBytes(buff));
-    }
-
-    @Test
-    public void testSymbolicNameTlv() throws PCEPDeserializerException {
-        final Stateful02LspSymbolicNameTlvParser parser = new Stateful02LspSymbolicNameTlvParser();
-        final SymbolicPathName tlv = new SymbolicPathNameBuilder().setPathName(
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.SymbolicPathName("Med test of symbolic name".getBytes())).build();
-        assertEquals(tlv, parser.parseTlv(Unpooled.wrappedBuffer(ByteArray.subByte(symbolicNameBytes, 4, 25))));
-        final ByteBuf buff = Unpooled.buffer();
-        parser.serializeTlv(tlv, buff);
-        assertArrayEquals(symbolicNameBytes, ByteArray.getAllBytes(buff));
-    }
-
-    @Test
-    public void testNodeIdentifier() throws PCEPDeserializerException {
-        final Stateful02NodeIdentifierTlvParser parser = new Stateful02NodeIdentifierTlvParser();
-        final NodeIdentifier tlv = new NodeIdentifierBuilder().setNodeId(
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.NodeIdentifier(ByteArray.subByte(
-                        nodeIdentifierBytes, 4, 25))).build();
-        assertEquals(tlv, parser.parseTlv(Unpooled.wrappedBuffer(ByteArray.subByte(nodeIdentifierBytes, 4, 25))));
-        final ByteBuf buff = Unpooled.buffer();
-        parser.serializeTlv(tlv, buff);
-        assertArrayEquals(nodeIdentifierBytes, ByteArray.getAllBytes(buff));
-    }
-
-    @Test
-    public void testRSVPError4SpecTlv() throws PCEPDeserializerException {
-        final Stateful02RSVPErrorSpecTlvParser parser = new Stateful02RSVPErrorSpecTlvParser();
-        final RsvpErrorBuilder builder = new RsvpErrorBuilder();
-        builder.setNode(new IpAddress(Ipv4Util.addressForByteBuf(Unpooled.wrappedBuffer(new byte[] { (byte) 0x12, (byte) 0x34, (byte) 0x56, (byte) 0x78 }))));
-        builder.setFlags(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.ErrorSpec.Flags(false, true));
-        builder.setCode((short) 146);
-        builder.setValue(5634);
-        final RsvpErrorSpec tlv = new RsvpErrorSpecBuilder().setRsvpError(builder.build()).build();
-        assertEquals(tlv, parser.parseTlv(Unpooled.wrappedBuffer(ByteArray.subByte(rsvpErrorBytes, 4, 8))));
-        final ByteBuf buff = Unpooled.buffer();
-        parser.serializeTlv(tlv, buff);
-        assertArrayEquals(rsvpErrorBytes, ByteArray.getAllBytes(buff));
-    }
-
-    @Test
-    public void testRSVPError6SpecTlv() throws PCEPDeserializerException {
-        final Stateful02RSVPErrorSpecTlvParser parser = new Stateful02RSVPErrorSpecTlvParser();
-        final RsvpErrorBuilder builder = new RsvpErrorBuilder();
-        builder.setNode(new IpAddress(Ipv6Util.addressForByteBuf(Unpooled.wrappedBuffer(new byte[] { (byte) 0x12, (byte) 0x34, (byte) 0x56, (byte) 0x78,
-            (byte) 0x9a, (byte) 0xbc, (byte) 0xde, (byte) 0xf0, (byte) 0x12, (byte) 0x34, (byte) 0x56, (byte) 0x78, (byte) 0x9a,
-            (byte) 0xbc, (byte) 0xde, (byte) 0xf0 }))));
-        builder.setFlags(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.ErrorSpec.Flags(false, true));
-        builder.setCode((short) 213);
-        builder.setValue(50649);
-        final RsvpErrorSpec tlv = new RsvpErrorSpecBuilder().setRsvpError(builder.build()).build();
-        assertEquals(tlv, parser.parseTlv(Unpooled.wrappedBuffer(ByteArray.subByte(rsvpError6Bytes, 4, 20))));
-        final ByteBuf buff = Unpooled.buffer();
-        parser.serializeTlv(tlv, buff);
-        assertArrayEquals(rsvpError6Bytes, ByteArray.getAllBytes(buff));
-    }
-
-    @Test
-    public void testLspDbVersionTlv() throws PCEPDeserializerException {
-        final Stateful02LspDbVersionTlvParser parser = new Stateful02LspDbVersionTlvParser();
-        final LspDbVersion tlv = new LspDbVersionBuilder().setVersion(BigInteger.valueOf(180L)).build();
-        assertEquals(tlv, parser.parseTlv(Unpooled.wrappedBuffer(ByteArray.cutBytes(lspDbBytes, 4))));
-        final ByteBuf buff = Unpooled.buffer();
-        parser.serializeTlv(tlv, buff);
-        assertArrayEquals(lspDbBytes, ByteArray.getAllBytes(buff));
-
-    }
-}
diff --git a/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/Stateful02PCEPSessionProposalFactoryModuleTest.java b/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/Stateful02PCEPSessionProposalFactoryModuleTest.java
deleted file mode 100644 (file)
index eca8e27..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. 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.protocol.pcep.ietf;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.ObjectName;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.controller.config.api.ValidationException;
-import org.opendaylight.controller.config.api.jmx.CommitStatus;
-import org.opendaylight.controller.config.manager.impl.AbstractConfigTest;
-import org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver;
-import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
-import org.opendaylight.controller.config.yang.pcep.stateful02.cfg.Stateful02PCEPSessionProposalFactoryModuleFactory;
-import org.opendaylight.controller.config.yang.pcep.stateful02.cfg.Stateful02PCEPSessionProposalFactoryModuleMXBean;
-
-public class Stateful02PCEPSessionProposalFactoryModuleTest extends AbstractConfigTest {
-
-    private static final String INSTANCE_NAME = "pcep-stateful02-session-proposal-factroy-impl";
-    private static final String FACTROY_NAME = Stateful02PCEPSessionProposalFactoryModuleFactory.NAME;
-
-    @Before
-    public void setUp() throws Exception {
-        super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext, new Stateful02PCEPSessionProposalFactoryModuleFactory()));
-    }
-
-    @Test
-    public void testValidationExceptionDeadTimerValueNotSet() throws Exception {
-        try {
-            createStateful02SessionInstance(null, (short) 100, true, true, true, 0);
-            fail();
-        } catch (final ValidationException e) {
-            assertTrue(e.getMessage().contains("DeadTimerValue value is not set"));
-        }
-    }
-
-    @Test
-    public void testValidationExceptionKeepAliveTimerNotSet() throws Exception {
-        try {
-            createStateful02SessionInstance((short) 200, null, true, true, true, 0);
-            fail();
-        } catch (final ValidationException e) {
-            assertTrue(e.getMessage().contains("KeepAliveTimerValue value is not set"));
-        }
-    }
-
-    @Test
-    public void testValidationExceptionStatefulNotSet() throws Exception {
-        try {
-            createStateful02SessionInstance((short) 200, (short) 100, null, false, false, 0);
-            fail();
-        } catch (final ValidationException e) {
-            assertTrue(e.getMessage().contains("Stateful value is not set"));
-        }
-    }
-
-    @Test
-    public void testValidationExceptionActiveNotSet() throws Exception {
-        try {
-            createStateful02SessionInstance((short) 200, (short) 100, true, null, true, 0);
-            fail();
-        } catch (final ValidationException e) {
-            assertTrue(e.getMessage().contains("Active value is not set"));
-        }
-    }
-
-    @Test
-    public void testValidationExceptionInstantiatedNotSet() throws Exception {
-        try {
-            createStateful02SessionInstance((short) 200, (short) 100, true, true, null, 0);
-            fail();
-        } catch (final ValidationException e) {
-            assertTrue(e.getMessage().contains("Initiated value is not set"));
-        }
-    }
-
-    @Test
-    public void testValidationExceptionTimeoutNotSet() throws Exception {
-        try {
-            createStateful02SessionInstance((short) 200, (short) 100, true, true, true, null);
-            fail();
-        } catch (final ValidationException e) {
-            assertTrue(e.getMessage().contains("Timeout value is not set"));
-        }
-    }
-
-    @Test
-    public void testValidationExceptionKeepAliveTimerMinValue() throws Exception {
-        try {
-            createStateful02SessionInstance((short) 200, (short) -10, true, true, true, 0);
-            fail();
-        } catch (final ValidationException e) {
-            assertTrue(e.getMessage().contains("minimum value is 1."));
-        }
-    }
-
-    @Test
-    public void testStatefulAfterCommitted() throws Exception {
-        createStateful02SessionInstance((short) 200, (short) 100, false, true, true, 0);
-        final ConfigTransactionJMXClient transaction = this.configRegistryClient.createTransaction();
-        final Stateful02PCEPSessionProposalFactoryModuleMXBean mxBean = transaction.newMXBeanProxy(transaction.lookupConfigBean(
-                FACTROY_NAME, INSTANCE_NAME), Stateful02PCEPSessionProposalFactoryModuleMXBean.class);
-        assertTrue(mxBean.getStateful());
-    }
-
-    @Test
-    public void testCreateBean() throws Exception {
-        final CommitStatus status = createInstance();
-        assertBeanCount(1, FACTROY_NAME);
-        assertStatus(status, 1, 0, 0);
-    }
-
-    @Test
-    public void testReusingOldInstance() throws Exception {
-        createInstance();
-        final ConfigTransactionJMXClient transaction = this.configRegistryClient.createTransaction();
-        assertBeanCount(1, FACTROY_NAME);
-        final CommitStatus status = transaction.commit();
-        assertBeanCount(1, FACTROY_NAME);
-        assertStatus(status, 0, 0, 1);
-    }
-
-    @Test
-    public void testReconfigure() throws Exception {
-        createInstance();
-        final ConfigTransactionJMXClient transaction = this.configRegistryClient.createTransaction();
-        assertBeanCount(1, FACTROY_NAME);
-        transaction.newMXBeanProxy(transaction.lookupConfigBean(FACTROY_NAME, INSTANCE_NAME),
-                Stateful02PCEPSessionProposalFactoryModuleMXBean.class);
-        final CommitStatus status = transaction.commit();
-        assertBeanCount(1, FACTROY_NAME);
-        assertStatus(status, 0, 0, 1);
-    }
-
-    private CommitStatus createInstance() throws Exception {
-        final ConfigTransactionJMXClient transaction = this.configRegistryClient.createTransaction();
-        createStateful02SessionProposalInstance(transaction);
-        return transaction.commit();
-    }
-
-    private CommitStatus createStateful02SessionInstance(final Short deadTimer, final Short keepAlive, final Boolean isStateful,
-            final Boolean isActive, final Boolean isInstant, final Integer timeout) throws Exception {
-        final ConfigTransactionJMXClient transaction = this.configRegistryClient.createTransaction();
-        createStateful02SessionInstance(transaction, deadTimer, keepAlive, isStateful, isActive, isInstant, timeout);
-        return transaction.commit();
-    }
-
-    public static ObjectName createStateful02SessionProposalInstance(final ConfigTransactionJMXClient transaction) throws Exception {
-        return createStateful02SessionInstance(transaction, (short) 200, (short) 100, true, true, true, 180);
-    }
-
-    private static ObjectName createStateful02SessionInstance(final ConfigTransactionJMXClient transaction, final Short deadTimer,
-            final Short keepAlive, final Boolean stateful, final Boolean active, final Boolean instant, final Integer timeout) throws InstanceAlreadyExistsException {
-        final ObjectName nameCreated = transaction.createModule(FACTROY_NAME, INSTANCE_NAME);
-        final Stateful02PCEPSessionProposalFactoryModuleMXBean mxBean = transaction.newMXBeanProxy(nameCreated,
-                Stateful02PCEPSessionProposalFactoryModuleMXBean.class);
-        mxBean.setActive(active);
-        mxBean.setDeadTimerValue(deadTimer);
-        mxBean.setInitiated(instant);
-        mxBean.setKeepAliveTimerValue(keepAlive);
-        mxBean.setStateful(stateful);
-        mxBean.setTimeout(timeout);
-        return nameCreated;
-    }
-
-}
diff --git a/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/Stateful02SessionProposalFactoryTest.java b/pcep/ietf-stateful02/src/test/java/org/opendaylight/protocol/pcep/ietf/Stateful02SessionProposalFactoryTest.java
deleted file mode 100644 (file)
index 7b4a013..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.ietf;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.opendaylight.protocol.pcep.ietf.stateful02.Stateful02SessionProposalFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.lsp.cleanup.tlv.LspCleanupBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.StatefulBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.OpenBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.TlvsBuilder;
-
-public class Stateful02SessionProposalFactoryTest {
-
-    private static final int DEAD_TIMER = 4;
-    private static final int KEEP_ALIVE = 1;
-    private static final int TIMEOUT = 100;
-    private static final int SESSION_ID = 1;
-    private static final Open OPEN_MSG = new OpenBuilder()
-            .setDeadTimer((short) DEAD_TIMER)
-            .setKeepalive((short) KEEP_ALIVE)
-            .setSessionId((short) SESSION_ID)
-            .setTlvs(new TlvsBuilder()
-                .addAugmentation(Tlvs1.class, new Tlvs1Builder().setLspCleanup(new LspCleanupBuilder().setTimeout((long) TIMEOUT).build()).build())
-                .addAugmentation(Tlvs2.class, new Tlvs2Builder().setStateful(new StatefulBuilder().addAugmentation(Stateful1.class, new Stateful1Builder().setInitiation(true).build()).setLspUpdateCapability(true).build()).build())
-                .build())
-            .build();
-
-    @Test
-    public void testStateful02SessionProposalFactory() {
-        final Stateful02SessionProposalFactory sspf = new Stateful02SessionProposalFactory(DEAD_TIMER, KEEP_ALIVE, true, true, true, TIMEOUT);
-        Assert.assertEquals(DEAD_TIMER, sspf.getDeadTimer());
-        Assert.assertEquals(KEEP_ALIVE, sspf.getKeepAlive());
-        Assert.assertTrue(sspf.isActive());
-        Assert.assertTrue(sspf.isInstant());
-        Assert.assertTrue(sspf.isStateful());
-        Assert.assertEquals(OPEN_MSG, sspf.getSessionProposal(null, SESSION_ID));
-    }
-
-}
diff --git a/pcep/ietf-stateful02/src/test/resources/PCEPLspObject1WithTLV.bin b/pcep/ietf-stateful02/src/test/resources/PCEPLspObject1WithTLV.bin
deleted file mode 100644 (file)
index 489ffa1..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCEPLspObject1WithTLV.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCEPLspaObject1LowerBounds.bin b/pcep/ietf-stateful02/src/test/resources/PCEPLspaObject1LowerBounds.bin
deleted file mode 100755 (executable)
index 881c7c2..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCEPLspaObject1LowerBounds.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCEPOpenMessage1.bin b/pcep/ietf-stateful02/src/test/resources/PCEPOpenMessage1.bin
deleted file mode 100755 (executable)
index 388f098..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCEPOpenMessage1.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCEPOpenObject1.bin b/pcep/ietf-stateful02/src/test/resources/PCEPOpenObject1.bin
deleted file mode 100644 (file)
index 5ff89be..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCEPOpenObject1.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCEPRequestMessage1.bin b/pcep/ietf-stateful02/src/test/resources/PCEPRequestMessage1.bin
deleted file mode 100644 (file)
index 01250d8..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCEPRequestMessage1.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCRep.3.bin b/pcep/ietf-stateful02/src/test/resources/PCRep.3.bin
deleted file mode 100644 (file)
index 08d8b7a..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCRep.3.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCRep.5.bin b/pcep/ietf-stateful02/src/test/resources/PCRep.5.bin
deleted file mode 100644 (file)
index 7d09124..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCRep.5.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCRpt.1.bin b/pcep/ietf-stateful02/src/test/resources/PCRpt.1.bin
deleted file mode 100644 (file)
index b1862e8..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCRpt.1.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCRpt.2.bin b/pcep/ietf-stateful02/src/test/resources/PCRpt.2.bin
deleted file mode 100644 (file)
index b0c77a9..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCRpt.2.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCRpt.3.bin b/pcep/ietf-stateful02/src/test/resources/PCRpt.3.bin
deleted file mode 100644 (file)
index 1ee1078..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCRpt.3.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCRpt.5.bin b/pcep/ietf-stateful02/src/test/resources/PCRpt.5.bin
deleted file mode 100644 (file)
index 3b0f8f2..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCRpt.5.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCUpd.2.bin b/pcep/ietf-stateful02/src/test/resources/PCUpd.2.bin
deleted file mode 100644 (file)
index a472749..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCUpd.2.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/PCUpd.5.bin b/pcep/ietf-stateful02/src/test/resources/PCUpd.5.bin
deleted file mode 100644 (file)
index 75a403c..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/PCUpd.5.bin and /dev/null differ
diff --git a/pcep/ietf-stateful02/src/test/resources/Pcinit.bin b/pcep/ietf-stateful02/src/test/resources/Pcinit.bin
deleted file mode 100644 (file)
index bd60a11..0000000
Binary files a/pcep/ietf-stateful02/src/test/resources/Pcinit.bin and /dev/null differ
diff --git a/pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/CrabbeInitiated00PCEPParserModule.java b/pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/CrabbeInitiated00PCEPParserModule.java
deleted file mode 100644 (file)
index 9d7f4f9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Generated file
-
- * Generated from: yang module name: odl-pcep-impl-cfg  yang module local name: pcep-parser-crabbe-initiated00
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Jan 22 15:11:39 CET 2014
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.pcep.impl;
-
-import org.opendaylight.protocol.pcep.crabbe.initiated00.InitiatedActivator;
-
-/**
-*
-*/
-public final class CrabbeInitiated00PCEPParserModule extends
-        org.opendaylight.controller.config.yang.pcep.impl.AbstractCrabbeInitiated00PCEPParserModule {
-
-    public CrabbeInitiated00PCEPParserModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public CrabbeInitiated00PCEPParserModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final CrabbeInitiated00PCEPParserModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new InitiatedActivator();
-    }
-}
diff --git a/pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/CrabbeInitiated00PCEPParserModuleFactory.java b/pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/CrabbeInitiated00PCEPParserModuleFactory.java
deleted file mode 100644 (file)
index e5cbf94..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Generated file
-
- * Generated from: yang module name: odl-pcep-impl-cfg  yang module local name: pcep-parser-crabbe-initiated00
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Jan 22 15:11:39 CET 2014
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.pcep.impl;
-
-/**
-*
-*/
-public class CrabbeInitiated00PCEPParserModuleFactory extends
-        org.opendaylight.controller.config.yang.pcep.impl.AbstractCrabbeInitiated00PCEPParserModuleFactory {
-
-}
diff --git a/pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/IetfStateful02PCEPParserModule.java b/pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/IetfStateful02PCEPParserModule.java
deleted file mode 100644 (file)
index 9826404..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Generated file
-
- * Generated from: yang module name: odl-pcep-impl-cfg  yang module local name: pcep-parser-ietf-stateful02
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Jan 22 15:11:39 CET 2014
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.pcep.impl;
-
-import org.opendaylight.protocol.pcep.ietf.stateful02.StatefulActivator;
-
-/**
-*
-*/
-public final class IetfStateful02PCEPParserModule extends
-        org.opendaylight.controller.config.yang.pcep.impl.AbstractIetfStateful02PCEPParserModule {
-
-    public IetfStateful02PCEPParserModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public IetfStateful02PCEPParserModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final IetfStateful02PCEPParserModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new StatefulActivator();
-    }
-}
diff --git a/pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/IetfStateful02PCEPParserModuleFactory.java b/pcep/impl/src/main/resources/org/opendaylight/controller/config/yang/pcep/impl/IetfStateful02PCEPParserModuleFactory.java
deleted file mode 100644 (file)
index 5fcc192..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Generated file
-
- * Generated from: yang module name: odl-pcep-impl-cfg  yang module local name: pcep-parser-ietf-stateful02
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Jan 22 15:11:39 CET 2014
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.pcep.impl;
-
-/**
-*
-*/
-public class IetfStateful02PCEPParserModuleFactory extends
-        org.opendaylight.controller.config.yang.pcep.impl.AbstractIetfStateful02PCEPParserModuleFactory {
-
-}
index 6ae9ebd0001b80f114b32d1d8696aec52ca03124..9f58b23462580ed9285ac9f82cba070956674864 100644 (file)
@@ -33,7 +33,6 @@
         <module>api</module>
         <module>impl</module>
         <module>spi</module>
-        <module>ietf-stateful02</module>
         <module>ietf-stateful07</module>
         <module>testtool</module>
         <module>topology-api</module>
index e33e55c5239f7a06c1d8881735f6f67d6e62af77..b8b65d64e2d95823f7e78068cebbd08355d8443d 100644 (file)
             <groupId>${project.groupId}</groupId>
             <artifactId>pcep-api</artifactId>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-ietf-stateful02</artifactId>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>pcep-ietf-stateful07</artifactId>
             <artifactId>programming-impl</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-ietf-stateful02</artifactId>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>programming-impl</artifactId>
index fc58b6390fe89514cd9fb62a4b405f6a28a1945f..340cde0438a3a468665bb7c915bc45571410dcf0 100644 (file)
@@ -127,9 +127,9 @@ final class SessionListenerState {
     }
 
     public void updateStatefulSentMsg(final Message msg) {
-        if (msg instanceof Pcinitiate || msg instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Pcinitiate) {
+        if (msg instanceof Pcinitiate) {
             this.sentInitMsgCount++;
-        } else if (msg instanceof Pcupd || msg instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Pcupd) {
+        } else if (msg instanceof Pcupd) {
             this.sentUpdMsgCount++;
         }
     }
diff --git a/pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListener.java b/pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListener.java
deleted file mode 100644 (file)
index 2f63259..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.bgpcep.pcep.topology.provider;
-
-import com.google.common.base.Charsets;
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.util.concurrent.AsyncFunction;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-import java.net.InetAddress;
-import java.nio.ByteBuffer;
-import java.util.Collections;
-import org.opendaylight.controller.config.yang.pcep.topology.provider.PeerCapabilities;
-import org.opendaylight.protocol.pcep.PCEPSession;
-import org.opendaylight.protocol.pcep.spi.PCEPErrors;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.PcinitiateBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Stateful1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.PcinitiateMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.pcinitiate.message.pcinitiate.message.RequestsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Arguments1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Arguments2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PcrptMessage;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PcupdBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PlspId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.ReportedLsp1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.ReportedLsp1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.StatefulTlv1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.StatefulTlv1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.SymbolicPathName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.LspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.Reports;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.PcupdMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.UpdatesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.updates.PathBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.Stateful;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathNameBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.LspaBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.lspa.TlvsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.AddLspArgs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.EnsureLspOperationalInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.LspId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.OperationResult;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.PccSyncState;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.RemoveLspArgs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.UpdateLspArgs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.PathComputationClientBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.ReportedLsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.ReportedLspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.StatefulTlvBuilder;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Deprecated
-public class Stateful02TopologySessionListener extends AbstractTopologySessionListener<String, PlspId> {
-    private static final Logger LOG = LoggerFactory.getLogger(Stateful02TopologySessionListener.class);
-
-    /**
-     * @param serverSessionManager
-     */
-    Stateful02TopologySessionListener(final ServerSessionManager serverSessionManager) {
-        super(serverSessionManager);
-    }
-
-    @Override
-    protected void onSessionUp(final PCEPSession session, final PathComputationClientBuilder pccBuilder) {
-        final InetAddress peerAddress = session.getRemoteAddress();
-
-        final Tlvs tlvs = session.getRemoteTlvs();
-        final Tlvs2 tlv = tlvs.getAugmentation(Tlvs2.class);
-        if (tlv != null) {
-            final Stateful stateful = tlv.getStateful();
-            if (stateful != null) {
-                getSessionListenerState().setPeerCapabilities(getCapabilities(stateful));
-                pccBuilder.setReportedLsp(Collections.<ReportedLsp> emptyList());
-                pccBuilder.setStateSync(PccSyncState.InitialResync);
-                pccBuilder.setStatefulTlv(new StatefulTlvBuilder().addAugmentation(StatefulTlv1.class, new StatefulTlv1Builder(tlv).build()).build());
-            } else {
-                LOG.debug("Peer {} does not advertise stateful TLV", peerAddress);
-            }
-        } else {
-            LOG.debug("Peer {} does not advertise stateful TLV", peerAddress);
-        }
-    }
-
-    @Override
-    protected synchronized boolean onMessage(final MessageContext ctx, final Message message) {
-        if (!(message instanceof PcrptMessage)) {
-            return true;
-        }
-
-        getSessionListenerState().updateLastReceivedRptMsg();
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.PcrptMessage rpt = ((PcrptMessage) message).getPcrptMessage();
-        for (final Reports r : rpt.getReports()) {
-            final Lsp lsp = r.getLsp();
-            if (lsp == null) {
-                LOG.warn("PCRpt message received without LSP object.");
-                return true;
-            }
-
-            final PlspId id = lsp.getPlspId();
-            if (!lsp.isSync() && (id == null || id.getValue() == 0)) {
-                stateSynchronizationAchieved(ctx);
-                continue;
-            }
-
-            final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.lsp.Tlvs tlvs = lsp.getTlvs();
-            final String name = (tlvs != null && tlvs.getSymbolicPathName() != null) ?
-                Charsets.UTF_8.decode(ByteBuffer.wrap(tlvs.getSymbolicPathName().getPathName().getValue())).toString()
-                : lookupLspName(id);
-
-            final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.reported.lsp.PathBuilder pb = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.reported.lsp.PathBuilder();
-            // set 0 by default, as the first report does not contain LSPIdentifiersTLV
-            pb.setLspId(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.LspId(0L));
-            if (r.getPath() != null) {
-                pb.fieldsFrom(r.getPath());
-            }
-
-            final ReportedLspBuilder rlb = new ReportedLspBuilder();
-            rlb.addAugmentation(ReportedLsp1.class, new ReportedLsp1Builder().setLsp(lsp).build());
-            rlb.setPath(Collections.singletonList(pb.build()));
-            boolean solicited = false;
-
-            if (id.getValue() != 0) {
-                solicited = true;
-                final PCEPRequest req = removeRequest(name);
-                if (req != null) {
-                    LOG.debug("Request {} resulted in LSP operational state {}", id, lsp.isOperational());
-                    rlb.setMetadata(req.getMetadata());
-                    ctx.resolveRequest(req);
-                } else {
-                    LOG.warn("Request ID {} not found in outstanding DB", id);
-                }
-            }
-
-            if (!lsp.isRemove()) {
-                updateLsp(ctx, id, name, rlb, solicited, false);
-                LOG.debug("LSP {} updated", lsp);
-            } else {
-                removeLsp(ctx, id);
-                LOG.debug("LSP {} removed", lsp);
-            }
-        }
-
-        return false;
-    }
-
-    @Override
-    public synchronized ListenableFuture<OperationResult> addLsp(final AddLspArgs input) {
-        Preconditions.checkArgument(input != null && input.getName() != null && input.getNode() != null && input.getArguments() != null, MISSING_XML_TAG);
-        // Make sure there is no such LSP
-        final InstanceIdentifier<ReportedLsp> lsp = lspIdentifier(input.getName());
-        final ListenableFuture<Optional<ReportedLsp>> f = readOperationalData(lsp);
-
-        return Futures.transform(f, new AsyncFunction<Optional<ReportedLsp>, OperationResult>() {
-            @Override
-            public ListenableFuture<OperationResult> apply(final Optional<ReportedLsp> rep) {
-                if (rep.isPresent()) {
-                    LOG.debug("Node {} already contains lsp {} at {}", input.getNode(), input.getName(), lsp);
-                    return OperationResults.createUnsent(PCEPErrors.USED_SYMBOLIC_PATH_NAME).future();
-                }
-
-                final SymbolicPathNameBuilder name = new SymbolicPathNameBuilder().setPathName(new SymbolicPathName(input.getName().getBytes(Charsets.UTF_8)));
-
-                // Build the request
-                final RequestsBuilder rb = new RequestsBuilder();
-                rb.fieldsFrom(input.getArguments());
-                rb.setLspa(new LspaBuilder().setTlvs(
-                    new TlvsBuilder().addAugmentation(
-                        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs2.class,
-                        new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Tlvs2Builder().setSymbolicPathName(
-                            name.build()).build()).build()).build());
-
-                final PcinitiateMessageBuilder ib = new PcinitiateMessageBuilder(MESSAGE_HEADER);
-                ib.setRequests(Collections.singletonList(rb.build()));
-
-                // Send the message
-                return sendMessage(new PcinitiateBuilder().setPcinitiateMessage(ib.build()).build(), input.getName(),
-                    input.getArguments().getMetadata());
-            }
-        });
-    }
-
-    @Override
-    public synchronized ListenableFuture<OperationResult> removeLsp(final RemoveLspArgs input) {
-        Preconditions.checkArgument(input != null && input.getName() != null && input.getNode() != null, MISSING_XML_TAG);
-        // Make sure the LSP exists, we need it for PLSP-ID
-        final InstanceIdentifier<ReportedLsp> lsp = lspIdentifier(input.getName());
-        final ListenableFuture<Optional<ReportedLsp>> f = readOperationalData(lsp);
-
-        return Futures.transform(f, new AsyncFunction<Optional<ReportedLsp>, OperationResult>() {
-            @Override
-            public ListenableFuture<OperationResult> apply(final Optional<ReportedLsp> rep) {
-                final Lsp reportedLsp = validateReportedLsp(rep, input);
-                if (reportedLsp == null) {
-                    LOG.warn("Reported LSP does not contain LSP object.");
-                    return OperationResults.createUnsent(PCEPErrors.UNKNOWN_PLSP_ID).future();
-                }
-                // Build the request and send it
-                final UpdatesBuilder rb = new UpdatesBuilder();
-                rb.setLsp(new LspBuilder().setRemove(Boolean.TRUE).setPlspId(reportedLsp.getPlspId()).setDelegate(reportedLsp.isDelegate()).build());
-                final PcupdMessageBuilder ib = new PcupdMessageBuilder(MESSAGE_HEADER);
-                ib.setUpdates(Collections.singletonList(rb.build()));
-                return sendMessage(new PcupdBuilder().setPcupdMessage(ib.build()).build(), rep.get().getName(), null);
-            }
-        });
-    }
-
-    @Override
-    public synchronized ListenableFuture<OperationResult> updateLsp(final UpdateLspArgs input) {
-        Preconditions.checkArgument(input != null && input.getName() != null && input.getNode() != null && input.getArguments() != null, MISSING_XML_TAG);
-        // Make sure the LSP exists
-        final InstanceIdentifier<ReportedLsp> lsp = lspIdentifier(input.getName());
-        final ListenableFuture<Optional<ReportedLsp>> f = readOperationalData(lsp);
-
-        return Futures.transform(f, new AsyncFunction<Optional<ReportedLsp>, OperationResult>() {
-            @Override
-            public ListenableFuture<OperationResult> apply(final Optional<ReportedLsp> rep) {
-                final Lsp reportedLsp = validateReportedLsp(rep, input);
-                if (reportedLsp == null) {
-                    return OperationResults.createUnsent(PCEPErrors.UNKNOWN_PLSP_ID).future();
-                }
-                final Arguments2 args = input.getArguments().getAugmentation(Arguments2.class);
-                Preconditions.checkArgument(args != null, "Input is missing operational tag.");
-                Preconditions.checkArgument(input.getArguments().getEro() != null, "Input is missing ERO object.");
-                // Build the PCUpd request and send it
-                final UpdatesBuilder rb = new UpdatesBuilder();
-                rb.setLsp(new LspBuilder().setPlspId(reportedLsp.getPlspId()).setDelegate(reportedLsp.isDelegate()).setOperational(args.isOperational()).build());
-                final PathBuilder pb = new PathBuilder();
-                pb.fieldsFrom(input.getArguments());
-                rb.setPath(pb.build());
-                final PcupdMessageBuilder ub = new PcupdMessageBuilder(MESSAGE_HEADER);
-                ub.setUpdates(Collections.singletonList(rb.build()));
-                return sendMessage(new PcupdBuilder().setPcupdMessage(ub.build()).build(), rep.get().getName(), input.getArguments().getMetadata());
-            }
-        });
-    }
-
-    @Override
-    public synchronized ListenableFuture<OperationResult> ensureLspOperational(final EnsureLspOperationalInput input) {
-        Preconditions.checkArgument(input != null && input.getName() != null && input.getNode() != null && input.getArguments() != null, MISSING_XML_TAG);
-        final Boolean op;
-        final Arguments1 aa = input.getArguments().getAugmentation(Arguments1.class);
-        if (aa == null) {
-            LOG.warn("Operational status not present in MD-SAL.");
-            op = null;
-        } else {
-            op = aa.isOperational();
-        }
-
-        // Make sure the LSP exists
-        final InstanceIdentifier<ReportedLsp> lsp = lspIdentifier(input.getName());
-        LOG.debug("Checking if LSP {} has operational state {}", lsp, op);
-        final ListenableFuture<Optional<ReportedLsp>> f = readOperationalData(lsp);
-
-        return Futures.transform(f, new Function<Optional<ReportedLsp>, OperationResult>() {
-            @Override
-            public OperationResult apply(final Optional<ReportedLsp> rep) {
-                final Lsp reportedLsp = validateReportedLsp(rep, input);
-                if (reportedLsp == null) {
-                    return OperationResults.UNSENT;
-                }
-                return reportedLsp.isOperational().equals(op) ? OperationResults.SUCCESS : OperationResults.UNSENT;
-            }
-        });
-    }
-
-    @Override
-    protected Lsp validateReportedLsp(final Optional<ReportedLsp> rep, final LspId input) {
-        if (!rep.isPresent()) {
-            LOG.debug("Node {} does not contain LSP {}", input.getNode(), input.getName());
-            return null;
-        }
-        final ReportedLsp1 ra = rep.get().getAugmentation(ReportedLsp1.class);
-        if (ra == null) {
-            LOG.warn("Reported LSP reported null from data-store.");
-            return null;
-        }
-        final Lsp reportedLsp = ra.getLsp();
-        Preconditions.checkState(reportedLsp != null, "Reported LSP does not contain LSP object.");
-        return reportedLsp;
-    }
-
-    private static PeerCapabilities getCapabilities(final Stateful stateful) {
-        final PeerCapabilities capa = new PeerCapabilities();
-        capa.setStateful(true);
-        if (stateful.isLspUpdateCapability() != null) {
-            capa.setActive(stateful.isLspUpdateCapability());
-        }
-        final Stateful1 stateful1 = stateful.getAugmentation(Stateful1.class);
-        if (stateful1 != null && stateful1.isInitiation() != null) {
-            capa.setInstantiation(stateful1.isInitiation());
-        }
-        return capa;
-    }
-}
diff --git a/pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListenerFactory.java b/pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListenerFactory.java
deleted file mode 100644 (file)
index 887eee8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.bgpcep.pcep.topology.provider;
-
-@Deprecated
-public class Stateful02TopologySessionListenerFactory implements TopologySessionListenerFactory {
-    @Override
-    public final TopologySessionListener createTopologySessionListener(final ServerSessionManager manager) {
-        return new Stateful02TopologySessionListener(manager);
-    }
-}
index 68e99b9bfc73487d3c839547415ef18882eeadc7..bb79386d820a30f506b6e2cef2d676641fd1d602 100644 (file)
@@ -77,7 +77,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-final class Stateful07TopologySessionListener extends AbstractTopologySessionListener<SrpIdNumber, PlspId> {
+class Stateful07TopologySessionListener extends AbstractTopologySessionListener<SrpIdNumber, PlspId> {
     private static final Logger LOG = LoggerFactory.getLogger(Stateful07TopologySessionListener.class);
 
     private final AtomicLong requestId = new AtomicLong(1L);
diff --git a/pcep/topology-provider/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModule.java b/pcep/topology-provider/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModule.java
deleted file mode 100644 (file)
index f46b844..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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
- */
-/**
- * Generated file
-
- * Generated from: yang module name: config-pcep-topology-provider  yang module local name: pcep-topology-stateful02
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Mon Jan 27 11:08:05 CET 2014
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.pcep.topology.provider;
-
-import org.opendaylight.bgpcep.pcep.topology.provider.Stateful02TopologySessionListenerFactory;
-
-/**
- *
- */
-@Deprecated
-public final class Stateful02TopologySessionListenerModule extends
-        org.opendaylight.controller.config.yang.pcep.topology.provider.AbstractStateful02TopologySessionListenerModule {
-
-    public Stateful02TopologySessionListenerModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public Stateful02TopologySessionListenerModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final Stateful02TopologySessionListenerModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    protected void customValidation() {
-        // Add custom validation for module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new AutoCloseableStateful02TopologySessionListenerFactory();
-    }
-
-    private static final class AutoCloseableStateful02TopologySessionListenerFactory extends Stateful02TopologySessionListenerFactory
-            implements AutoCloseable {
-        @Override
-        public void close() {
-            // Nothing to do
-        }
-    }
-}
diff --git a/pcep/topology-provider/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModuleFactory.java b/pcep/topology-provider/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModuleFactory.java
deleted file mode 100644 (file)
index dfac4fc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *
- * Copyright (c) 2014 Cisco Systems, Inc. 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
- */
-/**
- * Generated file
-
- * Generated from: yang module name: config-pcep-topology-provider  yang module local name: pcep-topology-stateful02
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Mon Jan 27 11:08:05 CET 2014
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.pcep.topology.provider;
-
-/**
-*
-*/
-@Deprecated
-public class Stateful02TopologySessionListenerModuleFactory extends
-        org.opendaylight.controller.config.yang.pcep.topology.provider.AbstractStateful02TopologySessionListenerModuleFactory {
-
-}
index f719de4abad90858613bedfa0b7afbbeff5951f2..5c95b06b1f1bf4e3daf8597bd9812120f8029a24 100644 (file)
@@ -43,18 +43,6 @@ module odl-pcep-topology-provider-cfg {
         config:java-class "org.opendaylight.bgpcep.pcep.topology.provider.TopologySessionListenerFactory";
     }
 
-    identity pcep-topology-stateful02 {
-        base config:module-type;
-        config:provided-service pcep-topology-stateful;
-        config:java-name-prefix Stateful02TopologySessionListener;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case pcep-topology-stateful02 {
-            when "/config:modules/config:module/config:type = 'pcep-topology-stateful02'";
-        }
-    }
-
     identity pcep-topology-stateful07 {
         base config:module-type;
         config:provided-service pcep-topology-stateful;
diff --git a/pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListenerTest.java b/pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful02TopologySessionListenerTest.java
deleted file mode 100644 (file)
index 0827634..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.bgpcep.pcep.topology.provider;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.Lists;
-import io.netty.buffer.Unpooled;
-import io.netty.util.CharsetUtil;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.topology.rev140113.NetworkTopologyRef;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated._00.rev140113.Pcinitiate;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Arguments1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Arguments1Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Arguments2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Arguments2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Pcrpt;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PcrptBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Pcupd;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.PlspId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.SymbolicPathName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.LspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.lsp.object.lsp.TlvsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.PcrptMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.ReportsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcrpt.message.pcrpt.message.reports.PathBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.pcupd.message.pcupd.message.Updates;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.StatefulBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.symbolic.path.name.tlv.SymbolicPathNameBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.address.family.Ipv4CaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.address.family.ipv4._case.Ipv4Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.object.EndpointsObjBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Ero;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.OpenBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.AddLspInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.AddLspInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.EnsureLspOperationalInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.EnsureLspOperationalInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.Node1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.OperationResult;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.RemoveLspInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.RemoveLspInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.UpdateLspInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.UpdateLspInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.add.lsp.args.ArgumentsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.PathComputationClient;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.ReportedLsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.reported.lsp.Path;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
-
-public class Stateful02TopologySessionListenerTest extends AbstractPCEPSessionTest<Stateful02TopologySessionListenerFactory> {
-
-    private Stateful02TopologySessionListener listener;
-
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-        listener = (Stateful02TopologySessionListener) getSessionListener();
-    }
-
-    @Test
-    public void testStateful02TopologySessionListener() throws Exception {
-        this.listener.onSessionUp(this.session);
-
-        // add-lsp
-        final ArgumentsBuilder argsBuilder = new ArgumentsBuilder();
-        final Ipv4CaseBuilder ipv4Builder = new Ipv4CaseBuilder();
-        ipv4Builder.setIpv4(new Ipv4Builder().setSourceIpv4Address(new Ipv4Address(TEST_ADDRESS)).setDestinationIpv4Address(new Ipv4Address(TEST_ADDRESS)).build());
-        argsBuilder.setEndpointsObj(new EndpointsObjBuilder().setAddressFamily(ipv4Builder.build()).build());
-        final AddLspInput input = new AddLspInputBuilder().setName(TEST_LSP_NAME).setArguments(argsBuilder.build()).setNetworkTopologyRef(new NetworkTopologyRef(TOPO_IID)).setNode(NODE_ID).build();
-        this.topologyRpcs.addLsp(input);
-        assertEquals(1, this.receivedMsgs.size());
-        assertTrue(this.receivedMsgs.get(0) instanceof Pcinitiate);
-        final Pcrpt pcRpt = createPcrpt02(0L, false, null, Optional.of(TEST_LSP_NAME));
-
-        final Optional<Topology> topoOptional = getTopology();
-        assertTrue(topoOptional.isPresent());
-        Topology topology = topoOptional.get();
-        assertEquals(1, topology.getNode().size());
-        final Node1 node = topology.getNode().get(0).getAugmentation(Node1.class);
-        assertNotNull(node);
-        PathComputationClient pcc = node.getPathComputationClient();
-        assertEquals(TEST_ADDRESS, pcc.getIpAddress().getIpv4Address().getValue());
-        // reported lsp so far empty, has not received response (PcRpt) yet
-        assertTrue(pcc.getReportedLsp().isEmpty());
-        this.listener.onMessage(this.session, pcRpt);
-        // check created lsp
-        topology = getTopology().get();
-        pcc = topology.getNode().get(0).getAugmentation(Node1.class).getPathComputationClient();
-        assertEquals(1, pcc.getReportedLsp().size());
-        ReportedLsp reportedLsp = pcc.getReportedLsp().get(0);
-        assertEquals(TEST_LSP_NAME, reportedLsp.getName());
-        assertEquals(1, reportedLsp.getPath().size());
-
-        // update-lsp
-        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.update.lsp.args.ArgumentsBuilder updArgsBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.update.lsp.args.ArgumentsBuilder();
-        updArgsBuilder.setEro(createEroWithIpPrefixes(Lists.newArrayList(ERO_IP_PREFIX, DST_IP_PREFIX)));
-        updArgsBuilder.addAugmentation(Arguments2.class, new Arguments2Builder().setOperational(true).build());
-        final UpdateLspInput update = new UpdateLspInputBuilder().setArguments(updArgsBuilder.build()).setName(TEST_LSP_NAME).setNetworkTopologyRef(new NetworkTopologyRef(TOPO_IID)).setNode(NODE_ID).build();
-        this.topologyRpcs.updateLsp(update);
-        assertEquals(2, this.receivedMsgs.size());
-        assertTrue(this.receivedMsgs.get(1) instanceof Pcupd);
-        final Pcupd updateMsg = (Pcupd) this.receivedMsgs.get(1);
-        final Updates upd = updateMsg.getPcupdMessage().getUpdates().get(0);
-        final Pcrpt pcRpt2 = createPcrpt02(upd.getLsp().getPlspId().getValue(), false, upd.getPath().getEro(), Optional.<String>absent());
-        this.listener.onMessage(this.session, pcRpt2);
-        //check updated lsp
-        topology = getTopology().get();
-        pcc = topology.getNode().get(0).getAugmentation(Node1.class).getPathComputationClient();
-        assertEquals(1, pcc.getReportedLsp().size());
-        reportedLsp = pcc.getReportedLsp().get(0);
-        assertEquals(TEST_LSP_NAME, reportedLsp.getName());
-        assertEquals(1, reportedLsp.getPath().size());
-        Path path = reportedLsp.getPath().get(0);
-        assertEquals(2, path.getEro().getSubobject().size());
-        assertEquals(DST_IP_PREFIX, getLastEroIpPrefix(path.getEro()));
-
-        // ensure-operational
-        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.ensure.lsp.operational.args.ArgumentsBuilder ensureArgs = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.ensure.lsp.operational.args.ArgumentsBuilder();
-        ensureArgs.addAugmentation(Arguments1.class, new Arguments1Builder().setOperational(true).build());
-        final EnsureLspOperationalInput ensure = new EnsureLspOperationalInputBuilder().setArguments(ensureArgs.build()).setName(TEST_LSP_NAME).setNetworkTopologyRef(new NetworkTopologyRef(TOPO_IID)).setNode(NODE_ID).build();
-        final OperationResult result = this.topologyRpcs.ensureLspOperational(ensure).get().getResult();
-        //check result
-        assertNull(result.getFailure());
-
-        // remove-lsp
-        final RemoveLspInput remove = new RemoveLspInputBuilder().setName(TEST_LSP_NAME).setNetworkTopologyRef(new NetworkTopologyRef(TOPO_IID)).setNode(NODE_ID).build();
-        this.topologyRpcs.removeLsp(remove);
-        assertEquals(3, this.receivedMsgs.size());
-        assertTrue(this.receivedMsgs.get(2) instanceof Pcupd);
-        final Pcupd pcUpd2 = (Pcupd) this.receivedMsgs.get(2);
-        final Updates upd2 = pcUpd2.getPcupdMessage().getUpdates().get(0);
-        final Pcrpt pcRpt3 = createPcrpt02(upd2.getLsp().getPlspId().getValue(), true, null, Optional.<String>absent());
-        this.listener.onMessage(this.session, pcRpt3);
-        // check if lsp was removed
-        topology = getTopology().get();
-        pcc = topology.getNode().get(0).getAugmentation(Node1.class).getPathComputationClient();
-        assertEquals(0, pcc.getReportedLsp().size());
-    }
-
-    private Pcrpt createPcrpt02(final long plspId, final boolean remove, final Ero ero, final Optional<String> spn) {
-        final ReportsBuilder rptBuilder = new ReportsBuilder();
-        final TlvsBuilder tlvsBuilder = new TlvsBuilder();
-        if (spn.isPresent()) {
-            tlvsBuilder.setSymbolicPathName(new SymbolicPathNameBuilder().setPathName(new SymbolicPathName(Unpooled.wrappedBuffer(CharsetUtil.UTF_8.encode(spn.get())).array())).build());
-        }
-        rptBuilder.setLsp(new LspBuilder().setDelegate(true).setOperational(true).setPlspId(new PlspId(plspId)).setRemove(remove).setSync(true).setTlvs(tlvsBuilder.build()).build());
-        rptBuilder.setPath(new PathBuilder().setEro(ero).build());
-        return new PcrptBuilder().setPcrptMessage(new PcrptMessageBuilder().setReports(Lists.newArrayList(rptBuilder.build())).build()).build();
-    }
-
-    @Override
-    protected Open getLocalPref() {
-        return new OpenBuilder(super.getLocalPref()).setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.TlvsBuilder().addAugmentation(Tlvs2.class, new Tlvs2Builder().setStateful(new StatefulBuilder().build()).build()).build()).build();
-    }
-
-}
index b15b691e2983c4c122d864829ae2c406fb77f3f1..efca708b4e6574492f2a0db769ddc179852ca58c 100644 (file)
@@ -5,7 +5,6 @@
  * 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.bgpcep.pcep.topology.provider;
 
 import com.google.common.util.concurrent.ListenableFuture;
@@ -23,9 +22,9 @@ import org.mockito.stubbing.Answer;
 import org.opendaylight.bgpcep.pcep.topology.provider.TopologyProgrammingTest.MockedTopologySessionListenerFactory;
 import org.opendaylight.bgpcep.programming.spi.Instruction;
 import org.opendaylight.bgpcep.programming.spi.InstructionScheduler;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.Tlvs2Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.stateful._02.rev140110.stateful.capability.tlv.StatefulBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.Tlvs1;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.Tlvs1Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.stateful.capability.tlv.StatefulBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.OpenBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.InstructionStatus;
@@ -52,7 +51,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 public class TopologyProgrammingTest extends AbstractPCEPSessionTest<MockedTopologySessionListenerFactory> {
 
     private static final String NAME = "test-tunnel";
-    private static Stateful02TopologySessionListener listener;
+    private static Stateful07TopologySessionListener listener;
 
     @Mock
     private InstructionScheduler scheduler;
@@ -209,13 +208,13 @@ public class TopologyProgrammingTest extends AbstractPCEPSessionTest<MockedTopol
     protected static final class MockedTopologySessionListenerFactory implements TopologySessionListenerFactory {
         @Override
         public TopologySessionListener createTopologySessionListener(final ServerSessionManager manager) {
-            listener = Mockito.spy(new Stateful02TopologySessionListener(manager));
+            listener = Mockito.spy(new Stateful07TopologySessionListener(manager));
             return listener;
         }
     }
 
     @Override
     protected Open getLocalPref() {
-        return new OpenBuilder(super.getLocalPref()).setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.TlvsBuilder().addAugmentation(Tlvs2.class, new Tlvs2Builder().setStateful(new StatefulBuilder().build()).build()).build()).build();
+        return new OpenBuilder(super.getLocalPref()).setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.TlvsBuilder().addAugmentation(Tlvs1.class, new Tlvs1Builder().setStateful(new StatefulBuilder().build()).build()).build()).build();
     }
 }
index d7444853dfa588f9709d89c836e13927fef79de0..5ebee6f2b476f1d759e6f335a04e0d9f8dc91d6e 100644 (file)
@@ -26,7 +26,7 @@ import org.opendaylight.controller.config.yang.pcep.impl.PCEPDispatcherImplModul
 import org.opendaylight.controller.config.yang.pcep.impl.PCEPDispatcherImplModuleMXBean;
 import org.opendaylight.controller.config.yang.pcep.impl.PCEPSessionProposalFactoryImplModuleFactory;
 import org.opendaylight.controller.config.yang.pcep.spi.SimplePCEPExtensionProviderContextModuleFactory;
-import org.opendaylight.controller.config.yang.pcep.stateful02.cfg.Stateful02PCEPSessionProposalFactoryModuleFactory;
+import org.opendaylight.controller.config.yang.pcep.stateful07.cfg.Stateful07PCEPSessionProposalFactoryModuleFactory;
 import org.opendaylight.controller.config.yang.programming.impl.AbstractInstructionSchedulerTest;
 import org.opendaylight.controller.config.yang.tcpmd5.jni.cfg.NativeKeyAccessFactoryModuleFactory;
 import org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.MD5ServerChannelFactoryModuleFactory;
@@ -41,7 +41,7 @@ public class PCEPTopologyProviderModuleTest extends AbstractInstructionScheduler
 
     private static final String FACTORY_NAME = PCEPTopologyProviderModuleFactory.NAME;
     private static final String INSTANCE_NAME = "pcep-topology-provider-instance";
-    private static final String STATEFUL02_TOPOLOGY_INSTANCE_NAME = "pcep-topology-stateful02-instance";
+    private static final String STATEFUL07_TOPOLOGY_INSTANCE_NAME = "pcep-topology-stateful07-instance";
 
     private static final String LISTEN_ADDRESS = "0.0.0.0";
     private static final PortNumber LISTEN_PORT = new PortNumber(4189);
@@ -158,8 +158,8 @@ public class PCEPTopologyProviderModuleTest extends AbstractInstructionScheduler
         mxBean.setListenPort(getRandomPortNumber());
         mxBean.setRpcRegistry(bindingBrokerON);
         mxBean.setScheduler(schedulerON);
-        mxBean.setStatefulPlugin(transaction.createModule(Stateful02TopologySessionListenerModuleFactory.NAME,
-                STATEFUL02_TOPOLOGY_INSTANCE_NAME));
+        mxBean.setStatefulPlugin(transaction.createModule(Stateful07TopologySessionListenerModuleFactory.NAME,
+                STATEFUL07_TOPOLOGY_INSTANCE_NAME));
         mxBean.setTopologyId(TOPOLOGY_ID);
         return objectName;
     }
@@ -201,8 +201,8 @@ public class PCEPTopologyProviderModuleTest extends AbstractInstructionScheduler
         mxBean.setRpcRegistry(bindingBrokerON);
         mxBean.setScheduler(createInstructionSchedulerModuleInstance(transaction, asyncDataBrokerON, bindingBrokerON,
                 notificationBrokerON));
-        mxBean.setStatefulPlugin(transaction.createModule(Stateful02TopologySessionListenerModuleFactory.NAME,
-                STATEFUL02_TOPOLOGY_INSTANCE_NAME));
+        mxBean.setStatefulPlugin(transaction.createModule(Stateful07TopologySessionListenerModuleFactory.NAME,
+                STATEFUL07_TOPOLOGY_INSTANCE_NAME));
         mxBean.setTopologyId(topologyId);
         return objectName;
     }
@@ -215,8 +215,8 @@ public class PCEPTopologyProviderModuleTest extends AbstractInstructionScheduler
         moduleFactories.add(new PCEPSessionProposalFactoryImplModuleFactory());
         moduleFactories.add(new NettyThreadgroupModuleFactory());
         moduleFactories.add(new SimplePCEPExtensionProviderContextModuleFactory());
-        moduleFactories.add(new Stateful02TopologySessionListenerModuleFactory());
-        moduleFactories.add(new Stateful02PCEPSessionProposalFactoryModuleFactory());
+        moduleFactories.add(new Stateful07TopologySessionListenerModuleFactory());
+        moduleFactories.add(new Stateful07PCEPSessionProposalFactoryModuleFactory());
         moduleFactories.add(new NativeKeyAccessFactoryModuleFactory());
         moduleFactories.add(new MD5ServerChannelFactoryModuleFactory());
         return moduleFactories;
diff --git a/pcep/topology-provider/src/test/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModuleTest.java b/pcep/topology-provider/src/test/java/org/opendaylight/controller/config/yang/pcep/topology/provider/Stateful02TopologySessionListenerModuleTest.java
deleted file mode 100644 (file)
index 416e727..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.config.yang.pcep.topology.provider;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.controller.config.api.jmx.CommitStatus;
-import org.opendaylight.controller.config.manager.impl.AbstractConfigTest;
-import org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver;
-import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
-
-public class Stateful02TopologySessionListenerModuleTest extends AbstractConfigTest {
-
-    private static final String FACTORY_NAME = Stateful02TopologySessionListenerModuleFactory.NAME;
-    private static final String INSTANCE_NAME = "pcep-topology-stateful02-instance";
-
-    @Before
-    public void setUp() throws Exception {
-        super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext, new Stateful02TopologySessionListenerModuleFactory()));
-    }
-
-    @Test
-    public void testCreateBean() throws Exception {
-        CommitStatus status = createInstance();
-        assertBeanCount(1, FACTORY_NAME);
-        assertStatus(status, 1, 0, 0);
-    }
-
-    @Test
-    public void testReusingOldInstance() throws Exception {
-        createInstance();
-        ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
-        assertBeanCount(1, FACTORY_NAME);
-        CommitStatus status = transaction.commit();
-        assertBeanCount(1, FACTORY_NAME);
-        assertStatus(status, 0, 0, 1);
-    }
-
-    private CommitStatus createInstance() throws Exception {
-        ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
-        transaction.createModule(FACTORY_NAME, INSTANCE_NAME);
-        return transaction.commit();
-    }
-}
index 0ee665e285f3f0b52ccbedb111b01c849096b620..6deb09182508e7a5b5c49d72d6c55fc7ebd107b0 100644 (file)
             <groupId>${project.groupId}</groupId>
             <artifactId>pcep-topology-spi</artifactId>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-ietf-stateful02</artifactId>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>pcep-ietf-stateful07</artifactId>
             <artifactId>programming-impl</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>pcep-ietf-stateful02</artifactId>
-            <type>test-jar</type>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>pcep-topology-provider</artifactId>
index 37ef71b0bec2d34ab4df52267679f18ad72e52f4..236ac0128047df1dcc2c21d97550a24b1359564b 100644 (file)
@@ -21,11 +21,11 @@ import org.opendaylight.controller.config.yang.netty.threadgroup.NettyThreadgrou
 import org.opendaylight.controller.config.yang.pcep.impl.PCEPDispatcherImplModuleFactory;
 import org.opendaylight.controller.config.yang.pcep.impl.PCEPSessionProposalFactoryImplModuleFactory;
 import org.opendaylight.controller.config.yang.pcep.spi.SimplePCEPExtensionProviderContextModuleFactory;
-import org.opendaylight.controller.config.yang.pcep.stateful02.cfg.Stateful02PCEPSessionProposalFactoryModuleFactory;
+import org.opendaylight.controller.config.yang.pcep.stateful07.cfg.Stateful07PCEPSessionProposalFactoryModuleFactory;
 import org.opendaylight.controller.config.yang.pcep.topology.provider.PCEPTopologyProviderModuleFactory;
 import org.opendaylight.controller.config.yang.pcep.topology.provider.PCEPTopologyProviderModuleMXBean;
 import org.opendaylight.controller.config.yang.pcep.topology.provider.PCEPTopologyProviderModuleTest;
-import org.opendaylight.controller.config.yang.pcep.topology.provider.Stateful02TopologySessionListenerModuleFactory;
+import org.opendaylight.controller.config.yang.pcep.topology.provider.Stateful07TopologySessionListenerModuleFactory;
 import org.opendaylight.controller.config.yang.programming.impl.AbstractInstructionSchedulerTest;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
 
@@ -117,8 +117,8 @@ public class PCEPTunnelTopologyProviderModuleTest extends AbstractInstructionSch
         moduleFactories.add(new PCEPSessionProposalFactoryImplModuleFactory());
         moduleFactories.add(new NettyThreadgroupModuleFactory());
         moduleFactories.add(new SimplePCEPExtensionProviderContextModuleFactory());
-        moduleFactories.add(new Stateful02TopologySessionListenerModuleFactory());
-        moduleFactories.add(new Stateful02PCEPSessionProposalFactoryModuleFactory());
+        moduleFactories.add(new Stateful07TopologySessionListenerModuleFactory());
+        moduleFactories.add(new Stateful07PCEPSessionProposalFactoryModuleFactory());
         return moduleFactories;
     }