Bug 6749: Set the openflow connection config at xml file 58/45758/2
authormelserngawy <melserngawy@inocybe.com>
Fri, 16 Sep 2016 21:15:51 +0000 (17:15 -0400)
committerMohamed El-Serngawy <melserngawy@inocybe.com>
Mon, 19 Sep 2016 17:08:37 +0000 (13:08 -0400)
Set the openflow connections (default and legacy) inital configuration
to xml file to be able to change it after starting the distribution

The openflow TLS configuration was missing in the blueprint,
add it with default values

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

index a3ffd89e5317a5f0590091bcfee3c4b3212af7e9..d2b9b2fda55db75d13d727f72669c2ccb592340a 100644 (file)
             <type>cfg</type>
             <classifier>config</classifier>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.openflowplugin</groupId>
+            <artifactId>openflowplugin-blueprint-config</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>config</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.openflowplugin</groupId>
+            <artifactId>openflowplugin-blueprint-config</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>legacyConfig</classifier>
+        </dependency>
 
         <dependency>
             <groupId>org.opendaylight.dlux</groupId>
index 4a17a37b372b8e030a10c7d85778b4b7ba630a64..2c8fc6642f5cc2f3f8f61c7769067b5ed646172c 100644 (file)
@@ -50,6 +50,8 @@
         <bundle>mvn:org.opendaylight.controller/liblldp/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.openflowplugin/openflowplugin-blueprint-config/{{VERSION}}</bundle>
         <configfile finalname="etc/org.opendaylight.openflowplugin.cfg">mvn:org.opendaylight.openflowplugin/openflowplugin-blueprint-config/{{VERSION}}/cfg/config</configfile>
+        <configfile finalname="etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml">mvn:org.opendaylight.openflowplugin/openflowplugin-blueprint-config/{{VERSION}}/xml/config</configfile>
+        <configfile finalname="etc/opendaylight/datastore/initial/config/legacy-openflow-connection-config.xml">mvn:org.opendaylight.openflowplugin/openflowplugin-blueprint-config/{{VERSION}}/xml/legacyConfig</configfile>
         <configfile finalname="etc/opendaylight/karaf/42-openflowplugin-Li.xml">mvn:org.opendaylight.openflowplugin/openflowplugin-controller-config/{{VERSION}}/xml/config-Li</configfile>
     </feature>
 
index f4d7167a7f9f45ea0270126317f5a28e8eaf7eef..172a504251c3647dca42404e4e7a6995fac06561 100644 (file)
                                <type>cfg</type>
                                <classifier>config</classifier>
                            </artifact>
+                           <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>
diff --git a/openflowplugin-blueprint-config/src/main/resources/initial/default-openflow-connection-config.xml b/openflowplugin-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/openflowplugin-blueprint-config/src/main/resources/initial/legacy-openflow-connection-config.xml b/openflowplugin-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
index 78cf24e7d21553e2c8ab9d77e5f275e82db1e19a..bd72c349c703fd9cb8d86699d3f5239ee4d35890 100644 (file)
           interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProviderFactory"/>
 
   <!-- Create OF switch connection provider on port 6633 -->
-  <odl:clustered-app-config id="defaultSwitchConnConfig"
+  <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:default-config><![CDATA[
-      <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>
-      </switch-connection-config>
-    ]]></odl:default-config>
   </odl:clustered-app-config>
 
   <bean id="defaultSwitchConnProvider" factory-ref="switchConnProviderFactory" factory-method="newInstance">
           odl:type="openflow-switch-connection-provider-default-impl"/>
 
   <!-- Create OF switch connection provider on port 6653 -->
-  <odl:clustered-app-config id="legacySwitchConnConfig"
+  <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:default-config><![CDATA[
-      <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>
-      </switch-connection-config>
-    ]]></odl:default-config>
   </odl:clustered-app-config>
 
   <bean id="legacySwitchConnProvider" factory-ref="switchConnProviderFactory" factory-method="newInstance">