Move the Openflow connections blueprint to OpenflowJava project 18/46518/2
authorMohamed El-Serngawy <melserngawy@inocybe.com>
Tue, 4 Oct 2016 20:48:48 +0000 (16:48 -0400)
committerMohamed El-Serngawy <melserngawy@inocybe.com>
Thu, 6 Oct 2016 21:16:41 +0000 (17:16 -0400)
Moving the Openflow connections (defaultSwitchConnProvider and legacySwitchConnProvider)
blueprint configuration to OpenflowJava project as its data model config "openflow-switch-connection-provider-impl"
exist in OpenflowJava project

Change-Id: I21529b5f8e312d4da0d4a76ef0e6bf02a1e551c5
Signed-off-by: Mohamed El-Serngawy <melserngawy@inocybe.com>
artifacts/pom.xml
features/pom.xml
features/src/main/features/features.xml
openflowjava-blueprint-config/pom.xml [new file with mode: 0644]
openflowjava-blueprint-config/src/main/resources/initial/default-openflow-connection-config.xml [new file with mode: 0644]
openflowjava-blueprint-config/src/main/resources/initial/legacy-openflow-connection-config.xml [new file with mode: 0644]
openflowjava-blueprint-config/src/main/resources/org/opendaylight/blueprint/openflowjava.xml [new file with mode: 0644]
pom.xml

index 5d88c4675abf40d7c6babd74ec5c7fb8d85ce826..a54a33e0b64f79d620e94ee875b596101e32a3c9 100644 (file)
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
+            <dependency>
+              <groupId>org.opendaylight.openflowjava</groupId>
+              <artifactId>openflowjava-blueprint-config</artifactId>
+              <version>${project.version}</version>
+              <type>xml</type>
+              <classifier>config</classifier>
+            </dependency>
+            <dependency>
+              <groupId>org.opendaylight.openflowjava</groupId>
+              <artifactId>openflowjava-blueprint-config</artifactId>
+              <version>${project.version}</version>
+              <type>xml</type>
+              <classifier>legacyConfig</classifier>
+            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>openflow-protocol-spi</artifactId>
index 78c6d66974621c4ddf63ceb87d543f11e49c8860..099cebe7bd00da82ed40a5502a8f7b5c8969af10 100644 (file)
       <groupId>org.opendaylight.openflowjava</groupId>
       <artifactId>openflow-protocol-impl</artifactId>
     </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.openflowjava</groupId>
+      <artifactId>openflowjava-blueprint-config</artifactId>
+      <type>xml</type>
+      <classifier>config</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.openflowjava</groupId>
+      <artifactId>openflowjava-blueprint-config</artifactId>
+      <type>xml</type>
+      <classifier>legacyConfig</classifier>
+    </dependency>
+
     <dependency>
       <groupId>org.opendaylight.openflowjava</groupId>
       <artifactId>openflowjava-util</artifactId>
index bd3b359e3ae841d8ef887e4dc04b772b0b90cb38..63be931333918c387006083880d9940dc6317960 100644 (file)
@@ -22,6 +22,9 @@
         <bundle>mvn:org.opendaylight.openflowjava/openflow-protocol-spi/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.openflowjava/openflow-protocol-impl/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.openflowjava/openflowjava-util/{{VERSION}}</bundle>
+        <bundle>mvn:org.opendaylight.openflowjava/openflowjava-blueprint-config/{{VERSION}}</bundle>
         <configfile finalname="etc/opendaylight/karaf/45-openflowjava-stats.xml">mvn:org.opendaylight.openflowjava/openflowjava-config/${project.version}/xml/configstats</configfile>
+        <configfile finalname="etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml">mvn:org.opendaylight.openflowjava/openflowjava-blueprint-config/${project.version}/xml/config</configfile>
+        <configfile finalname="etc/opendaylight/datastore/initial/config/legacy-openflow-connection-config.xml">mvn:org.opendaylight.openflowjava/openflowjava-blueprint-config/${project.version}/xml/legacyConfig</configfile>
     </feature>
 </features>
diff --git a/openflowjava-blueprint-config/pom.xml b/openflowjava-blueprint-config/pom.xml
new file mode 100644 (file)
index 0000000..c3e6c6c
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2016 Inocybe Technologies, Inc. and others. All rights reserved.
+    This program and the accompanying materials are made available under the
+    terms of the Eclipse Public License v1.0 which accompanies this distribution,
+    and is available at http://www.eclipse.org/legal/epl-v10.html -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.opendaylight.openflowjava</groupId>
+        <artifactId>openflowjava-parent</artifactId>
+        <version>0.9.0-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <artifactId>openflowjava-blueprint-config</artifactId>
+    <description>Blueprint configuration files for openflowjava statistics</description>
+    <packaging>bundle</packaging>
+    <name>Openflow Protocol Library - Blueprint Config</name>
+    <scm>
+        <url>https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main</url>
+        <tag>HEAD</tag>
+    </scm>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <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/initial/default-openflow-connection-config.xml</file>
+                                   <type>xml</type>
+                                   <classifier>config</classifier>
+                               </artifact>
+                               <artifact>
+                                   <file>${project.build.directory}/classes/initial/legacy-openflow-connection-config.xml</file>
+                                   <type>xml</type>
+                                   <classifier>legacyConfig</classifier>
+                               </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/openflowjava-blueprint-config/src/main/resources/initial/default-openflow-connection-config.xml b/openflowjava-blueprint-config/src/main/resources/initial/default-openflow-connection-config.xml
new file mode 100644 (file)
index 0000000..48f8bf5
--- /dev/null
@@ -0,0 +1,17 @@
+<switch-connection-config xmlns="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:config">
+  <instance-name>openflow-switch-connection-provider-default-impl</instance-name>
+  <port>6633</port>
+  <transport-protocol>TCP</transport-protocol>
+  <tls>
+     <keystore>configuration/ssl/ctl.jks</keystore>
+     <keystore-type>JKS</keystore-type>
+     <keystore-path-type>PATH</keystore-path-type>
+     <keystore-password>opendaylight</keystore-password>
+     <truststore>configuration/ssl/truststore.jks</truststore>
+     <truststore-type>JKS</truststore-type>
+     <truststore-path-type>PATH</truststore-path-type>
+     <truststore-password>opendaylight</truststore-password>
+     <certificate-password>opendaylight</certificate-password>
+     <cipher-suites></cipher-suites>
+  </tls>
+</switch-connection-config>
\ No newline at end of file
diff --git a/openflowjava-blueprint-config/src/main/resources/initial/legacy-openflow-connection-config.xml b/openflowjava-blueprint-config/src/main/resources/initial/legacy-openflow-connection-config.xml
new file mode 100644 (file)
index 0000000..7772ecc
--- /dev/null
@@ -0,0 +1,17 @@
+<switch-connection-config xmlns="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:config">
+  <instance-name>openflow-switch-connection-provider-legacy-impl</instance-name>
+  <port>6653</port>
+  <transport-protocol>TCP</transport-protocol>
+  <tls>
+     <keystore>configuration/ssl/ctl.jks</keystore>
+     <keystore-type>JKS</keystore-type>
+     <keystore-path-type>PATH</keystore-path-type>
+     <keystore-password>opendaylight</keystore-password>
+     <truststore>configuration/ssl/truststore.jks</truststore>
+     <truststore-type>JKS</truststore-type>
+     <truststore-path-type>PATH</truststore-path-type>
+     <truststore-password>opendaylight</truststore-password>
+     <certificate-password>opendaylight</certificate-password>
+     <cipher-suites></cipher-suites>
+  </tls>
+</switch-connection-config>
\ No newline at end of file
diff --git a/openflowjava-blueprint-config/src/main/resources/org/opendaylight/blueprint/openflowjava.xml b/openflowjava-blueprint-config/src/main/resources/org/opendaylight/blueprint/openflowjava.xml
new file mode 100644 (file)
index 0000000..2cd5a07
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0">
+
+  <reference id="switchConnectionProviderFactory" interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProviderFactory"
+          odl:type="default"/>
+
+  <!-- Create OF switch connection provider on port 6633 -->
+  <odl:clustered-app-config id="defaultSwitchConnConfig" default-config-file-name="default-openflow-connection-config.xml"
+      binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.config.rev160506.SwitchConnectionConfig"
+      list-key-value="openflow-switch-connection-provider-default-impl">
+  </odl:clustered-app-config>
+
+  <bean id="defaultSwitchConnProvider" factory-ref="switchConnectionProviderFactory" factory-method="newInstance">
+    <argument ref="defaultSwitchConnConfig"/>
+  </bean>
+
+  <service ref="defaultSwitchConnProvider" interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider"
+          odl:type="openflow-switch-connection-provider-default-impl"/>
+
+  <!-- Create OF switch connection provider on port 6653 -->
+  <odl:clustered-app-config id="legacySwitchConnConfig" default-config-file-name="legacy-openflow-connection-config.xml"
+      binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.config.rev160506.SwitchConnectionConfig"
+      list-key-value="openflow-switch-connection-provider-legacy-impl">
+  </odl:clustered-app-config>
+
+  <bean id="legacySwitchConnProvider" factory-ref="switchConnectionProviderFactory" factory-method="newInstance">
+    <argument ref="legacySwitchConnConfig"/>
+  </bean>
+
+  <service ref="legacySwitchConnProvider" interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider"
+          odl:type="openflow-switch-connection-provider-legacy-impl"/>
+
+</blueprint>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 05052397c322cab05ccef52e5fbb94fd20485df5..0ed9835234a8cb4e727cbb5773d04213b61fcb64 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -15,6 +15,7 @@
         <module>artifacts</module>
         <module>features</module>
         <module>openflowjava-config</module>
+        <module>openflowjava-blueprint-config</module>
         <module>openflow-protocol-api</module>
         <module>openflow-protocol-impl</module>
         <module>openflow-protocol-it</module>