Eliminate blueprint from pcep-ietf-stateful 30/104030/7
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 15 Jan 2023 19:48:00 +0000 (20:48 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 16 Jan 2023 18:06:28 +0000 (19:06 +0100)
Configuration wiring has no effect in current implementation. Keep the
grouping for configuration purposes and remove persistent container.

For safety, also rename the module so it has a different namespace and
name.

JIRA: BGPCEP-969
Change-Id: I118e41a11596fb0eb2847751eb0dfb1992641235
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
pcep/ietf-stateful/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful/PCEPStatefulCapability.java
pcep/ietf-stateful/src/main/resources/OSGI-INF/blueprint/pcep-ietf-stateful.xml [deleted file]
pcep/ietf-stateful/src/main/yang/odl-pcep-ietf-stateful-app-config.yang [deleted file]
pcep/ietf-stateful/src/main/yang/odl-pcep-ietf-stateful-config.yang [new file with mode: 0644]
pcep/topology/topology-provider/src/main/yang/odl-pcep-topology-provider.yang

index 7d3d30a57fac800a33a5dfb4471ea3e244943852..f41ed520e6d9f363e7b41f2e818a93edf8b20ea3 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.protocol.pcep.ietf.stateful;
 import java.net.InetSocketAddress;
 import org.kohsuke.MetaInfServices;
 import org.opendaylight.protocol.pcep.PCEPCapability;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.ietf.stateful.app.config.rev160707.StatefulCapabilities;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.initiated.rev200720.Stateful1Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.config.rev230115.StatefulCapabilities;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.Tlvs1Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.stateful.capability.tlv.StatefulBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.open.TlvsBuilder;
@@ -51,17 +51,17 @@ public final class PCEPStatefulCapability implements PCEPCapability {
     public void setCapabilityProposal(final InetSocketAddress address, final TlvsBuilder builder) {
         if (stateful) {
             builder.addAugmentation(new Tlvs1Builder()
-                    .setStateful(new StatefulBuilder().setLspUpdateCapability(active)
-                        .addAugmentation(new Stateful1Builder().setInitiation(initiated).build())
-                        .addAugmentation(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller
-                            .pcep.sync.optimizations.rev200720.Stateful1Builder()
-                                .setTriggeredInitialSync(triggeredSync)
-                                .setTriggeredResync(triggeredResync)
-                                .setDeltaLspSyncCapability(deltaLspSync)
-                                .setIncludeDbVersion(includeDbVersion)
-                                .build())
-                        .build())
-                    .build());
+                .setStateful(new StatefulBuilder().setLspUpdateCapability(active)
+                    .addAugmentation(new Stateful1Builder().setInitiation(initiated).build())
+                    .addAugmentation(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller
+                        .pcep.sync.optimizations.rev200720.Stateful1Builder()
+                            .setTriggeredInitialSync(triggeredSync)
+                            .setTriggeredResync(triggeredResync)
+                            .setDeltaLspSyncCapability(deltaLspSync)
+                            .setIncludeDbVersion(includeDbVersion)
+                            .build())
+                    .build())
+                .build());
         }
     }
 
diff --git a/pcep/ietf-stateful/src/main/resources/OSGI-INF/blueprint/pcep-ietf-stateful.xml b/pcep/ietf-stateful/src/main/resources/OSGI-INF/blueprint/pcep-ietf-stateful.xml
deleted file mode 100644 (file)
index a4358ba..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright (c) 2016 Brocade Communications 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
--->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0">
-  <!-- Capabilities -->
-
-  <odl:clustered-app-config id="statefulCapabilityConfig"
-      binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.ietf.stateful.app.config.rev160707.PcepIetfStatefulConfig"/>
-
-  <bean id="statefulCapability" class="org.opendaylight.protocol.pcep.ietf.stateful.PCEPStatefulCapability">
-    <argument ref="statefulCapabilityConfig"/>
-  </bean>
-
-  <service ref="statefulCapability" interface="org.opendaylight.protocol.pcep.PCEPCapability"
-          odl:type="org.opendaylight.protocol.pcep.ietf.stateful.PCEPStatefulCapability"/>
-
-</blueprint>
diff --git a/pcep/ietf-stateful/src/main/yang/odl-pcep-ietf-stateful-app-config.yang b/pcep/ietf-stateful/src/main/yang/odl-pcep-ietf-stateful-app-config.yang
deleted file mode 100644 (file)
index 9b962f3..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-module pcep-ietf-stateful-app-config {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:ietf-stateful-app-config";
-    prefix "pcep-ietf-stateful-app-config";
-
-    description
-      "Configuration for the PCEP IETF stateful extension.";
-
-    revision "2016-07-07" {
-        description
-            "Initial revision.
-
-            Copyright (c) 2016 Brocade Communications Systems, Inc. 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";
-    }
-
-    grouping stateful-capabilities {
-        leaf initiated {
-            type boolean;
-            default true;
-        }
-
-        leaf stateful {
-            type boolean;
-            default true;
-        }
-
-        leaf active {
-            type boolean;
-            default true;
-        }
-
-        leaf triggered-initial-sync {
-            type boolean;
-            default true;
-        }
-
-        leaf delta-lsp-sync-capability {
-            type boolean;
-            default true;
-        }
-
-        leaf triggered-resync {
-            type boolean;
-            default true;
-        }
-
-        leaf include-db-version {
-            type boolean;
-            default true;
-        }
-    }
-
-    container pcep-ietf-stateful-config {
-        uses stateful-capabilities;
-    }
-}
\ No newline at end of file
diff --git a/pcep/ietf-stateful/src/main/yang/odl-pcep-ietf-stateful-config.yang b/pcep/ietf-stateful/src/main/yang/odl-pcep-ietf-stateful-config.yang
new file mode 100644 (file)
index 0000000..09204d6
--- /dev/null
@@ -0,0 +1,56 @@
+module odl-pcep-ietf-stateful-config {
+    namespace "urn:opendaylight:params:xml:ns:yang:pcep:ietf-stateful-config";
+    prefix "opisc";
+
+    description
+      "Configuration for the PCEP IETF stateful extension.
+
+       Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved.
+       Copyright (c) 2023 PANTHEON.tech, s.r.o.
+
+       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";
+
+    revision "2023-01-15" {
+        description "Revision of pcep-ietf-stateful-app-config without datastore anchor";
+    }
+
+    grouping stateful-capabilities {
+        leaf initiated {
+            type boolean;
+            default true;
+        }
+
+        leaf stateful {
+            type boolean;
+            default true;
+        }
+
+        leaf active {
+            type boolean;
+            default true;
+        }
+
+        leaf triggered-initial-sync {
+            type boolean;
+            default true;
+        }
+
+        leaf delta-lsp-sync-capability {
+            type boolean;
+            default true;
+        }
+
+        leaf triggered-resync {
+            type boolean;
+            default true;
+        }
+
+        leaf include-db-version {
+            type boolean;
+            default true;
+        }
+    }
+}
index c873e478ec2fd6dee10f13f36b5a0a2672c67343..4400a0679fc2bbd20b5315b541137a5706b5cd9a 100644 (file)
@@ -4,7 +4,7 @@ module odl-pcep-topology-provider {
 
     import network-topology { prefix nt; }
     import network-topology-pcep { prefix pn; }
-    import pcep-ietf-stateful-app-config { prefix opisc; }
+    import odl-pcep-ietf-stateful-config { prefix opisc; }
 
     description
         "This module contains the base YANG definitions for configuring