Enable restart of CSS modules on blueprint container restart 31/40731/6
authorTom Pantelis <tpanteli@brocade.com>
Wed, 22 Jun 2016 13:58:08 +0000 (09:58 -0400)
committerMilos Fabian <milfabia@cisco.com>
Sat, 16 Jul 2016 20:25:37 +0000 (20:25 +0000)
For the CSS modules whose services are now created via blueprint, if
the corresponding blueprint container is restarted, eg due to config
change, we want to also restart the CSS module. To accomplish this, we
need to associate the blueprint service with the corresponding module
by adding well-known service properties that identify the CSS module's
namespace, module type name, and module instance name. Thus when the
BlueprintContainerRestartServiceImpl encounters the service properties
it will restart the specified CSS module..

Change-Id: Ia1acad4d44e3dff1f3f34bc1f56b33f16862ba62
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
bgp/rib-impl/src/main/resources/org/opendaylight/blueprint/bgp-rib.xml
bgp/rib-spi/src/main/resources/org/opendaylight/blueprint/bgp-rib-spi.xml

index 9ec73e89e999bf088f9f7cd80241e178cfcc45c0..e5c43440c2a81bbefa559a516eb10ec46e04350b 100644 (file)
     <argument ref="globalWorkerGroup"/>
   </bean>
 
-  <service ref="BGPDispatcher" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher"/>
+  <service ref="BGPDispatcher" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher">
+    <!-- The following service properties specify the config system module and instance that correspond to
+         this OSGi service which enables the config system module to be restarted when this blueprint
+         container is restarted. -->
+    <service-properties>
+      <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"/>
+      <entry key="config-module-name" value="bgp-dispatcher-impl"/>
+      <entry key="config-instance-name" value="global-bgp-dispatcher"/>
+    </service-properties>
+  </service>
 
   <bean id="BGPPeerRegistry" class="org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry"
           factory-method="instance"/>
 
   <service ref="BGPPeerRegistry" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry"
-          odl:type="default"/>
+          odl:type="default">
+    <!-- The following service properties specify the config system module and instance that correspond to
+         this OSGi service which enables the config system module to be restarted when this blueprint
+         container is restarted. -->
+    <service-properties>
+      <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"/>
+      <entry key="config-module-name" value="strict-bgp-peer-registry"/>
+      <entry key="config-instance-name" value="global-bgp-peer-registry"/>
+    </service-properties>
+  </service>
 </blueprint>
\ No newline at end of file
index 7e85d72e067ed659cc9604c8d81281690d7b63d7..d740067a9bcdb2dd399650bc4b205459cc203508 100644 (file)
       <value>org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext</value>
       <value>org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext</value>
     </interfaces>
+    <!-- The following service properties specify the config system module and instance that correspond to
+         this OSGi service which enables the config system module to be restarted when this blueprint
+         container is restarted. -->
+    <service-properties>
+      <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi"/>
+      <entry key="config-module-name" value="bgp-rib-extensions-impl"/>
+      <entry key="config-instance-name" value="global-rib-extensions"/>
+    </service-properties>
   </service>
 </blueprint>
\ No newline at end of file