Eliminate blueprint from ietf-p2mp-te-lsp 32/104032/7
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 15 Jan 2023 20:40:02 +0000 (21:40 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 16 Jan 2023 18:06:28 +0000 (19:06 +0100)
Blueprint here is completely superfluous: services exposed by it are not
used. Furthermore the tuneable here is bogus -- we either announce it or
we do not. Remove this complexity.

JIRA: BGPCEP-968
Change-Id: I0f7d857a1c1563eee6f13e47b8caa6183093888a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
pcep/ietf-p2mp-te-lsp/src/main/java/org/opendaylight/protocol/pcep/p2mp/te/lsp/P2MPTeLspCapability.java
pcep/ietf-p2mp-te-lsp/src/main/resources/OSGI-INF/blueprint/pcep-p2mp-te-lsp.xml [deleted file]
pcep/ietf-p2mp-te-lsp/src/main/yang/odl-pcep-p2mp-te-lsp.yang
pcep/ietf-p2mp-te-lsp/src/main/yang/pcep-p2mp-te-lsp-config.yang [deleted file]

index b7eb60c38593f1dd0e683a8c247f30dc2ffe3247..1b37bd8ca6bea6f4fc2dc1e28a6a26aaa3db8147 100644 (file)
@@ -11,33 +11,17 @@ import com.google.common.base.MoreObjects;
 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.pcep.p2mp.te.lsp.rev181109.TlvsP2mpCapabilityAug;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.p2mp.te.lsp.rev181109.TlvsP2mpCapabilityAugBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.p2mp.te.lsp.rev181109.p2mp.pce.capability.tlv.P2mpPceCapabilityBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.open.TlvsBuilder;
 
 @MetaInfServices
 public final class P2MPTeLspCapability implements PCEPCapability {
-    private static final TlvsP2mpCapabilityAug PATH_COMPUTATION_CAP_AUG = new TlvsP2mpCapabilityAugBuilder()
-        .setP2mpPceCapability(new P2mpPceCapabilityBuilder().build())
-        .build();
-
-    private final boolean supportsPathComputation;
-
-    public P2MPTeLspCapability() {
-        this(true);
-    }
-
-    // FIXME: this should return distinct implementations
-    public P2MPTeLspCapability(final boolean supportsP2MPTeLspPathComputation) {
-        this.supportsPathComputation = supportsP2MPTeLspPathComputation;
-    }
-
     @Override
     public void setCapabilityProposal(final InetSocketAddress address, final TlvsBuilder builder) {
-        if (supportsPathComputation) {
-            builder.addAugmentation(PATH_COMPUTATION_CAP_AUG);
-        }
+        builder.addAugmentation(new TlvsP2mpCapabilityAugBuilder()
+            .setP2mpPceCapability(new P2mpPceCapabilityBuilder().build())
+            .build());
     }
 
     @Override
@@ -47,6 +31,6 @@ public final class P2MPTeLspCapability implements PCEPCapability {
 
     @Override
     public String toString() {
-        return MoreObjects.toStringHelper(this).add("pathComputation", supportsPathComputation).toString();
+        return MoreObjects.toStringHelper(this).toString();
     }
 }
diff --git a/pcep/ietf-p2mp-te-lsp/src/main/resources/OSGI-INF/blueprint/pcep-p2mp-te-lsp.xml b/pcep/ietf-p2mp-te-lsp/src/main/resources/OSGI-INF/blueprint/pcep-p2mp-te-lsp.xml
deleted file mode 100644 (file)
index 4305cff..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright (c) 2018 AT&T Intellectual Property.
-  ~ 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:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
-           xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
-    <odl:clustered-app-config id="p2mpTeLspConfig"
-        binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.p2mp.te.lsp.config.rev181109.PcepP2mpTeLspConfig"/>
-
-    <!-- Capabilities -->
-    <bean id="p2mpTeLspCapability" class="org.opendaylight.protocol.pcep.p2mp.te.lsp.P2MPTeLspCapability">
-        <argument>
-            <bean factory-ref="p2mpTeLspConfig" factory-method="getPathComputationCapable"/>
-        </argument>
-    </bean>
-
-    <service ref="p2mpTeLspCapability" interface="org.opendaylight.protocol.pcep.PCEPCapability"
-             odl:type="org.opendaylight.protocol.pcep.p2mp.te.lsp.P2MPTeLspCapability"/>
-</blueprint>
index 4f7810285581091aa1ea8761ddb0080cdcad0688..a46fa4c96933628762ecad17cf4e859a9b84156f 100644 (file)
@@ -1,5 +1,6 @@
 module odl-pcep-p2mp-te-lsp {
     yang-version 1;
+    // FIXME: rename module/namespace to odl-pcep-rfc8306
     namespace "urn:opendaylight:params:xml:ns:yang:pcep:p2mp:te:lsp";
     prefix "pcep-p2mp";
 
@@ -9,7 +10,8 @@ module odl-pcep-p2mp-te-lsp {
 
     description
         "This module contains the data model of PCEP extensions defined
-                 in rfc8306.
+         in RFC8306.
+
          Copyright (c)2018 AT&T Services, Inc. All rights reserved.;
 
          This program and the accompanying materials are made available
@@ -46,4 +48,4 @@ module odl-pcep-p2mp-te-lsp {
         uses p2mp-pce-capability-tlv;
         ext:augment-identifier tlvs-p2mp-capability-error-aug;
     }
-}
\ No newline at end of file
+}
diff --git a/pcep/ietf-p2mp-te-lsp/src/main/yang/pcep-p2mp-te-lsp-config.yang b/pcep/ietf-p2mp-te-lsp/src/main/yang/pcep-p2mp-te-lsp-config.yang
deleted file mode 100644 (file)
index 0508bcc..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-module pcep-p2mp-te-lsp-config {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:p2mp:te:lsp:config";
-    prefix "pcep-p2mp-config";
-
-    description
-        "Configuration for the PCEP p2mp te lsp extension.
-         Copyright (c)2018 AT&T Services, 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";
-
-    organization "AT&T Services, Inc.";
-    contact "Claudio D. Gasparini <claudio.gasparini@pantheon.sk>";
-
-    revision "2018-11-09" {
-        description "Initial revision";
-    }
-
-    container pcep-p2mp-te-lsp-config {
-        leaf path-computation-capable {
-            description "Advertize pcep-p2mp-te-lsp path computation capability";
-            type boolean;
-            default false;
-        }
-    }
-}
\ No newline at end of file