Fix namespace handling 04/109804/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 16 Jan 2024 15:46:41 +0000 (16:46 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 16 Jan 2024 15:47:36 +0000 (16:47 +0100)
The previous patch missed an update to namespace versions, fix that up.

JIRA: CONTROLLER-2090
Change-Id: Id780a60ed629cdb862a56c616b78679a7d6f3d25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/OpendaylightNamespaceHandler.java

index 55994ca1f093ddf4b86a02ccc8847166d679dc8d..657d6451e882b72d730bc01ae4977ef777a58812 100644 (file)
@@ -159,7 +159,7 @@ public class BlueprintBundleTracker implements BundleActivator, BundleTrackerCus
     private void registerNamespaceHandler(final BundleContext context) {
         namespaceReg = context.registerService(NamespaceHandler.class, new OpendaylightNamespaceHandler(),
             FrameworkUtil.asDictionary(Map.of(
-                "osgi.service.blueprint.namespace", OpendaylightNamespaceHandler.NAMESPACE_1_0_0)));
+                "osgi.service.blueprint.namespace", OpendaylightNamespaceHandler.NAMESPACE_2_0_0)));
     }
 
     private void registerBlueprintEventHandler(final BundleContext context) {
index b766e59cdcad2ecf03d10bcefc35acd096798e9e..962f5c047bc6ef9ef6db83fd65f0dc79abe96864 100644 (file)
@@ -48,7 +48,7 @@ import org.xml.sax.SAXException;
  * @author Thomas Pantelis
  */
 public final class OpendaylightNamespaceHandler implements NamespaceHandler {
-    public static final String NAMESPACE_1_0_0 = "http://opendaylight.org/xmlns/blueprint/v1.0.0";
+    public static final String NAMESPACE_2_0_0 = "http://opendaylight.org/xmlns/blueprint/v2.0.0";
     static final String ROUTED_RPC_REG_CONVERTER_NAME = "org.opendaylight.blueprint.RoutedRpcRegConverter";
     static final String DOM_RPC_PROVIDER_SERVICE_NAME = "org.opendaylight.blueprint.DOMRpcProviderService";
     static final String RPC_REGISTRY_NAME = "org.opendaylight.blueprint.RpcRegistry";
@@ -63,7 +63,6 @@ public final class OpendaylightNamespaceHandler implements NamespaceHandler {
     private static final String RESTART_DEPENDENTS_ON_UPDATES = "restart-dependents-on-updates";
     private static final String USE_DEFAULT_FOR_REFERENCE_TYPES = "use-default-for-reference-types";
     private static final String CLUSTERED_APP_CONFIG = "clustered-app-config";
-    private static final String INTERFACE = "interface";
     private static final String ID_ATTR = "id";
 
     @SuppressWarnings("rawtypes")
@@ -74,8 +73,8 @@ public final class OpendaylightNamespaceHandler implements NamespaceHandler {
 
     @Override
     public URL getSchemaLocation(final String namespace) {
-        if (NAMESPACE_1_0_0.equals(namespace)) {
-            URL url = getClass().getResource("/opendaylight-blueprint-ext-1.0.0.xsd");
+        if (NAMESPACE_2_0_0.equals(namespace)) {
+            URL url = getClass().getResource("/opendaylight-blueprint-ext-2.0.0.xsd");
             LOG.debug("getSchemaLocation for {} returning URL {}", namespace, url);
             return url;
         }