Sfc-ovs: seperating config file 35/18735/2
authorAndrej Kincel <[email protected]>
Tue, 21 Apr 2015 11:39:31 +0000 (13:39 +0200)
committerAndrej Kincel <[email protected]>
Tue, 21 Apr 2015 11:42:53 +0000 (13:42 +0200)
Change-Id: I74157f27b642199dc22d6e7ede22e6a820e2eb2b
Signed-off-by: Andrej Kincel <[email protected]>
features-sfc-ovs/pom.xml
features-sfc-ovs/src/main/resources/features.xml
sfc-config/src/main/resources/80-sfc.xml
sfc-ovs/pom.xml
sfc-ovs/src/main/resources/configuration/initial/sfc-ovs-initial.xml [new file with mode: 0644]

index 24f630a32929cdf291ccb16dd065d69ca639f387..790fcef6f688e89f3c9800e495c9bedf1d489f97 100644 (file)
@@ -7,152 +7,152 @@ This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html  
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-   <parent>
-    <artifactId>sfc-parent</artifactId>
-    <groupId>org.opendaylight.sfc</groupId>
-    <version>0.1.0-SNAPSHOT</version>
-  </parent>
-   <artifactId>features-sfc-ovs</artifactId>
-   <packaging>jar</packaging>
-   <properties>
-      <features.file>features.xml</features.file>
-   </properties>
+<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>sfc-parent</artifactId>
+        <groupId>org.opendaylight.sfc</groupId>
+        <version>0.1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>features-sfc-ovs</artifactId>
+    <packaging>jar</packaging>
+    <properties>
+        <features.file>features.xml</features.file>
+    </properties>
 
     <dependencies>
-   <dependency>
-       <groupId>org.opendaylight.ovsdb</groupId>
-       <artifactId>southbound-impl</artifactId>
-       <version>${ovsdb.southbound.version}</version>
-       <classifier>config</classifier>
-       <type>xml</type>
-   </dependency>
-   <dependency>
-       <groupId>org.opendaylight.ovsdb</groupId>
-       <artifactId>southbound-api</artifactId>
-       <version>${ovsdb.southbound.version}</version>
-   </dependency>
-   <dependency>
-       <groupId>org.opendaylight.ovsdb</groupId>
-       <artifactId>southbound-impl</artifactId>
-       <version>${ovsdb.southbound.version}</version>
-   </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>features-sfc</artifactId>
-      <version>${project.version}</version>
-      <classifier>features</classifier>
-      <type>xml</type>
-    </dependency>
-    <dependency>
-        <groupId>org.opendaylight.ovsdb</groupId>
-        <artifactId>southbound-features</artifactId>
-        <version>${ovsdb.southbound.version}</version>
-        <classifier>features</classifier>
-        <type>xml</type>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.odlparent</groupId>
-      <artifactId>features-test</artifactId>
-      <version>${feature.test.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-       <groupId>${project.groupId}</groupId>
-       <artifactId>sfc-provider</artifactId>
-       <version>${project.version}</version>
-    </dependency>
-    <dependency>
-       <groupId>${project.groupId}</groupId>
-       <artifactId>sfc-ovs</artifactId>
-       <version>${project.version}</version>
-    </dependency>
-    <dependency>
-        <groupId>org.opendaylight.controller.model</groupId>
-        <artifactId>model-inventory</artifactId>
-        <version>${mdsal.version}</version>
-    </dependency>
-     <!-- dependency for opendaylight-karaf-empty for use by testing -->
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>opendaylight-karaf-empty</artifactId>
-      <version>${karaf.empty.version}</version>
-      <type>zip</type>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
-    </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>features-sfc</artifactId>
+            <version>${project.version}</version>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.ovsdb</groupId>
+            <artifactId>southbound-features</artifactId>
+            <version>${ovsdb.southbound.version}</version>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.odlparent</groupId>
+            <artifactId>features-test</artifactId>
+            <version>${feature.test.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.ovsdb</groupId>
+            <artifactId>southbound-api</artifactId>
+            <version>${ovsdb.southbound.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.ovsdb</groupId>
+            <artifactId>southbound-impl</artifactId>
+            <version>${ovsdb.southbound.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sfc-provider</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sfc-ovs</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>config</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sfc-ovs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.opendaylight.controller.model</groupId>-->
+            <!--<artifactId>model-inventory</artifactId>-->
+            <!--<version>${mdsal.version}</version>-->
+        <!--</dependency>-->
+        <!-- dependency for opendaylight-karaf-empty for use by testing -->
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>opendaylight-karaf-empty</artifactId>
+            <version>${karaf.empty.version}</version>
+            <type>zip</type>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
     </dependencies>
 
-   <build>
-      <resources>
-         <resource>
-            <directory>src/main/resources</directory>
-            <filtering>true</filtering>
-         </resource>
-      </resources>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-resources-plugin</artifactId>
-            <version>${maven.resources.version}</version>
-            <executions>
-               <execution>
-                  <id>filter</id>
-                  <phase>generate-resources</phase>
-                  <goals>
-                     <goal>resources</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
-         <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>build-helper-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>attach-artifacts</id>
-                  <phase>package</phase>
-                  <goals>
-                     <goal>attach-artifact</goal>
-                  </goals>
-                  <configuration>
-                     <artifacts>
-                        <artifact>
-                           <file>${project.build.directory}/classes/${features.file}</file>
-                           <type>xml</type>
-                           <classifier>features</classifier>
-                        </artifact>
-                     </artifacts>
-                  </configuration>
-               </execution>
-            </executions>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <systemPropertyVariables>
-                <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
-                <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
-                <karaf.distro.version>${karaf.empty.version}</karaf.distro.version>
-              </systemPropertyVariables>
-              <dependenciesToScan>
-               <dependency>org.opendaylight.odlparent:features-test</dependency>
-              </dependenciesToScan>
-            </configuration>
-          </plugin>
-      </plugins>
-   </build>
-   <scm>
-      <connection>scm:git:ssh://git.opendaylight.org:29418/sfc.git</connection>
-      <developerConnection>scm:git:ssh://git.opendaylight.org:29418/sfc.git</developerConnection>
-      <tag>HEAD</tag>
-      <url>https://git.opendaylight.org/gerrit/gitweb?p=sfc.git;a=summary</url>
-   </scm>
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>${maven.resources.version}</version>
+                <executions>
+                    <execution>
+                        <id>filter</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${project.build.directory}/classes/${features.file}</file>
+                                    <type>xml</type>
+                                    <classifier>features</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <systemPropertyVariables>
+                        <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
+                        <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
+                        <karaf.distro.version>${karaf.empty.version}</karaf.distro.version>
+                    </systemPropertyVariables>
+                    <dependenciesToScan>
+                        <dependency>org.opendaylight.odlparent:features-test</dependency>
+                    </dependenciesToScan>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <scm>
+        <connection>scm:git:ssh://git.opendaylight.org:29418/sfc.git</connection>
+        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/sfc.git</developerConnection>
+        <tag>HEAD</tag>
+        <url>https://git.opendaylight.org/gerrit/gitweb?p=sfc.git;a=summary</url>
+    </scm>
 </project>
 
index 82dfa9295b1377d1a012bea29945345094fbd9ac..088e6845db3cc66fe68936499509ad7b75e602f6 100644 (file)
@@ -6,24 +6,19 @@ Copyright (c) 2015 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
--->            
+-->
 <features name="odl-sfc-ovs-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
-    <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+
+    <!--<repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>-->
     <repository>mvn:org.opendaylight.sfc/features-sfc/${project.version}/xml/features</repository>
     <repository>mvn:org.opendaylight.ovsdb/southbound-features/${ovsdb.southbound.version}/xml/features</repository>
     <feature name='odl-sfc-ovs' version='${project.version}' description='OpenDaylight :: OpenvSwitch '>
-          <!--
-            Necessary TODO:
-            List all of the user consumable features you define in this feature file here.
-            Generally you would *not* list individual bundles here, but only features defined in *this* file.
-            It is useful to list them in the same order they occur in the file.
 
-            Examples:
-            <feature version='${project.version}'>odl-sfc-provider</feature>
-            <feature version='${project.version}'>odl-sfc-model</feature>
-        -->
+        <configfile finalname="etc/opendaylight/karaf/sfc-ovs-initial.xml">
+            mvn:org.opendaylight.sfc/sfc-ovs/${project.version}/xml/config
+        </configfile>
         <feature version='${project.version}'>odl-sfc-provider</feature>
         <!--<feature version='${project.version}'>odl-sfc-model</feature>-->
         <!--<feature version='${mdsal.version}'>odl-mdsal-broker</feature>-->
@@ -31,8 +26,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         <feature version='${ovsdb.southbound.version}'>odl-ovsdb-southbound-impl</feature>
         <bundle>mvn:org.opendaylight.sfc/sfc-ovs/${project.version}</bundle>
     </feature>
-    
-    <!-- Optional TODO: Remove TODO Comments -->
 
 </features>
 
index af270d9aa85a771247a0bcdb69b9df46898a225a..181b2272f8688cd0f75b3c0f6149ca69195b3b08 100755 (executable)
 
                 </module>
 
-                <module>
-                    <type xmlns:sfc-ovs="urn:opendaylight:params:xml:ns:yang:controller:config:sfc-ovs:impl">
-                        sfc-ovs:sfc-ovs-impl
-                    </type>
-                    <name>sfc-ovs-impl</name>
-
-                    <rpc-registry>
-                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
-                        <name>binding-rpc-broker</name>
-                    </rpc-registry>
-
-                    <data-broker>
-                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
-                        <name>binding-data-broker</name>
-                    </data-broker>
-                </module>
                 <module>
                     <type xmlns:sfc-netconf="urn:opendaylight:params:xml:ns:yang:controller:config:sfc-netconf:impl">
                         sfc-netconf:sfc-netconf-impl
         <capability>urn:opendaylight:params:xml:ns:yang:controller:config:sfc-test-consumer:impl?module=sfc-test-consumer-impl&amp;revision=2014-07-01</capability>
         <capability>urn:opendaylight:params:xml:ns:yang:controller:config:sfc-provider:impl?module=sfc-provider-impl&amp;revision=2014-06-30</capability>
         <capability>urn:opendaylight:params:xml:ns:yang:controller:config:sfc-sb-rest-provider:impl?module=sfc-sb-rest-provider-impl&amp;revision=2014-10-20</capability>
-        <capability>urn:opendaylight:params:xml:ns:yang:controller:config:sfc-ovs:impl?module=sfc-ovs-impl&amp;revision=2014-10-20</capability>
         <capability>urn:opendaylight:params:xml:ns:yang:controller:config:sfc-netconf:impl?module=sfc-netconf-impl&amp;revision=2014-10-20</capability>
     </required-capabilities>
 
index 87f4ceecbb06d67c6577269c709ea11cae9c2653..5db6fbe22e2034cc7f7af6aa4070f72044ba3c18 100755 (executable)
 
     <properties>
         <jmxGeneratorPath>${project.build.directory}/generated-sources/config</jmxGeneratorPath>
+        <configfile>configuration/initial/sfc-ovs-initial.xml</configfile>
     </properties>
 
     <build>
         <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts</id>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${project.build.directory}/classes/${configfile}</file>
+                                    <type>xml</type>
+                                    <classifier>config</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
diff --git a/sfc-ovs/src/main/resources/configuration/initial/sfc-ovs-initial.xml b/sfc-ovs/src/main/resources/configuration/initial/sfc-ovs-initial.xml
new file mode 100644 (file)
index 0000000..4ffc420
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<snapshot>
+    <configuration>
+        <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+            <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+                <module>
+                    <type xmlns:sfc-ovs="urn:opendaylight:params:xml:ns:yang:controller:config:sfc-ovs:impl">
+                        sfc-ovs:sfc-ovs-impl
+                    </type>
+                    <name>sfc-ovs-impl</name>
+
+                    <rpc-registry>
+                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">
+                            binding:binding-rpc-registry
+                        </type>
+                        <name>binding-rpc-broker</name>
+                    </rpc-registry>
+
+                    <data-broker>
+                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">
+                            binding:binding-async-data-broker
+                        </type>
+                        <name>binding-data-broker</name>
+                    </data-broker>
+                </module>
+            </modules>
+        </data>
+
+    </configuration>
+
+    <required-capabilities>
+        <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
+        <capability>urn:opendaylight:params:xml:ns:yang:controller:config:sfc-provider:impl?module=sfc-provider-impl&amp;revision=2014-06-30</capability>
+        <capability>urn:opendaylight:params:xml:ns:yang:controller:config:sfc-ovs:impl?module=sfc-ovs-impl&amp;revision=2014-10-20</capability>
+    </required-capabilities>
+
+</snapshot>
\ No newline at end of file