Merge "Fix null value put in FRM incativeFlows hash map"
authorJason Ye <yisye@cisco.com>
Thu, 11 Jul 2013 17:49:52 +0000 (17:49 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 11 Jul 2013 17:49:52 +0000 (17:49 +0000)
60 files changed:
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Match.java
opendaylight/sal/yang-prototype/code-generator/binding-generator-api/pom.xml
opendaylight/sal/yang-prototype/code-generator/binding-generator-impl/pom.xml
opendaylight/sal/yang-prototype/code-generator/binding-generator-spi/pom.xml
opendaylight/sal/yang-prototype/code-generator/binding-generator-util/pom.xml
opendaylight/sal/yang-prototype/code-generator/binding-java-api-generator/pom.xml
opendaylight/sal/yang-prototype/code-generator/binding-model-api/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-sal-api-gen-plugin/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/AdditionalConfig/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/Correct/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/GenerateTest1/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/GenerateTest2/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/Generator/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/MissingYangInDep/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/NoGenerators/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/NoOutputDir/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/NoYangFiles/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/UnknownGenerator/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/resources/YangRootNotExist/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin/pom.xml
opendaylight/sal/yang-prototype/code-generator/maven-yang/pom.xml
opendaylight/sal/yang-prototype/code-generator/pom.xml
opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/pom.xml
opendaylight/sal/yang-prototype/code-generator/samples/modeling-sample/pom.xml
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-api/pom.xml
opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/pom.xml
opendaylight/sal/yang-prototype/concepts-lang/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/Acceptor.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/AggregateTransformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/CompositeClassBasedTransformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/CompositeConditionalTransformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/InputClassBasedTransformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/RuleBasedTransformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/SimpleConditionalTransformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/Transformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/model/pom.xml
opendaylight/sal/yang-prototype/pom.xml
opendaylight/sal/yang-prototype/sal/pom.xml
opendaylight/sal/yang-prototype/sal/sal-binding-api/pom.xml
opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/pom.xml
opendaylight/sal/yang-prototype/sal/sal-binding-spi/pom.xml
opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/DataDomToJavaTransformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/JavaToDataDomTransformer.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/sal/sal-broker-impl/pom.xml
opendaylight/sal/yang-prototype/sal/sal-common-util/pom.xml
opendaylight/sal/yang-prototype/sal/sal-common/pom.xml
opendaylight/sal/yang-prototype/sal/sal-core-api/pom.xml
opendaylight/sal/yang-prototype/sal/sal-core-demo/pom.xml
opendaylight/sal/yang-prototype/sal/sal-schema-repository-api/pom.xml
opendaylight/sal/yang-prototype/yang/pom.xml
opendaylight/sal/yang-prototype/yang/yang-binding/pom.xml
opendaylight/sal/yang-prototype/yang/yang-common/pom.xml
opendaylight/sal/yang-prototype/yang/yang-data-api/pom.xml
opendaylight/sal/yang-prototype/yang/yang-data-impl/pom.xml
opendaylight/sal/yang-prototype/yang/yang-data-util/pom.xml
opendaylight/sal/yang-prototype/yang/yang-ext/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/yang/yang-ext/src/main/yang/yang-ext.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/yang/yang-model-api/pom.xml
opendaylight/sal/yang-prototype/yang/yang-model-util/pom.xml

index f31e079bc7705e64bb7c5aa80bc8afdf9d53256f..c7439edc2e7b7b62bc3e7a0b13cc4ccb214dc894 100644 (file)
@@ -16,6 +16,7 @@ import java.nio.ByteBuffer;
 import java.util.Arrays;
 
 import org.opendaylight.controller.sal.utils.HexEncode;
+import org.opendaylight.controller.sal.utils.NetUtils;
 import org.openflow.protocol.OFMatch;
 import org.openflow.util.U16;
 import org.openflow.util.U8;
@@ -201,17 +202,15 @@ public class V6Match extends OFMatch implements Cloneable {
         }
 
         this.dataLayerSourceMask = null;
-        if (match.getDataLayerSource() != null) {
+        if (match.getDataLayerSource() != null && !NetUtils.isZeroMAC(match.getDataLayerSource())) {
             this.setDataLayerSource(match.getDataLayerSource(), null);
         } else {
-            this.dataLayerSource = null;
             this.dlSourceState = MatchFieldState.MATCH_ABSENT;
         }
         this.dataLayerDestinationMask = null;
-        if (match.getDataLayerDestination() != null) {
+        if (match.getDataLayerDestination() != null && !NetUtils.isZeroMAC(match.getDataLayerDestination())) {
             this.setDataLayerDestination(match.getDataLayerDestination(), null);
         } else {
-            this.dataLayerDestination = null;
             this.dlDestState = MatchFieldState.MATCH_ABSENT;
         }
 
@@ -1370,4 +1369,122 @@ public class V6Match extends OFMatch implements Cloneable {
         }
         return nbytes;
     }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + Arrays.hashCode(dataLayerDestinationMask);
+        result = prime * result + Arrays.hashCode(dataLayerSourceMask);
+        result = prime * result + dataLayerTypeMask;
+        result = prime * result + dataLayerVirtualLanMask;
+        result = prime * result + dataLayerVirtualLanPriorityCodePointMask;
+        result = prime * result + ((dlDestState == null) ? 0 : dlDestState.hashCode());
+        result = prime * result + ((dlSourceState == null) ? 0 : dlSourceState.hashCode());
+        result = prime * result + ((dlVlanState == null) ? 0 : dlVlanState.hashCode());
+        result = prime * result + dstIPv6SubnetMaskbits;
+        result = prime * result + ((ethTypeState == null) ? 0 : ethTypeState.hashCode());
+        result = prime * result + inputPortMask;
+        result = prime * result + ((inputPortState == null) ? 0 : inputPortState.hashCode());
+        result = prime * result + match_len;
+        result = prime * result + ((networkDestinationMask == null) ? 0 : networkDestinationMask.hashCode());
+        result = prime * result + networkProtocolMask;
+        result = prime * result + ((networkSourceMask == null) ? 0 : networkSourceMask.hashCode());
+        result = prime * result + networkTypeOfServiceMask;
+        result = prime * result + ((nwDst == null) ? 0 : nwDst.hashCode());
+        result = prime * result + ((nwDstState == null) ? 0 : nwDstState.hashCode());
+        result = prime * result + ((nwProtoState == null) ? 0 : nwProtoState.hashCode());
+        result = prime * result + ((nwSrc == null) ? 0 : nwSrc.hashCode());
+        result = prime * result + ((nwSrcState == null) ? 0 : nwSrcState.hashCode());
+        result = prime * result + ((nwTosState == null) ? 0 : nwTosState.hashCode());
+        result = prime * result + pad_size;
+        result = prime * result + srcIPv6SubnetMaskbits;
+        result = prime * result + ((tpDstState == null) ? 0 : tpDstState.hashCode());
+        result = prime * result + ((tpSrcState == null) ? 0 : tpSrcState.hashCode());
+        result = prime * result + transportDestinationMask;
+        result = prime * result + transportSourceMask;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        V6Match other = (V6Match) obj;
+        if (!Arrays.equals(dataLayerDestinationMask, other.dataLayerDestinationMask))
+            return false;
+        if (!Arrays.equals(dataLayerSourceMask, other.dataLayerSourceMask))
+            return false;
+        if (dataLayerTypeMask != other.dataLayerTypeMask)
+            return false;
+        if (dataLayerVirtualLanMask != other.dataLayerVirtualLanMask)
+            return false;
+        if (dataLayerVirtualLanPriorityCodePointMask != other.dataLayerVirtualLanPriorityCodePointMask)
+            return false;
+        if (dlDestState != other.dlDestState)
+            return false;
+        if (dlSourceState != other.dlSourceState)
+            return false;
+        if (dlVlanState != other.dlVlanState)
+            return false;
+        if (dstIPv6SubnetMaskbits != other.dstIPv6SubnetMaskbits)
+            return false;
+        if (ethTypeState != other.ethTypeState)
+            return false;
+        if (inputPortMask != other.inputPortMask)
+            return false;
+        if (inputPortState != other.inputPortState)
+            return false;
+        if (match_len != other.match_len)
+            return false;
+        if (networkDestinationMask == null) {
+            if (other.networkDestinationMask != null)
+                return false;
+        } else if (!networkDestinationMask.equals(other.networkDestinationMask))
+            return false;
+        if (networkProtocolMask != other.networkProtocolMask)
+            return false;
+        if (networkSourceMask == null) {
+            if (other.networkSourceMask != null)
+                return false;
+        } else if (!networkSourceMask.equals(other.networkSourceMask))
+            return false;
+        if (networkTypeOfServiceMask != other.networkTypeOfServiceMask)
+            return false;
+        if (nwDst == null) {
+            if (other.nwDst != null)
+                return false;
+        } else if (!nwDst.equals(other.nwDst))
+            return false;
+        if (nwDstState != other.nwDstState)
+            return false;
+        if (nwProtoState != other.nwProtoState)
+            return false;
+        if (nwSrc == null) {
+            if (other.nwSrc != null)
+                return false;
+        } else if (!nwSrc.equals(other.nwSrc))
+            return false;
+        if (nwSrcState != other.nwSrcState)
+            return false;
+        if (nwTosState != other.nwTosState)
+            return false;
+        if (pad_size != other.pad_size)
+            return false;
+        if (srcIPv6SubnetMaskbits != other.srcIPv6SubnetMaskbits)
+            return false;
+        if (tpDstState != other.tpDstState)
+            return false;
+        if (tpSrcState != other.tpSrcState)
+            return false;
+        if (transportDestinationMask != other.transportDestinationMask)
+            return false;
+        if (transportSourceMask != other.transportSourceMask)
+            return false;
+        return true;
+    }
 }
index be718c00a9c6e2616577511243868b1c30a10690..979dc565506e7b626f579b7b7a521289f79a233f 100644 (file)
@@ -3,7 +3,7 @@
   <parent>\r
     <groupId>org.opendaylight.controller</groupId>\r
     <artifactId>binding-generator</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
+    <version>0.5.4-SNAPSHOT</version>\r
   </parent>\r
   <artifactId>binding-generator-api</artifactId>\r
   <dependencies>\r
@@ -16,4 +16,4 @@
       <artifactId>yang-model-api</artifactId>\r
       </dependency>\r
   </dependencies>\r
-</project>
\ No newline at end of file
+</project>\r
index 57fbd2c67bce9220d80d66b35d0695598f9e3a34..3d1a29a265af0a469592c519bf197f589774932c 100644 (file)
@@ -3,7 +3,7 @@
   <parent>\r
     <groupId>org.opendaylight.controller</groupId>\r
     <artifactId>binding-generator</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
+    <version>0.5.4-SNAPSHOT</version>\r
   </parent>\r
   <artifactId>binding-generator-impl</artifactId>\r
   <dependencies>\r
@@ -33,4 +33,4 @@
        <version>2.1</version>\r
       </dependency>\r
   </dependencies>\r
-</project>
\ No newline at end of file
+</project>\r
index 35cda9e2e31a8e551deb7ecc2372378256ff21f3..3acae11f8108415f36e1d380ea22b50d80dc5978 100644 (file)
@@ -3,7 +3,7 @@
   <parent>\r
     <groupId>org.opendaylight.controller</groupId>\r
     <artifactId>binding-generator</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
+    <version>0.5.4-SNAPSHOT</version>\r
   </parent>\r
   <artifactId>binding-generator-spi</artifactId>\r
   <dependencies>\r
@@ -16,4 +16,4 @@
           <artifactId>yang-model-api</artifactId>\r
       </dependency>\r
   </dependencies>\r
-</project>
\ No newline at end of file
+</project>\r
index 944f3dde6565daf8ab2d9212579203a8b3666e11..44e38c6885618ea7bfd7c949b3e004ffd3960aa8 100644 (file)
@@ -3,7 +3,7 @@
   <parent>\r
     <groupId>org.opendaylight.controller</groupId>\r
     <artifactId>binding-generator</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
+    <version>0.5.4-SNAPSHOT</version>\r
   </parent>\r
   <artifactId>binding-generator-util</artifactId>\r
   <dependencies>\r
@@ -24,4 +24,4 @@
        <artifactId>yang-binding</artifactId>\r
       </dependency>\r
   </dependencies>\r
-</project>
\ No newline at end of file
+</project>\r
index a26444b202c3503169653ca814f12deff1e4c93d..fad725b1f8d51cc9d428f54003961c8ab3f13b41 100644 (file)
@@ -1,29 +1,29 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>binding-generator</artifactId>\r
-               <version>0.5.3-SNAPSHOT</version>\r
-       </parent>\r
-       <artifactId>binding-java-api-generator</artifactId>\r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>binding-model-api</artifactId>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>binding-generator-impl</artifactId>\r
-                       <scope>test</scope>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>binding-generator-util</artifactId>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>junit</groupId>\r
-                       <artifactId>junit</artifactId>\r
-               </dependency>\r
-       </dependencies>\r
-</project>
\ No newline at end of file
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>binding-generator</artifactId>\r
+        <version>0.5.4-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>binding-java-api-generator</artifactId>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>binding-model-api</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>binding-generator-impl</artifactId>\r
+            <scope>test</scope>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>binding-generator-util</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>junit</groupId>\r
+            <artifactId>junit</artifactId>\r
+        </dependency>\r
+    </dependencies>\r
+</project>\r
index 203b5bda94bfdebf3b5890691d193233548e4741..f9f4c8398bbdda2215112294ebf9cfac8b64d1c5 100644 (file)
@@ -3,7 +3,7 @@
   <parent>\r
     <groupId>org.opendaylight.controller</groupId>\r
     <artifactId>binding-generator</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
+    <version>0.5.4-SNAPSHOT</version>\r
   </parent>\r
   <artifactId>binding-model-api</artifactId>\r
-</project>
\ No newline at end of file
+</project>\r
index 757b41735d4e86f0c040b43b1fdfc6b7c76e9709..266da1b173296ff86cb65ede06b060b047bbbc60 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>binding-generator</artifactId>
         <groupId>org.opendaylight.controller</groupId>
-        <version>0.5.3-SNAPSHOT</version>
+        <version>0.5.4-SNAPSHOT</version>
     </parent>
     <artifactId>maven-sal-api-gen-plugin</artifactId>
 
index a90b6045dc6d2277ebedc60d70b1b1a3f4ec3177..0fb693380ad65a785cad3fd35a7ed04c52c0fe54 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>yang</artifactId>
         <groupId>org.opendaylight.controller</groupId>
-        <version>0.5.3-SNAPSHOT</version>
+        <version>0.5.4-SNAPSHOT</version>
         <relativePath>../../yang/pom.xml</relativePath>
     </parent>
     <artifactId>yang-maven-plugin-it</artifactId>
@@ -34,4 +34,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
index 2f732834beb3e72c6ba0e78b0d54b4f3aef1366c..c871bb13345145357fd0b6654def0ec21bc1ced2 100644 (file)
@@ -3,14 +3,14 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.opendaylight.controller</groupId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
     <artifactId>test</artifactId>
 
     <dependencies>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>yang-maven-plugin-spi</artifactId>
-            <version>0.5.3-SNAPSHOT</version>
+            <version>0.5.4-SNAPSHOT</version>
         </dependency>
     </dependencies>
 
@@ -19,7 +19,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -56,7 +56,7 @@
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index bb478d566cbcae42fb4f7dabf2f497a0a5ed0d18..1deb2020a9cad2604e5eb0754bdf601e25576d92 100644 (file)
@@ -3,14 +3,14 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.opendaylight.controller</groupId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
     <artifactId>test</artifactId>
 
     <dependencies>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>yang-maven-plugin-spi</artifactId>
-            <version>0.5.3-SNAPSHOT</version>
+            <version>0.5.4-SNAPSHOT</version>
         </dependency>
     </dependencies>
 
@@ -19,7 +19,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -43,7 +43,7 @@
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 77d0b7fac27e872f22be5f054ceed802dd74aa0e..5842b0bdaa331ecb0e334c084245d77e056d7c03 100644 (file)
@@ -4,14 +4,14 @@
 
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>generator-test1</artifactId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
 
     <build>
         <plugins>
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -35,7 +35,7 @@
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index a645bd03237fb05968a3f76dd21d07e412dc3bfa..501fd1d90395e2a13647dc09951822c5a69fbb34 100644 (file)
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.opendaylight.controller</groupId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
     <artifactId>generator-test2</artifactId>
 
 
@@ -11,9 +11,9 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>generator-test1</artifactId>
-            <version>0.5.3-SNAPSHOT</version>
+            <version>0.5.4-SNAPSHOT</version>
             <scope>system</scope>
-            <systemPath>${project.basedir}/../GenerateTest1/target/generator-test1-0.5.3-SNAPSHOT.jar</systemPath>
+            <systemPath>${project.basedir}/../GenerateTest1/target/generator-test1-0.5.4-SNAPSHOT.jar</systemPath>
         </dependency>
     </dependencies>
 
@@ -22,7 +22,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -49,7 +49,7 @@
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index a837cf0ed2c6ca02f01fcbdc17f8161fc367b0b7..b33abb3ed0f7b38edc0d5d889b83e3b4bfb767d6 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>binding-generator</artifactId>
         <groupId>org.opendaylight.controller</groupId>
-        <version>0.5.3-SNAPSHOT</version>
+        <version>0.5.4-SNAPSHOT</version>
     </parent>
     <artifactId>test</artifactId>
 
@@ -13,7 +13,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
index 64c66de30e4d8d74792233b1454562959ccaf0db..6e25e48958a13433ad800cc9f521ad4e0f39f74c 100644 (file)
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.opendaylight.controller</groupId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
     <artifactId>generator-test2</artifactId>
 
 
@@ -12,7 +12,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -49,7 +49,7 @@
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
index 85c06d09690e36aaa39f17fd42579c2327218c6b..5349154f2b12d6c76574cc13f7794e0ce37c9a34 100644 (file)
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
 
         <groupId>org.opendaylight.controller</groupId>
-        <version>0.5.3-SNAPSHOT</version>
+        <version>0.5.4-SNAPSHOT</version>
     <artifactId>test</artifactId>
 
     <build>
@@ -11,7 +11,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
index 4db73b913c8655cbff225cc624a12e252542d1c2..b73a53e30c6b9638e7b6e250186593b23a9d2f6c 100644 (file)
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.opendaylight.controller</groupId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
 
     <artifactId>test</artifactId>
 
@@ -12,7 +12,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
index 6355fbd29ea27b088b25ec0ec6a46b52a4ce8dc8..df7519ece744135dfc39cb1afd4e3a4449fd4866 100644 (file)
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.opendaylight.controller</groupId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
 
     <artifactId>test</artifactId>
 
@@ -12,7 +12,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
index 8a30f4a1b73148d2866a109ce7e5be90963cfcd9..e8b6ecac6e600776ecaa8290f9afa0ee24411bd4 100644 (file)
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.opendaylight.controller</groupId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
 
     <artifactId>test</artifactId>
 
@@ -12,7 +12,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>yang-maven-plugin-spi</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>test-jar</type>
                     </dependency>
                 </dependencies>
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
index 858a4535fdaf22d5cbe7732e2ff43444f2ede9fb..af11a69f10bf88832e5e500fc771b0c1c5eecd32 100644 (file)
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.opendaylight.controller</groupId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
 
     <artifactId>test</artifactId>
 
@@ -12,7 +12,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -37,4 +37,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
index 33689b131581c8d8df9c32d281d32796c1eac2b0..8fa00dd665a6785d3b834d1aeb14ee140e105fc2 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>yang</artifactId>
         <groupId>org.opendaylight.controller</groupId>
-        <version>0.5.3-SNAPSHOT</version>
+        <version>0.5.4-SNAPSHOT</version>
         <relativePath>../../yang/pom.xml</relativePath>
     </parent>
 
index e24ee525e7924a9911a076cfc51896566965bf39..a8a45519ac814264b46917efbad1ad5c10d699e3 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>yang</artifactId>
         <groupId>org.opendaylight.controller</groupId>
-        <version>0.5.3-SNAPSHOT</version>
+        <version>0.5.4-SNAPSHOT</version>
         <relativePath>../../yang/pom.xml</relativePath>
     </parent>
     <artifactId>yang-maven-plugin-spi</artifactId>
@@ -43,4 +43,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
index fea095c4941cdbfb0808099652bdc54e32f689df..8776bd98ab02c93af7d68722ccfa34e3fda17782 100644 (file)
@@ -8,7 +8,7 @@
         <artifactId>yang-prototype</artifactId>
         <version>0.5-SNAPSHOT</version>
     </parent>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
 
     <artifactId>binding-generator</artifactId>
     <packaging>pom</packaging>
@@ -17,7 +17,7 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <!-- version of YANG tools dependencies -->
-        <yang.version>0.5.3-SNAPSHOT</yang.version>
+        <yang.version>0.5.4-SNAPSHOT</yang.version>
     </properties>
 
     <modules>
index 135d7c85a31d031b0c4f002b70948c274c1b82e6..2bdc38358f10dcc80fb0aec35a4e0df033e091e7 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>binding-generator</artifactId>
         <groupId>org.opendaylight.controller</groupId>
-        <version>0.5.3-SNAPSHOT</version>
+        <version>0.5.4-SNAPSHOT</version>
     </parent>
     <artifactId>maven-code-gen-sample</artifactId>
 
@@ -13,7 +13,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -40,7 +40,7 @@
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>maven-sal-api-gen-plugin</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>jar</type>
                     </dependency>
                 </dependencies>
             </plugin>
         </plugins>
         <pluginManagement>
-               <plugins>
-                       <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-                       <plugin>
-                               <groupId>org.eclipse.m2e</groupId>
-                               <artifactId>lifecycle-mapping</artifactId>
-                               <version>1.0.0</version>
-                               <configuration>
-                                       <lifecycleMappingMetadata>
-                                               <pluginExecutions>
-                                                       <pluginExecution>
-                                                               <pluginExecutionFilter>
-                                                                       <groupId>
-                                                                               org.opendaylight.controller
-                                                                       </groupId>
-                                                                       <artifactId>
-                                                                               yang-maven-plugin
-                                                                       </artifactId>
-                                                                       <versionRange>
-                                                                               [0.5,)
-                                                                       </versionRange>
-                                                                       <goals>
-                                                                               <goal>
-                                                                                       generate-sources
-                                                                               </goal>
-                                                                       </goals>
-                                                               </pluginExecutionFilter>
-                                                               <action>
-                                                                       <ignore></ignore>
-                                                               </action>
-                                                       </pluginExecution>
-                                               </pluginExecutions>
-                                       </lifecycleMappingMetadata>
-                               </configuration>
-                       </plugin>
-               </plugins>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse 
+                    m2e settings only. It has no influence on the Maven build itself. -->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.opendaylight.controller
+                                        </groupId>
+                                        <artifactId>
+                                            yang-maven-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [0.5,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>
+                                                generate-sources
+                                            </goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
         </pluginManagement>
     </build>
     <dependencies>
-    <dependency>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>yang-binding</artifactId>
-    <version>0.5.3-SNAPSHOT</version>
-    </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>yang-binding</artifactId>
+            <version>0.5.4-SNAPSHOT</version>
+        </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index 32dffb2e63de1d2ebd10b0eabeb220753c0056c3..1e91f7099b639e7563d180efd5564c6ceb4ed48f 100644 (file)
 <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>
-       <parent>
-               <artifactId>binding-generator</artifactId>
-               <groupId>org.opendaylight.controller</groupId>
-               <version>0.5.3-SNAPSHOT</version>
-       </parent>
-       <artifactId>modeling-sample</artifactId>
+    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>
+    <parent>
+        <artifactId>binding-generator</artifactId>
+        <groupId>org.opendaylight.controller</groupId>
+        <version>0.5.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>modeling-sample</artifactId>
 
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.opendaylight.controller</groupId>
-                               <artifactId>yang-maven-plugin</artifactId>
-                               <version>0.5.3-SNAPSHOT</version>
-                               <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>generate-sources</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <yangFilesRootDir>src/main/yang</yangFilesRootDir>
-                                                       <codeGenerators>
-                                                               <generator>
-                                                                       <codeGeneratorClass>
-                                                                               org.opendaylight.controller.maven.sal.api.gen.plugin.CodeGeneratorImpl
-                                                                       </codeGeneratorClass>
-                                                                       <outputBaseDir>
-                                                                               target/generated-sources/sal
-                                                                       </outputBaseDir>
-                                                               </generator>
-                                                       </codeGenerators>
-                                                       <inspectDependencies>false</inspectDependencies>
-                                               </configuration>
-                                       </execution>
-                               </executions>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>yang-maven-plugin</artifactId>
+                <version>0.5.4-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate-sources</goal>
+                        </goals>
+                        <configuration>
+                            <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+                            <codeGenerators>
+                                <generator>
+                                    <codeGeneratorClass>
+                                        org.opendaylight.controller.maven.sal.api.gen.plugin.CodeGeneratorImpl
+                                    </codeGeneratorClass>
+                                    <outputBaseDir>
+                                        target/generated-sources/sal
+                                    </outputBaseDir>
+                                </generator>
+                            </codeGenerators>
+                            <inspectDependencies>false</inspectDependencies>
+                        </configuration>
+                    </execution>
+                </executions>
 
-                               <dependencies>
-                                       <dependency>
-                                               <groupId>org.opendaylight.controller</groupId>
-                                               <artifactId>maven-sal-api-gen-plugin</artifactId>
-                                               <version>0.5.3-SNAPSHOT</version>
-                                               <type>jar</type>
-                                       </dependency>
-                               </dependencies>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>build-helper-maven-plugin</artifactId>
-                               <version>1.7</version>
-                               <executions>
-                                       <execution>
-                                               <phase>generate-sources</phase>
-                                               <goals>
-                                                       <goal>add-source</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <sources>
-                                                               <source>target/generated-sources/sal</source>
-                                                       </sources>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-               <pluginManagement>
-                       <plugins>
-                               <!--This plugin's configuration is used to store Eclipse m2e settings 
-                                       only. It has no influence on the Maven build itself. -->
-                               <plugin>
-                                       <groupId>org.eclipse.m2e</groupId>
-                                       <artifactId>lifecycle-mapping</artifactId>
-                                       <version>1.0.0</version>
-                                       <configuration>
-                                               <lifecycleMappingMetadata>
-                                                       <pluginExecutions>
-                                                               <pluginExecution>
-                                                                       <pluginExecutionFilter>
-                                                                               <groupId>
-                                                                                       org.opendaylight.controller
-                                                                               </groupId>
-                                                                               <artifactId>
-                                                                                       yang-maven-plugin
-                                                                               </artifactId>
-                                                                               <versionRange>
-                                                                                       [0.5,)
-                                                                               </versionRange>
-                                                                               <goals>
-                                                                                       <goal>
-                                                                                               generate-sources
-                                                                                       </goal>
-                                                                               </goals>
-                                                                       </pluginExecutionFilter>
-                                                                       <action>
-                                                                               <ignore></ignore>
-                                                                       </action>
-                                                               </pluginExecution>
-                                                       </pluginExecutions>
-                                               </lifecycleMappingMetadata>
-                                       </configuration>
-                               </plugin>
-                       </plugins>
-               </pluginManagement>
-       </build>
-       <dependencies>
-               <dependency>
-                       <groupId>org.opendaylight.controller</groupId>
-                       <artifactId>yang-binding</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.opendaylight.controller</groupId>
-                       <artifactId>yang-common</artifactId>
-               </dependency>
-       </dependencies>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.opendaylight.controller</groupId>
+                        <artifactId>maven-sal-api-gen-plugin</artifactId>
+                        <version>0.5.4-SNAPSHOT</version>
+                        <type>jar</type>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.7</version>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>target/generated-sources/sal</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+        <pluginManagement>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse 
+                    m2e settings only. It has no influence on the Maven build itself. -->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.opendaylight.controller
+                                        </groupId>
+                                        <artifactId>
+                                            yang-maven-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [0.5,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>
+                                                generate-sources
+                                            </goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>yang-binding</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>yang-common</artifactId>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
index 1c27737465cae7cf540aa359141afc5d9503c3a8..c796f34f55d6dac73f154721038deb3e86b51b2b 100644 (file)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>yang</artifactId>
-    <version>0.5.3-SNAPSHOT</version>
+    <version>0.5.4-SNAPSHOT</version>
     <relativePath>../../yang/pom.xml</relativePath>
   </parent>
   <artifactId>yang-model-parser-api</artifactId>
@@ -13,4 +13,4 @@
           <artifactId>yang-model-api</artifactId>
       </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>
index 451f3447a93cc97caa0b76a81176053967f3b521..f0ba0d298168da109f1ef7ff5455ab1310a64c24 100644 (file)
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>yang</artifactId>\r
-               <version>0.5.3-SNAPSHOT</version>\r
-               <relativePath>../../yang/pom.xml</relativePath>\r
-       </parent>\r
-       <artifactId>yang-model-parser-impl</artifactId>\r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>yang-common</artifactId>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>yang-model-api</artifactId>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>yang-model-parser-api</artifactId>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>yang-model-util</artifactId>\r
-               </dependency>\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
 \r
-               <dependency>\r
-                       <groupId>org.antlr</groupId>\r
-                       <artifactId>antlr4</artifactId>\r
-                       <version>4.0</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.slf4j</groupId>\r
-                       <artifactId>slf4j-simple</artifactId>\r
-                       <version>1.7.2</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.mockito</groupId>\r
-                       <artifactId>mockito-all</artifactId>\r
-                       <version>1.8.4</version>\r
-               </dependency>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>yang</artifactId>\r
+        <version>0.5.4-SNAPSHOT</version>\r
+        <relativePath>../../yang/pom.xml</relativePath>\r
+    </parent>\r
+\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <artifactId>yang-model-parser-impl</artifactId>\r
+\r
+    <dependencies>\r
         <dependency>\r
-          <groupId>com.google.guava</groupId>\r
-          <artifactId>guava</artifactId>\r
-          <version>14.0.1</version>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-common</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-model-api</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-model-parser-api</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-model-util</artifactId>\r
         </dependency>\r
-\r
         <dependency>\r
-               <groupId>junit</groupId>\r
-               <artifactId>junit</artifactId>\r
+            <groupId>org.antlr</groupId>\r
+            <artifactId>antlr4</artifactId>\r
+            <version>4.0</version>\r
         </dependency>\r
-       </dependencies>\r
-       <build>\r
-               <plugins>\r
-                       <plugin>\r
-                               <groupId>org.antlr</groupId>\r
-                               <artifactId>antlr4-maven-plugin</artifactId>\r
-                               <version>4.0</version>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <goals>\r
-                                                       <goal>antlr4</goal>\r
-                                               </goals>\r
-                                       </execution>\r
-                               </executions>\r
-                               <configuration>\r
-                                       <sourceDirectory>src/main/antlr</sourceDirectory>\r
-                                       <outputDirectory>target/generated-sources/parser/org/opendaylight/controller/antlrv4/code/gen</outputDirectory>\r
-                                       <visitor>true</visitor>\r
-                                       <listener>true</listener>\r
-                               </configuration>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <groupId>org.codehaus.mojo</groupId>\r
-                               <artifactId>build-helper-maven-plugin</artifactId>\r
-                               <version>1.7</version>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <phase>generate-sources</phase>\r
-                                               <goals>\r
-                                                       <goal>add-source</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <sources>\r
-                                                               <source>target/generated-sources/parser</source>\r
-                                                       </sources>\r
-                                               </configuration>\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
-               </plugins>\r
-               <pluginManagement>\r
-                       <plugins>\r
-                               <plugin>\r
-                                       <groupId>org.eclipse.m2e</groupId>\r
-                                       <artifactId>lifecycle-mapping</artifactId>\r
-                                       <version>1.0.0</version>\r
-                                       <configuration>\r
-                                               <lifecycleMappingMetadata>\r
-                                                       <pluginExecutions>\r
-                                                               <pluginExecution>\r
-                                                                       <pluginExecutionFilter>\r
-                                                                               <groupId>org.antlr</groupId>\r
-                                                                               <artifactId>antlr4-maven-plugin</artifactId>\r
-                                                                               <versionRange>[4.0,)</versionRange>\r
-                                                                               <goals>\r
-                                                                                       <goal>antlr4</goal>\r
-                                                                               </goals>\r
-                                                                       </pluginExecutionFilter>\r
-                                                                       <action>\r
-                                                                               <execute></execute>\r
-                                                                       </action>\r
-                                                               </pluginExecution>\r
-                                                       </pluginExecutions>\r
-                                               </lifecycleMappingMetadata>\r
-                                       </configuration>\r
-                               </plugin>\r
-                       </plugins>\r
-               </pluginManagement>\r
-       </build>\r
+        <dependency>\r
+            <groupId>org.slf4j</groupId>\r
+            <artifactId>slf4j-simple</artifactId>\r
+            <version>1.7.2</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.mockito</groupId>\r
+            <artifactId>mockito-all</artifactId>\r
+            <version>1.8.4</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>com.google.guava</groupId>\r
+            <artifactId>guava</artifactId>\r
+            <version>14.0.1</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>junit</groupId>\r
+            <artifactId>junit</artifactId>\r
+        </dependency>\r
+    </dependencies>\r
+\r
+    <build>\r
+        <plugins>\r
+            <plugin>\r
+                <groupId>org.antlr</groupId>\r
+                <artifactId>antlr4-maven-plugin</artifactId>\r
+                <version>4.0</version>\r
+                <executions>\r
+                    <execution>\r
+                        <goals>\r
+                            <goal>antlr4</goal>\r
+                        </goals>\r
+                    </execution>\r
+                </executions>\r
+                <configuration>\r
+                    <sourceDirectory>src/main/antlr</sourceDirectory>\r
+                    <outputDirectory>target/generated-sources/parser/org/opendaylight/controller/antlrv4/code/gen</outputDirectory>\r
+                    <visitor>true</visitor>\r
+                    <listener>true</listener>\r
+                </configuration>\r
+            </plugin>\r
+            <plugin>\r
+                <groupId>org.codehaus.mojo</groupId>\r
+                <artifactId>build-helper-maven-plugin</artifactId>\r
+                <version>1.7</version>\r
+                <executions>\r
+                    <execution>\r
+                        <phase>generate-sources</phase>\r
+                        <goals>\r
+                            <goal>add-source</goal>\r
+                        </goals>\r
+                        <configuration>\r
+                            <sources>\r
+                                <source>target/generated-sources/parser</source>\r
+                            </sources>\r
+                        </configuration>\r
+                    </execution>\r
+                </executions>\r
+            </plugin>\r
+        </plugins>\r
+        <pluginManagement>\r
+            <plugins>\r
+                <plugin>\r
+                    <groupId>org.eclipse.m2e</groupId>\r
+                    <artifactId>lifecycle-mapping</artifactId>\r
+                    <version>1.0.0</version>\r
+                    <configuration>\r
+                        <lifecycleMappingMetadata>\r
+                            <pluginExecutions>\r
+                                <pluginExecution>\r
+                                    <pluginExecutionFilter>\r
+                                        <groupId>org.antlr</groupId>\r
+                                        <artifactId>antlr4-maven-plugin</artifactId>\r
+                                        <versionRange>[4.0,)</versionRange>\r
+                                        <goals>\r
+                                            <goal>antlr4</goal>\r
+                                        </goals>\r
+                                    </pluginExecutionFilter>\r
+                                    <action>\r
+                                        <execute></execute>\r
+                                    </action>\r
+                                </pluginExecution>\r
+                            </pluginExecutions>\r
+                        </lifecycleMappingMetadata>\r
+                    </configuration>\r
+                </plugin>\r
+            </plugins>\r
+        </pluginManagement>\r
+    </build>\r
 </project>\r
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/pom.xml b/opendaylight/sal/yang-prototype/concepts-lang/pom.xml
new file mode 100644 (file)
index 0000000..68fe50d
--- /dev/null
@@ -0,0 +1,11 @@
+<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>
+    <parent>
+        <artifactId>yang-prototype</artifactId>
+        <groupId>org.opendaylight.controller</groupId>
+        <version>0.5-SNAPSHOT</version>
+    </parent>
+    <artifactId>concepts-lang</artifactId>
+    <packaging>jar</packaging>
+</project>
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/Acceptor.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/Acceptor.java
new file mode 100644 (file)
index 0000000..43b14bb
--- /dev/null
@@ -0,0 +1,20 @@
+
+/*
+ * 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.controller.concepts.lang;
+
+public interface Acceptor<I> {
+
+    /**
+     *
+     * @param input
+     * @return true if input is accepted.
+     */
+    boolean isAcceptable(I input);
+}
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/AggregateTransformer.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/AggregateTransformer.java
new file mode 100644 (file)
index 0000000..3a60894
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * 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.controller.concepts.lang;
+import java.util.Collection;
+/**
+ *
+ * @author Tony Tkacik
+ *
+ * @param <I>
+ * @param <P>
+ */
+public interface AggregateTransformer<I,P> extends Transformer<I,P> {
+
+    Collection<P> transformAll(Collection<? extends I> inputs);
+}
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/CompositeClassBasedTransformer.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/CompositeClassBasedTransformer.java
new file mode 100644 (file)
index 0000000..253ac85
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * 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.controller.concepts.lang;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+
+/**
+ * Transformer which aggregates multiple implementations of
+ * {@link InputClassBasedTransformer}.
+ *
+ * The transformation process is driven by {@link Class} of input. The selection
+ * of used {@link InputClassBasedTransformer} is done by using the {@link Class}
+ * of input as a key to select the transformer.
+ *
+ * This approach provides quick resolution of transformer, but does not support
+ * registering a super type of input to provide transformation support for all
+ * subclasses, one must register a new instance of transformer for each valid
+ * input class.
+ *
+ * If you need more flexible selection of transformation consider using
+ * {@link CompositeConditionalTransformer} which is slower but most flexible or
+ * {@link RuleBasedTransformer} which provides declarative approach for
+ * transformation.
+ *
+ * See {@link #transform(Object)} for more information about tranformation
+ * process.
+ *
+ * @author Tony Tkacik <ttkacik@cisco.com>
+ *
+ * @param <I>
+ *            Input super-type
+ * @param <P>
+ *            Product
+ */
+public abstract class CompositeClassBasedTransformer<I, P> implements
+        InputClassBasedTransformer<I, I, P>,
+        AggregateTransformer<I, P> {
+
+    private Map<Class<? extends I>, InputClassBasedTransformer<I, ? extends I, P>> transformers = new ConcurrentHashMap<Class<? extends I>, InputClassBasedTransformer<I, ? extends I, P>>();
+
+    /**
+     * Transforms an input into instance of Product class.
+     *
+     * The final registered transformer is the one which match following
+     * condition:
+     *
+     * <code>input.getClass() == transformer.getInputClass()</code>
+     *
+     * This means that transformers are not resolved by class hierarchy, only
+     * selected based on final class of the input. If you need more flexible
+     * selection of transformation consider using
+     * {@link CompositeConditionalTransformer} which is slower but more
+     * flexible.
+     *
+     */
+    @Override
+    public P transform(I input) {
+        @SuppressWarnings("unchecked")
+        InputClassBasedTransformer<I, I, P> transformer = (InputClassBasedTransformer<I, I, P>) transformers
+                .get(input.getClass());
+        if (transformer == null)
+            throw new IllegalArgumentException("Transformation of: " + input
+                    + " is not supported");
+        return transformer.transform(input);
+    }
+
+    /**
+     * Registers a new transformer.
+     *
+     * The transformer is registered for class returned by
+     * {@link InputClassBasedTransformer#getInputClass()}. Only one transformer
+     * can be registered for particular input class.
+     *
+     */
+    public void addTransformer(
+            InputClassBasedTransformer<I, ? extends I, P> transformer)
+            throws IllegalStateException {
+        if (transformer == null)
+            throw new IllegalArgumentException("Transformer should not be null");
+        if (transformer.getInputClass() == null)
+            throw new IllegalArgumentException(
+                    "Transformer should specify input class.");
+        transformers.put(transformer.getInputClass(), transformer);
+    }
+
+    /**
+     * Removes an registered transformer.
+     *
+     * Note: Removal is currently unsupported.
+     *
+     * @param transformer
+     *            Tranformer to be removed.
+     * @throws IllegalArgumentException
+     *             If the provided transformer is null or is not registered.
+     */
+    public void removeTransformer(
+            InputClassBasedTransformer<I, ? extends I, P> transformer)
+            throws IllegalArgumentException {
+        throw new UnsupportedOperationException("Not implemented yet");
+    }
+
+    @Override
+    public Collection<P> transformAll(Collection<? extends I> inputs) {
+        Collection<P> ret = new ArrayList<P>();
+        for (I i : inputs) {
+            ret.add(transform(i));
+        }
+        return ret;
+    }
+
+}
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/CompositeConditionalTransformer.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/CompositeConditionalTransformer.java
new file mode 100644 (file)
index 0000000..4bbd629
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * 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.controller.concepts.lang;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.Set;
+import java.util.TreeSet;
+
+/**
+ * Composite transformer which aggregates multiple implementation and selects
+ * the one which accepts the input.
+ *
+ *
+ * @author Tony Tkacik
+ *
+ * @param <I>
+ *            Input class for transformation
+ * @param <P>
+ *            Product of transformation
+ */
+public class CompositeConditionalTransformer<I, P> implements
+        SimpleConditionalTransformer<I, P>,
+        AggregateTransformer<I,P> {
+
+    private final Comparator<TransformerWithPriority<I, P>> comparator = new Comparator<TransformerWithPriority<I, P>>() {
+
+        @Override
+        public int compare(TransformerWithPriority<I, P> o1,
+                TransformerWithPriority<I, P> o2) {
+            return Integer.valueOf(o1.priority).compareTo(Integer.valueOf(o2.priority));
+        }
+
+    };
+    private final Set<TransformerWithPriority<I, P>> transformers;
+
+    public CompositeConditionalTransformer() {
+        // FIXME: Add Ordering
+        transformers = new TreeSet<TransformerWithPriority<I, P>>(comparator);
+    }
+
+    @Override
+    public boolean isAcceptable(I input) {
+        for (SimpleConditionalTransformer<I, P> trans : transformers) {
+            if (trans.isAcceptable(input)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public P transform(I input) {
+        for (SimpleConditionalTransformer<I, P> trans : transformers) {
+            if (trans.isAcceptable(input)) {
+                return trans.transform(input);
+            }
+        }
+        throw new IllegalStateException(
+                "Transformer for provided input is not available.");
+    }
+
+    public void addTransformer(SimpleConditionalTransformer<I, P> transformer,
+            int priority) throws IllegalStateException {
+        if (transformer == null) {
+            throw new IllegalArgumentException(
+                    "transformer should not be null.");
+        }
+        TransformerWithPriority<I, P> withPriority = new TransformerWithPriority<I, P>(
+                transformer, priority);
+        if (false == transformers.add(withPriority)) {
+            throw new IllegalStateException("transformer " + transformer
+                    + "already registered");
+        }
+    }
+
+    public void removeTransformer(SimpleConditionalTransformer<I, P> transformer)
+            throws IllegalArgumentException {
+        if (transformer == null) {
+            throw new IllegalArgumentException(
+                    "transformer should not be null.");
+        }
+        if (false == transformers.remove(transformer)) {
+            throw new IllegalStateException("transformer " + transformer
+                    + "already registered");
+        }
+    }
+
+    @Override
+    public Collection<P> transformAll(Collection<? extends I> inputs) {
+        Collection<P> ret = new ArrayList<P>();
+        for (I i : inputs) {
+            ret.add(transform(i));
+        }
+        return ret;
+    }
+
+    private static class TransformerWithPriority<I, P> implements
+            SimpleConditionalTransformer<I, P> {
+        final int priority;
+        final SimpleConditionalTransformer<I, P> transformer;
+
+        public TransformerWithPriority(
+                SimpleConditionalTransformer<I, P> transformer, int priority) {
+            this.priority = priority;
+            this.transformer = transformer;
+        }
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result
+                    + ((transformer == null) ? 0 : transformer.hashCode());
+            return result;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (obj == null)
+                return false;
+            if (getClass() != obj.getClass())
+                return false;
+            TransformerWithPriority<?,?> other = (TransformerWithPriority<?,?>) obj;
+            if (transformer == null) {
+                if (other.transformer != null)
+                    return false;
+            } else if (!transformer.equals(other.transformer))
+                return false;
+            return true;
+        }
+
+        @Override
+        public boolean isAcceptable(I input) {
+            return transformer.isAcceptable(input);
+        }
+
+        @Override
+        public P transform(I input) {
+            return transformer.transform(input);
+        }
+
+
+
+
+
+    }
+}
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/InputClassBasedTransformer.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/InputClassBasedTransformer.java
new file mode 100644 (file)
index 0000000..e6a1024
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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.controller.concepts.lang;
+/**
+ * Input class based transformer
+ *
+ * {@link Transformer} which accepts / transforms only specific classes of
+ * input, and is useful if the selection of transformer should be based on the
+ * class of the input and there is one-to-one mapping between input class and
+ * transformer.
+ *
+ *
+ * @author Tony Tkacik
+ *
+ * @param <S>
+ *            Common supertype of input
+ * @param <I>
+ *            Concrete type of input
+ * @param <P>
+ *            Product
+ */
+public interface InputClassBasedTransformer<S, I extends S, P> extends
+        Transformer<I, P> {
+
+    /**
+     * Returns an {@link Class} of input which is acceptable for transformation.
+     *
+     * @return {@link Class} of input which is acceptable for transformation.
+     */
+    Class<? extends S> getInputClass();
+}
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/RuleBasedTransformer.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/RuleBasedTransformer.java
new file mode 100644 (file)
index 0000000..12c793c
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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.controller.concepts.lang;
+import java.util.Set;
+
+/**
+ * Transformer with set of acceptance rules
+ *
+ * The transformer provides a set of {@link Acceptor}s, which could be used to
+ * verify if the input will produce result using the transformer.
+ *
+ * The transormer is able to produce result if ANY of associated
+ * {@link Acceptor}s accepted result.
+ *
+ * @author Tony Tkacik
+ *
+ * @param <I>
+ *            Input class for transformation
+ * @param <P>
+ *            Product of transformation
+ */
+public interface RuleBasedTransformer<I, P> extends Transformer<I, P> {
+
+    /**
+     * Set of {@link Acceptor}, which could be used to verify if the input is
+     * usable by transformer.
+     *
+     * The transformer is able to produce result if ANY of associated
+     * {@link Acceptor}s accepted result.
+     *
+     * @return Set of input acceptance rules associated to this transformer.
+     */
+    Set<Acceptor<I>> getRules();
+
+}
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/SimpleConditionalTransformer.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/SimpleConditionalTransformer.java
new file mode 100644 (file)
index 0000000..d514667
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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.controller.concepts.lang;
+/**
+ * Simple condition-based transformer
+ *
+ * The transformer provides {@link #isAcceptable(Object)} method,
+ * which could be used to query transformer if the input will produce
+ * result.
+ *
+ * This interface is simplified version of {@link RuleBasedTransformer} - does not
+ * provide decoupling of Acceptance rule from transformer, and should be used only
+ * for simple use-cases.
+ *
+ * @author Tony Tkacik
+ *
+ * @param <I> Input class for transformation
+ * @param <P> Product of transformation
+ */
+public interface SimpleConditionalTransformer<I,P> extends Transformer<I, P>, Acceptor<I> {
+
+
+    /**
+     * Checks if the input is acceptable
+     * for processing by the transformer.
+     *
+     * @return true it the input is acceptable for processing by transformer.
+     */
+    @Override
+    public boolean isAcceptable(I input);
+}
diff --git a/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/Transformer.java b/opendaylight/sal/yang-prototype/concepts-lang/src/main/java/org/opendaylight/controller/concepts/lang/Transformer.java
new file mode 100644 (file)
index 0000000..23f2d6a
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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.controller.concepts.lang;
+/**
+ * Factory which produces product based on input object
+ *
+ * @author Tony Tkacik
+ *
+ * @param <I> Input
+ * @param <P> Product
+ */
+public interface Transformer<I,P> {
+    /**
+     * Transforms input into instance of product.
+     *
+     * @param input Input which drives transformation
+     * @return Instance of product which was created from supplied input.
+     */
+    P transform(I input);
+}
index d5a806a7b31cf0cf66bb26005b3bc87f274be1ff..44f59bc36b915184a068859befae502189a0885d 100644 (file)
@@ -20,7 +20,7 @@
             <plugin>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
-                <version>0.5.3-SNAPSHOT</version>
+                <version>0.5.4-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
@@ -46,7 +46,7 @@
                     <dependency>
                         <groupId>org.opendaylight.controller</groupId>
                         <artifactId>maven-sal-api-gen-plugin</artifactId>
-                        <version>0.5.3-SNAPSHOT</version>
+                        <version>0.5.4-SNAPSHOT</version>
                         <type>jar</type>
                     </dependency>
                 </dependencies>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>yang-binding</artifactId>
-            <version>0.5.3-SNAPSHOT</version>
+            <version>0.5.4-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>yang-common</artifactId>
-            <version>0.5.3-SNAPSHOT</version>
+            <version>0.5.4-SNAPSHOT</version>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index 7df5bfef6ed9677a3ba11bd3110e850ad9df7f44..741e2177ff9376cb8a1b80c555ec826ea751a6ab 100644 (file)
@@ -6,6 +6,7 @@
     <version>0.5-SNAPSHOT</version>
     <packaging>pom</packaging>
     <modules>
+        <module>concepts-lang</module>
         <module>yang</module>
         <module>code-generator</module>
         <module>model</module>
index 2604a45acf5dba351021c8a8049b394bace037c4..8af01c1a164276317ef97ad7b12beda3b3ae1e7d 100644 (file)
 <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>
-       <groupId>org.opendaylight.controller</groupId>
-       <artifactId>sal</artifactId>
-       <version>1.0-SNAPSHOT</version>
-       <packaging>pom</packaging>
+    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>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>sal</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
 
-       <modules>
-               <module>sal-common</module>
-               <module>sal-common-util</module>
-               <module>sal-core-api</module>
-               <module>sal-data-api</module>
-               <module>sal-binding-api</module>
-               <module>sal-binding-spi</module>
-               <module>sal-binding-broker-impl</module>
-               <module>sal-schema-repository-api</module>
-               <module>sal-core-spi</module>
-               <module>sal-broker-impl</module>
-               <module>sal-core-demo</module>
-       </modules>
+    <modules>
+        <module>sal-common</module>
+        <module>sal-common-util</module>
+        <module>sal-core-api</module>
+        <module>sal-data-api</module>
+        <module>sal-binding-api</module>
+        <module>sal-binding-spi</module>
+        <module>sal-binding-broker-impl</module>
+        <module>sal-schema-repository-api</module>
+        <module>sal-core-spi</module>
+        <module>sal-broker-impl</module>
+    </modules>
 
-       <dependencyManagement>
-               <dependencies>
-                       <dependency>
-                               <groupId>com.google.guava</groupId>
-                               <artifactId>guava</artifactId>
-                               <version>14.0.1</version>
-                               <type>jar</type>
-                       </dependency>
-                       <dependency>
-                               <groupId>org.slf4j</groupId>
-                               <artifactId>slf4j-api</artifactId>
-                               <version>1.7.2</version>
-                       </dependency>
-                       <dependency>
-                               <groupId>junit</groupId>
-                               <artifactId>junit</artifactId>
-                               <version>4.10</version>
-                       </dependency>
-               </dependencies>
-       </dependencyManagement>
+    <properties>
+        <yang.version>0.5.4-SNAPSHOT</yang.version>
+    </properties>
 
-       <dependencies>
-               <dependency>
-                       <groupId>junit</groupId>
-                       <artifactId>junit</artifactId>
-                       <scope>test</scope>
-                       <optional>true</optional>
-               </dependency>
-               <dependency>
-                       <groupId>org.mockito</groupId>
-                       <artifactId>mockito-all</artifactId>
-                       <version>1.9.5</version>
-                       <scope>test</scope>
-               </dependency>
-       </dependencies>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-compiler-plugin</artifactId>
-                               <version>2.0</version>
-                               <inherited>true</inherited>
-                               <configuration>
-                                       <source>1.7</source>
-                                       <target>1.7</target>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-javadoc-plugin</artifactId>
-                               <version>2.8.1</version>
-                               <configuration>
-                                       <stylesheet>maven</stylesheet>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>aggregate</goal>
-                                               </goals>
-                                               <phase>site</phase>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-       </build>
-       <reporting>
-               <plugins>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>findbugs-maven-plugin</artifactId>
-                               <version>2.4.0</version>
-                               <configuration>
-                                       <effort>Max</effort>
-                                       <threshold>Low</threshold>
-                                       <goal>site</goal>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>jdepend-maven-plugin</artifactId>
-                               <version>2.0-beta-2</version>
-                       </plugin>
-               </plugins>
-       </reporting>
-</project>
\ No newline at end of file
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>com.google.guava</groupId>
+                <artifactId>guava</artifactId>
+                <version>14.0.1</version>
+                <type>jar</type>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.7.2</version>
+            </dependency>
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>4.10</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>yang-binding</artifactId>
+                <version>${yang.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>yang-common</artifactId>
+                <version>${yang.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>yang-data-api</artifactId>
+                <version>${yang.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>yang-model-api</artifactId>
+                <version>${yang.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>yang-data-util</artifactId>
+                <version>${yang.version}</version>
+            </dependency>
+        </dependencies>
+
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.9.5</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0</version>
+                <inherited>true</inherited>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.8.1</version>
+                <configuration>
+                    <stylesheet>maven</stylesheet>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>aggregate</goal>
+                        </goals>
+                        <phase>site</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <version>2.4.0</version>
+                <configuration>
+                    <effort>Max</effort>
+                    <threshold>Low</threshold>
+                    <goal>site</goal>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jdepend-maven-plugin</artifactId>
+                <version>2.0-beta-2</version>
+            </plugin>
+        </plugins>
+    </reporting>
+</project>
index b339e30070009232e6b8b05b06370a58bba7a0ec..92cfc3ba7aa61c46c72d8b6a9640663999dfeaa5 100644 (file)
@@ -1,27 +1,28 @@
-<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">\r
-  <modelVersion>4.0.0</modelVersion>\r
-  <parent>\r
-    <groupId>org.opendaylight.controller</groupId>\r
-    <artifactId>sal</artifactId>\r
-    <version>1.0-SNAPSHOT</version>\r
-  </parent>\r
-   <artifactId>sal-binding-api</artifactId>\r
-   \r
-   <dependencies>\r
-       <dependency>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>yang-common</artifactId>\r
-               <version>1.0</version>\r
-       </dependency>\r
-       <dependency>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>yang-binding</artifactId>\r
-               <version>1.0</version>\r
-       </dependency>\r
-       <dependency>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>sal-common</artifactId>\r
-               <version>1.0-SNAPSHOT</version>\r
-       </dependency>\r
-   </dependencies>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>sal</artifactId>\r
+        <version>1.0-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>sal-binding-api</artifactId>\r
+\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-common</artifactId>\r
+\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-binding</artifactId>\r
+\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-common</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+    </dependencies>
 </project>
\ No newline at end of file
index 2d427cb61fa5aa6993e4648d83a3c2d27bf3eb2d..3073bec988c128f307c82b2d7fdcc87eaa39a87a 100644 (file)
@@ -1,46 +1,46 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>sal</artifactId>\r
-               <version>1.0-SNAPSHOT</version>\r
-       </parent>\r
-       <artifactId>sal-binding-broker-impl</artifactId>\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>sal</artifactId>\r
+        <version>1.0-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>sal-binding-broker-impl</artifactId>\r
 \r
 \r
 \r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-common-util</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-binding-api</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-binding-spi</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-core-api</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-common-util</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-binding-api</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-binding-spi</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-core-api</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
 \r
-               <dependency>\r
-                       <groupId>org.slf4j</groupId>\r
-                       <artifactId>slf4j-api</artifactId>\r
-               </dependency>\r
+        <dependency>\r
+            <groupId>org.slf4j</groupId>\r
+            <artifactId>slf4j-api</artifactId>\r
+        </dependency>\r
 \r
-               <dependency>\r
-                       <groupId>com.google.guava</groupId>\r
-                       <artifactId>guava</artifactId>\r
-                       <type>jar</type>\r
-               </dependency>\r
-       </dependencies>\r
+        <dependency>\r
+            <groupId>com.google.guava</groupId>\r
+            <artifactId>guava</artifactId>\r
+            <type>jar</type>\r
+        </dependency>\r
+    </dependencies>\r
 </project>
\ No newline at end of file
index 720d1e91c36e4461398254ece06ff489240c55fa..fd7fad6f14f411c8195b8e5c292c350859b04c55 100644 (file)
@@ -1,22 +1,28 @@
-<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>
-  <parent>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>sal</artifactId>
-    <version>1.0-SNAPSHOT</version>
-  </parent>
-   <artifactId>sal-binding-spi</artifactId>
-   
-   <dependencies>
-       <dependency>
-               <groupId>org.opendaylight.controller</groupId>
-               <artifactId>sal-binding-api</artifactId>
-               <version>1.0-SNAPSHOT</version>
-       </dependency>
-       <dependency>
-               <groupId>org.opendaylight.controller</groupId>
-               <artifactId>sal-core-api</artifactId>
-               <version>1.0-SNAPSHOT</version>
-       </dependency>
-   </dependencies>
+<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>
+    <parent>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>sal</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>sal-binding-spi</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-api</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-core-api</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>concepts-lang</artifactId>
+            <version>0.5-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/DataDomToJavaTransformer.java b/opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/DataDomToJavaTransformer.java
new file mode 100644 (file)
index 0000000..db35de1
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * 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.controller.sal.binding.spi;
+
+import org.opendaylight.controller.concepts.lang.Transformer;
+import org.opendaylight.controller.yang.binding.DataObject;
+import org.opendaylight.controller.yang.common.QName;
+import org.opendaylight.controller.yang.data.api.CompositeNode;
+
+public interface DataDomToJavaTransformer<P extends DataObject> extends Transformer<CompositeNode, P> {
+
+    /**
+     * Returns a QName of valid input composite node.
+     * 
+     * @return
+     */
+    QName getQName();
+}
diff --git a/opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/JavaToDataDomTransformer.java b/opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/JavaToDataDomTransformer.java
new file mode 100644 (file)
index 0000000..3c4d486
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * 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.controller.sal.binding.spi;
+
+import org.opendaylight.controller.concepts.lang.InputClassBasedTransformer;
+import org.opendaylight.controller.yang.binding.DataObject;
+import org.opendaylight.controller.yang.data.api.CompositeNode;
+
+public interface JavaToDataDomTransformer<I extends DataObject> extends
+        InputClassBasedTransformer<DataObject, I, CompositeNode> {
+}
index c195fe4ae2c317807c2ed2d1ae77b867f55a26fe..779a6dc6ab9fffe8092a7ef9af49becce3e1b948 100644 (file)
@@ -1,36 +1,36 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>sal</artifactId>\r
-               <version>1.0-SNAPSHOT</version>\r
-       </parent>\r
-       <artifactId>sal-broker-impl</artifactId>\r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-core-api</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-common-util</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-core-spi</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.slf4j</groupId>\r
-                       <artifactId>slf4j-api</artifactId>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>com.google.guava</groupId>\r
-                       <artifactId>guava</artifactId>\r
-                       <type>jar</type>\r
-               </dependency>\r
-       </dependencies>
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>sal</artifactId>\r
+        <version>1.0-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>sal-broker-impl</artifactId>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-core-api</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-common-util</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-core-spi</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.slf4j</groupId>\r
+            <artifactId>slf4j-api</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>com.google.guava</groupId>\r
+            <artifactId>guava</artifactId>\r
+            <type>jar</type>\r
+        </dependency>\r
+    </dependencies>
 </project>
\ No newline at end of file
index b8be514c0285957bbca174570b908eff01a6180d..fedd6d12f05af7d95e1569313b304a4c990c5773 100644 (file)
@@ -1,24 +1,23 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>sal</artifactId>\r
-               <version>1.0-SNAPSHOT</version>\r
-       </parent>\r
-       <artifactId>sal-common-util</artifactId>\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>sal</artifactId>\r
+        <version>1.0-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>sal-common-util</artifactId>\r
 \r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>yang-common</artifactId>\r
-                       <version>1.0</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-common</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
-       </dependencies>
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-common</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-common</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+    </dependencies>
 
 </project>
\ No newline at end of file
index a144b542da9b6654ef6951eb08b9c27639820b35..89cf5207edda8be9125f8af4bebf501c228a8864 100644 (file)
@@ -1,14 +1,14 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>sal</artifactId>\r
-               <version>1.0-SNAPSHOT</version>\r
-       </parent>\r
-       <artifactId>sal-common</artifactId>\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>sal</artifactId>\r
+        <version>1.0-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>sal-common</artifactId>\r
 \r
-       <dependencies>\r
-       </dependencies>
+    <dependencies>\r
+    </dependencies>
 
 </project>
\ No newline at end of file
index 7ced1746fc5fd86c639b01541742d0d2b3636317..e82392d24aef70827f20838cd5e798758f63bcd7 100644 (file)
@@ -1,29 +1,27 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>sal</artifactId>\r
-               <version>1.0-SNAPSHOT</version>\r
-       </parent>\r
-       <artifactId>sal-core-api</artifactId>\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>sal</artifactId>\r
+        <version>1.0-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>sal-core-api</artifactId>\r
 \r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-common</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-common</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
 \r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>yang-data-api</artifactId>\r
-                       <version>1.0</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>yang-model-api</artifactId>\r
-                       <version>1.0</version>\r
-               </dependency>\r
-       </dependencies>
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-data-api</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-model-api</artifactId>\r
+        </dependency>\r
+    </dependencies>
 </project>
\ No newline at end of file
index a162f52d69198985ed16cc9ce3e469296a7869a4..96af32bc7ae394ba385f54b95fd8c3cbd38decfa 100644 (file)
@@ -18,7 +18,6 @@
                <dependency>\r
                        <groupId>org.opendaylight.controller</groupId>\r
                        <artifactId>yang-data-util</artifactId>\r
-                       <version>1.0</version>\r
                </dependency>\r
                <dependency>\r
                        <groupId>org.slf4j</groupId>\r
index db0ee84c4796f595b88fdfb3fc1484b5c20e291e..b67529ac35938b2c5b6e8d706e37c2a03dc22acc 100644 (file)
@@ -10,7 +10,6 @@
       <dependency>\r
           <groupId>org.opendaylight.controller</groupId>\r
           <artifactId>yang-model-api</artifactId>\r
-          <version>1.0</version>\r
       </dependency>\r
   </dependencies>\r
 </project>
\ No newline at end of file
index 3076a6fd679fdbc75509dd6dd4036bbf2f10be01..fc506049946eab15cb02fd307ddac6e72712423f 100644 (file)
@@ -1,34 +1,37 @@
 <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>
-       <parent>
-               <groupId>org.opendaylight.controller</groupId>
-               <artifactId>yang-prototype</artifactId>
-               <version>0.5-SNAPSHOT</version>
-       </parent>
-       <version>0.5.3-SNAPSHOT</version>
-       <artifactId>yang</artifactId>
-       <packaging>pom</packaging>
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <parent>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>yang-prototype</artifactId>
+        <version>0.5-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <version>0.5.4-SNAPSHOT</version>
+    <artifactId>yang</artifactId>
+    <packaging>pom</packaging>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <!-- Version of all child artifacts -->
     </properties>
 
-       <modules>
-               <module>yang-common</module>
-               <module>yang-data-api</module>
-               <module>yang-data-util</module>
+    <modules>
+        <module>yang-common</module>
+        <module>yang-data-api</module>
+        <module>yang-data-util</module>
                <module>yang-data-impl</module>
-               <module>yang-model-api</module>
-               <module>yang-model-util</module>
-               <module>yang-binding</module>
-               <module>../code-generator/yang-model-parser-api</module>
-               <module>../code-generator/yang-model-parser-impl</module>
-               <module>../code-generator/maven-yang</module>
-               <module>../code-generator/maven-yang-plugin</module>
-               <module>../code-generator/maven-yang-plugin-it</module>
-       </modules>
+        <module>yang-model-api</module>
+        <module>yang-model-util</module>
+        <module>yang-binding</module>
+        <module>yang-ext</module>
+        <module>../code-generator/yang-model-parser-api</module>
+        <module>../code-generator/yang-model-parser-impl</module>
+        <module>../code-generator/maven-yang</module>
+        <module>../code-generator/maven-yang-plugin</module>
+        <module>../code-generator/maven-yang-plugin-it</module>
+    </modules>
 
     <dependencyManagement>
         <dependencies>
         </dependencies>
     </dependencyManagement>
 
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-compiler-plugin</artifactId>
-                               <version>2.0</version>
-                               <inherited>true</inherited>
-                               <configuration>
-                                       <source>1.7</source>
-                                       <target>1.7</target>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-javadoc-plugin</artifactId>
-                               <version>2.8.1</version>
-                               <configuration>
-                                       <stylesheet>maven</stylesheet>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>aggregate</goal>
-                                               </goals>
-                                               <phase>site</phase>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-       </build>
-       <reporting>
-               <plugins>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>findbugs-maven-plugin</artifactId>
-                               <version>2.4.0</version>
-                               <configuration>
-                                       <effort>Max</effort>
-                                       <threshold>Low</threshold>
-                                       <goal>site</goal>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>jdepend-maven-plugin</artifactId>
-                               <version>2.0-beta-2</version>
-                       </plugin>
-               </plugins>
-       </reporting>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0</version>
+                <inherited>true</inherited>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.8.1</version>
+                <configuration>
+                    <stylesheet>maven</stylesheet>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>aggregate</goal>
+                        </goals>
+                        <phase>site</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <version>2.4.0</version>
+                <configuration>
+                    <effort>Max</effort>
+                    <threshold>Low</threshold>
+                    <goal>site</goal>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jdepend-maven-plugin</artifactId>
+                <version>2.0-beta-2</version>
+            </plugin>
+        </plugins>
+    </reporting>
 </project>
index 2eab3bb756773a68cb0169aa2e18e39a260d31a2..79add782544be821f3fc57edb55cf1e6eaf6cb9d 100644 (file)
@@ -3,7 +3,7 @@
   <parent>\r
     <groupId>org.opendaylight.controller</groupId>\r
     <artifactId>yang</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
+    <version>0.5.4-SNAPSHOT</version>\r
   </parent>\r
   <artifactId>yang-binding</artifactId>\r
-</project>
\ No newline at end of file
+</project>\r
index fa78e89474f139da520f17a54cf6a1f87f38ddd5..a94013b288957a9cbd3ba907a41d0792013f9340 100644 (file)
@@ -3,7 +3,7 @@
   <parent>\r
     <groupId>org.opendaylight.controller</groupId>\r
     <artifactId>yang</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
+    <version>0.5.4-SNAPSHOT</version>\r
   </parent>\r
   <artifactId>yang-common</artifactId>\r
   <dependencies>\r
@@ -13,4 +13,4 @@
           <version>${slf4j.version}</version>\r
       </dependency>\r
   </dependencies>\r
-</project>
\ No newline at end of file
+</project>\r
index 903ea36404c7f543fe3bb3de4f3d6968140f1f1c..28f25946ba6dee9a4bd07688e20cf7a07de9112a 100644 (file)
@@ -1,16 +1,17 @@
-<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">\r
-  <modelVersion>4.0.0</modelVersion>\r
-  <parent>\r
-    <groupId>org.opendaylight.controller</groupId>\r
-    <artifactId>yang</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
-  </parent>\r
-  <artifactId>yang-data-api</artifactId>\r
-  \r
-  <dependencies>\r
-       <dependency>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>yang-common</artifactId>\r
-       </dependency>\r
-  </dependencies>\r
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>yang</artifactId>\r
+        <version>0.5.4-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>yang-data-api</artifactId>\r
+\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-common</artifactId>\r
+        </dependency>\r
+    </dependencies>\r
 </project>
\ No newline at end of file
index 5843de1af2967d489f007617d118ab572deb6a63..41fd1139ae80edcfbf8b75cf4ee445284518065c 100755 (executable)
@@ -5,7 +5,7 @@
     <parent>\r
         <groupId>org.opendaylight.controller</groupId>\r
         <artifactId>yang</artifactId>\r
-        <version>0.5.3-SNAPSHOT</version>\r
+        <version>0.5.4-SNAPSHOT</version>\r
     </parent>\r
     <artifactId>yang-data-impl</artifactId>\r
 \r
@@ -69,4 +69,4 @@
             <scope>test</scope>\r
         </dependency>\r
     </dependencies>\r
-</project>
\ No newline at end of file
+</project>\r
index ea03a19a1657780b48043863fd453e0949aa066c..722a379aa31a4ecaad4dab9928ba40397b830f56 100644 (file)
@@ -1,15 +1,16 @@
-<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">\r
-  <modelVersion>4.0.0</modelVersion>\r
-  <parent>\r
-    <groupId>org.opendaylight.controller</groupId>\r
-    <artifactId>yang</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
-  </parent>\r
-  <artifactId>yang-data-util</artifactId>\r
-  <dependencies>\r
-       <dependency>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>yang-data-api</artifactId>\r
-       </dependency>\r
-  </dependencies>\r
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>yang</artifactId>\r
+        <version>0.5.4-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>yang-data-util</artifactId>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-data-api</artifactId>\r
+        </dependency>\r
+    </dependencies>\r
 </project>
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/yang/yang-ext/pom.xml b/opendaylight/sal/yang-prototype/yang/yang-ext/pom.xml
new file mode 100644 (file)
index 0000000..85ecb91
--- /dev/null
@@ -0,0 +1,100 @@
+<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>
+    <parent>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>yang</artifactId>
+        <version>0.5.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>yang-ext</artifactId>
+    <version>2013.09.07-SNAPSHOT</version>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>yang-maven-plugin</artifactId>
+                <version>0.5.4-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate-sources</goal>
+                        </goals>
+                        <configuration>
+                            <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+                            <codeGenerators>
+                            </codeGenerators>
+                            <inspectDependencies>false</inspectDependencies>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.opendaylight.controller</groupId>
+                        <artifactId>maven-sal-api-gen-plugin</artifactId>
+                        <version>0.5.4-SNAPSHOT</version>
+                        <type>jar</type>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+
+        <pluginManagement>
+            <plugins>
+
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>build-helper-maven-plugin</artifactId>
+                    <version>1.7</version>
+                    <executions>
+                        <execution>
+                            <phase>generate-sources</phase>
+                            <goals>
+                                <goal>add-source</goal>
+                            </goals>
+                            <configuration>
+                                <sources>
+                                    <source>target/generated-sources/sal</source>
+                                </sources>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                <!--This plugin's configuration is used to store Eclipse 
+                    m2e settings only. It has no influence on the Maven build itself. -->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.opendaylight.controller
+                                        </groupId>
+                                        <artifactId>
+                                            yang-maven-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [0.5,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>
+                                                generate-sources
+                                            </goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
diff --git a/opendaylight/sal/yang-prototype/yang/yang-ext/src/main/yang/yang-ext.yang b/opendaylight/sal/yang-prototype/yang/yang-ext/src/main/yang/yang-ext.yang
new file mode 100644 (file)
index 0000000..22aa48a
--- /dev/null
@@ -0,0 +1,60 @@
+module yang-ext {
+    yang-version 1;
+    namespace "urn:opendaylight:params:ns:yang:extension:yang-ext";
+    prefix "ext";
+    
+    contact "Anton Tkacik <ttkacik@cisco.com>";
+
+    revision "2013-07-09" {
+        description "";
+    }
+
+    // Augmentation name
+
+    extension "augment-identifier" {
+        description 
+           "YANG language extension which assigns an identifier to 
+            augmentation. Augment identifier is used to identify
+            specific augment statement by name. 
+
+            The identifier syntax is defined formally defined by the rule
+            'identifier' in Section 12 of RFC 6020.
+
+            All augment identifiers defined in a namespace MUST be unique.
+            The namespace of augment identifiers is shared by module and
+            its submodules. 
+            ";
+            /*
+                Discussion:
+                This extension allows for ease of development / debug
+                of YANG modules and it is suitable for code generation,
+                where each augment statement is nicely identified by
+                unique name instead of combination of augment target
+                and when condition. 
+            */
+        argument "identifier";
+    }
+
+
+    // Context-aware RPCs
+
+    grouping rpc-context-ref {
+        description 
+           "A reference to RPC context.";
+        leaf context-instance {
+            type instance-identifier;
+            description "Pointer to the context. ";
+        }
+    }
+
+    extension "rpc-context-instance" {
+        description
+           "YANG language extension which defines enclosing (parent) 
+            schema node as referencable context for RPCs.
+
+            The argument is identity which is used to identify RPC context
+            type.";
+
+        argument "context-type";
+    }
+}
\ No newline at end of file
index a90c6276d0e1d8430b1180a191cdd8139cff7655..8c4cb351967dcc96fe6c9ded26ac130d5950f0a2 100644 (file)
@@ -1,15 +1,16 @@
-<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">\r
-  <modelVersion>4.0.0</modelVersion>\r
-  <parent>\r
-    <groupId>org.opendaylight.controller</groupId>\r
-    <artifactId>yang</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
-  </parent>\r
-  <artifactId>yang-model-api</artifactId>\r
-  <dependencies>\r
-       <dependency>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>yang-common</artifactId>\r
-       </dependency>\r
-  </dependencies>\r
-</project>
\ No newline at end of file
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>yang</artifactId>\r
+        <version>0.5.4-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>yang-model-api</artifactId>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-common</artifactId>\r
+        </dependency>\r
+    </dependencies>\r
+</project>\r
index e2caca8e8adc0652f3eeb27deb770bf3fa789042..b865ebe015952d56d5368153bfb50f156c79427b 100644 (file)
@@ -3,7 +3,7 @@
   <parent>\r
     <groupId>org.opendaylight.controller</groupId>\r
     <artifactId>yang</artifactId>\r
-    <version>0.5.3-SNAPSHOT</version>\r
+    <version>0.5.4-SNAPSHOT</version>\r
   </parent>\r
   <artifactId>yang-model-util</artifactId>\r
   <dependencies>\r