Make configuration of msg-spy in local distro clearer 30/8730/3
authorEd Warnicke <eaw@cisco.com>
Mon, 7 Jul 2014 11:05:43 +0000 (06:05 -0500)
committerPrasanna Huddar <prasanna.k.huddar@gmail.com>
Mon, 7 Jul 2014 11:46:48 +0000 (11:46 +0000)
This patch:
1)  Gets the initial config from the
openflowplugin-controller-config bundle
2)  Adds a local 43-msg-spy.xml to configure
msg-spy

Change-Id: I2ce87eedb97fc1784aa81c8016983af5deb89959
Signed-off-by: Ed Warnicke <eaw@cisco.com>
distribution/base/pom.xml
distribution/base/src/main/resources/configuration/initial/42-openflow-protocol-impl.xml [deleted file]
distribution/base/src/main/resources/configuration/initial/43-msg-spy.xml [new file with mode: 0644]

index 0d4d5c5f6f726238410fccca1aab31880f523833..22efdbe8420fbc2873defd7a1ed929b25356aafc 100644 (file)
@@ -35,7 +35,14 @@ see https://git.opendaylight.org/gerrit/#/c/390/
       <artifactId>openflowplugin</artifactId>
       <version>${project.version}</version>
     </dependency>
-    
+
+    <!-- initial config -->
+    <dependency>
+      <groupId>org.opendaylight.openflowplugin</groupId>
+      <artifactId>openflowplugin-controller-config</artifactId>
+      <version>0.0.3-SNAPSHOT</version>
+    </dependency>
+
     <!-- debug provider -->
     <dependency>
       <groupId>org.opendaylight.openflowplugin</groupId>
@@ -99,6 +106,21 @@ see https://git.opendaylight.org/gerrit/#/c/390/
              <ignorePermissions>false</ignorePermissions>
             </configuration>
           </execution>
+          <execution>
+            <id>unpack-provided-configs</id>
+            <goals>
+              <goal>unpack-dependencies</goal>
+            </goals>
+            <phase>generate-resources</phase>
+            <configuration>
+             <outputDirectory>${project.build.directory}/generated-resources/opendaylight/configuration</outputDirectory>
+             <includeArtifactIds>openflowplugin-controller-config</includeArtifactIds>
+             <includes>**\/*.xml</includes>
+             <excludes>META-INF</excludes>
+             <excludeTransitive>true</excludeTransitive>
+             <ignorePermissions>false</ignorePermissions>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
       <plugin>
diff --git a/distribution/base/src/main/resources/configuration/initial/42-openflow-protocol-impl.xml b/distribution/base/src/main/resources/configuration/initial/42-openflow-protocol-impl.xml
deleted file mode 100644 (file)
index 76dfde8..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<snapshot>
-  <required-capabilities>
-    <!-- openflowjava -->
-    <capability>urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl?module=openflow-switch-connection-provider-impl&amp;revision=2014-03-28</capability>
-    <capability>urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider?module=openflow-switch-connection-provider&amp;revision=2014-03-28</capability>
-    <!-- openflowplugin -->
-    <capability>urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl?module=openflow-provider-impl&amp;revision=2014-03-26</capability>
-    <capability>urn:opendaylight:params:xml:ns:yang:openflow:common:config?module=openflow-provider&amp;revision=2014-03-26</capability>
-    <!-- binding-broker-impl - provided -->
-  </required-capabilities>
-
-  <configuration>
-
-    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-        <!-- default OF-switch-connection-provider (port 6633) -->
-        <module>
-          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl">prefix:openflow-switch-connection-provider-impl</type>
-          <name>openflow-switch-connection-provider-default-impl</name>
-          <port>6633</port>
-          <switch-idle-timeout>15000</switch-idle-timeout>
-        </module>
-        <!-- default OF-switch-connection-provider (port 6653) -->
-        <module>
-          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl">prefix:openflow-switch-connection-provider-impl</type>
-          <name>openflow-switch-connection-provider-legacy-impl</name>
-          <port>6653</port>
-          <switch-idle-timeout>15000</switch-idle-timeout>
-        </module>
-
-
-        <module>
-          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl">prefix:openflow-provider-impl</type>
-          <name>openflow-provider-impl</name>
-          
-          <openflow-switch-connection-provider>
-            <type xmlns:ofSwitch="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider">ofSwitch:openflow-switch-connection-provider</type>
-            <name>openflow-switch-connection-provider-default</name>
-          </openflow-switch-connection-provider>
-          <openflow-switch-connection-provider>
-            <type xmlns:ofSwitch="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider">ofSwitch:openflow-switch-connection-provider</type>
-            <name>openflow-switch-connection-provider-legacy</name>
-          </openflow-switch-connection-provider>
-
-
-          <binding-aware-broker>
-            <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
-            <name>binding-osgi-broker</name>
-          </binding-aware-broker>
-        </module>
-
-        <module>
-            <type xmlns:msgspy="urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl">msgspy:msg-spy-service-impl</type>
-            <name>msg-spy-service-impl</name>
-
-            <openflow-plugin-provider>
-                <type xmlns:opfprov="urn:opendaylight:params:xml:ns:yang:openflow:common:config">opfprov:openflow-provider</type>
-                <name>openflow-provider</name>
-            </openflow-plugin-provider>
-        </module>
-      </modules>
-
-      <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-        <service>
-          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider">prefix:openflow-switch-connection-provider</type>
-          <instance>
-            <name>openflow-switch-connection-provider-default</name>
-            <provider>/modules/module[type='openflow-switch-connection-provider-impl'][name='openflow-switch-connection-provider-default-impl']</provider>
-          </instance>
-          <instance>
-            <name>openflow-switch-connection-provider-legacy</name>
-            <provider>/modules/module[type='openflow-switch-connection-provider-impl'][name='openflow-switch-connection-provider-legacy-impl']</provider>
-          </instance>
-        </service>
-
-        <service>
-          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:openflow:common:config">prefix:openflow-provider</type>
-          <instance>
-            <name>openflow-provider</name>
-            <provider>/modules/module[type='openflow-provider-impl'][name='openflow-provider-impl']</provider>
-          </instance>
-        </service>
-        
-        <service>
-          <type xmlns:msgspy="urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl">msgspy:msg-spy-service</type>
-          <instance>
-            <name>msg-spy-service</name>
-            <provider>/modules/module[type='msg-spy-service-impl'][name='msg-spy-service-impl']</provider>
-          </instance>
-        </service>
-      </services>
-    </data>
-
-  </configuration>
-</snapshot>
diff --git a/distribution/base/src/main/resources/configuration/initial/43-msg-spy.xml b/distribution/base/src/main/resources/configuration/initial/43-msg-spy.xml
new file mode 100644 (file)
index 0000000..b420fa6
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<snapshot>
+  <required-capabilities>
+    <!-- openflowjava -->
+    <capability>urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl?module=openflow-switch-connection-provider-impl&amp;revision=2014-03-28</capability>
+    <capability>urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider?module=openflow-switch-connection-provider&amp;revision=2014-03-28</capability>
+    <!-- openflowplugin -->
+    <capability>urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl?module=openflow-provider-impl&amp;revision=2014-03-26</capability>
+    <capability>urn:opendaylight:params:xml:ns:yang:openflow:common:config?module=openflow-provider&amp;revision=2014-03-26</capability>
+    <!-- binding-broker-impl - provided -->
+  </required-capabilities>
+
+  <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:msgspy="urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl">msgspy:msg-spy-service-impl</type>
+            <name>msg-spy-service-impl</name>
+
+            <openflow-plugin-provider>
+                <type xmlns:opfprov="urn:opendaylight:params:xml:ns:yang:openflow:common:config">opfprov:openflow-provider</type>
+                <name>openflow-provider</name>
+            </openflow-plugin-provider>
+        </module>
+      </modules>
+
+      <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <service>
+          <type xmlns:msgspy="urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl">msgspy:msg-spy-service</type>
+          <instance>
+            <name>msg-spy-service</name>
+            <provider>/modules/module[type='msg-spy-service-impl'][name='msg-spy-service-impl']</provider>
+          </instance>
+        </service>
+      </services>
+    </data>
+
+  </configuration>
+</snapshot>