Remove node-errors.yang 34/98934/5
authorSangwook Ha <sangwook.ha@verizon.com>
Thu, 9 Dec 2021 07:16:53 +0000 (23:16 -0800)
committerSangwook Ha <sangwook.ha@verizon.com>
Fri, 18 Feb 2022 21:37:48 +0000 (21:37 +0000)
node-errors.yang and its deprecated notifications are only used
in test-provider. Remove the data model and the implementation
in test-provider.

JIRA: OPNFLWPLUG-1119
Change-Id: I43a488d6e86c025837341a16d20e0617d0f4161f
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
model/model-flow-service/src/main/yang/node-errors.yang [deleted file]
test-provider/src/main/java/org/opendaylight/openflowplugin/test/NodeErrorListenerLoggingImpl.java [deleted file]
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestActivator.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java

diff --git a/model/model-flow-service/src/main/yang/node-errors.yang b/model/model-flow-service/src/main/yang/node-errors.yang
deleted file mode 100644 (file)
index d2cddf5..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-module node-error {
-    namespace "urn:opendaylight:node:error:service";
-    prefix node-error;
-
-    import sal-flow {prefix flow; revision-date "2013-08-19";}
-    import flow-errors {prefix error; revision-date "2013-11-16";}
-    import flow-capable-transaction {prefix tr; revision-date "2015-03-04";}
-
-    description "Openflow error messages notifications - depricated in lithium. 
-      Error messages wont be published as standalone entities but rather packed into 
-      special exception which will be delivered inside of RpcResult in case of failure.";
-
-    revision "2014-04-10" {
-        description "Initial revision of errors received from a node";
-    }
-
-    notification hello-failed-error-notification {
-        description "Model for ofp_error-Type=0, Hello protocol failed";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification bad-request-error-notification {
-        description "Model for ofp_error-Type=1, Request was not understood.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification bad-action-error-notification {
-        description "Model for ofp_error-Type=2, Error in action description.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-    
-    notification bad-instruction-error-notification {
-        description "Model for ofp_error-Type=3, Error in instruction list.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-    
-    notification bad-match-error-notification {
-        description "Model for ofp_error-Type=4, Error in match.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification flow-mod-error-notification {
-        description "Model for ofp_error-Type=5 - Problem modifying flow entry.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification group-mod-error-notification {
-        description "Model for ofp_error-Type=6 - Problem modifying group entry.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification port-mod-error-notification {
-        description "Model for ofp_error-Type=7 - Port mod request failed.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification table-mod-error-notification {
-        description "Model for ofp_error-Type=8 - Table mod request failed.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification queue-op-error-notification {
-        description "Model for ofp_error-Type=9 - Queue operation failed.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification switch-config-error-notification {
-        description "Model for ofp_error-Type=10 - Switch Config request failed.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification role-request-error-notification {
-        description "Model for ofp_error-Type=11 - Controller Role request failed.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification meter-mod-error-notification {
-        description "Model for ofp_error-Type=12 - Error in meter.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification table-features-error-notification {
-        description "Model for ofp_error-Type=13 - Setting table features failed.";
-        status deprecated;
-
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-
-    notification experimenter-error-notification {
-        description "Model for ofp_error-Type=65535  - Experimenter Error Messages";
-        status deprecated;
-        
-        uses error:error-message;
-        uses tr:transaction-aware;
-        uses tr:transaction-metadata;
-        uses flow:base-node-error-notification;
-        uses flow:node-error-reference;
-    }
-    
-    container node-error-container {
-        uses error:error-message;
-    }
-}
-
diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/NodeErrorListenerLoggingImpl.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/NodeErrorListenerLoggingImpl.java
deleted file mode 100644 (file)
index 876dae8..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2014, 2015 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
- */
-package org.opendaylight.openflowplugin.test;
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.errors.rev131116.ErrorType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.BadActionErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.BadInstructionErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.BadMatchErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.BadRequestErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.ExperimenterErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.FlowModErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.GroupModErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.HelloFailedErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.MeterModErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.NodeErrorListener;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.PortModErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.QueueOpErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.RoleRequestErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.SwitchConfigErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.TableFeaturesErrorNotification;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.TableModErrorNotification;
-import org.opendaylight.yangtools.yang.common.Uint16;
-import org.opendaylight.yangtools.yang.common.Uint64;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Dummy implementation flushing events into log.
- *
- * @author kramesha
- */
-public class NodeErrorListenerLoggingImpl implements NodeErrorListener {
-
-    private static final Logger LOG = LoggerFactory.getLogger(NodeErrorListenerLoggingImpl.class);
-
-    @Override
-    @Deprecated
-    public void onBadActionErrorNotification(final BadActionErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onBadInstructionErrorNotification(final BadInstructionErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onBadMatchErrorNotification(final BadMatchErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onBadRequestErrorNotification(final BadRequestErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onExperimenterErrorNotification(final ExperimenterErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onFlowModErrorNotification(final FlowModErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onGroupModErrorNotification(final GroupModErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onHelloFailedErrorNotification(final HelloFailedErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onMeterModErrorNotification(final MeterModErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onPortModErrorNotification(final PortModErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onQueueOpErrorNotification(final QueueOpErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onRoleRequestErrorNotification(final RoleRequestErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onSwitchConfigErrorNotification(final SwitchConfigErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onTableFeaturesErrorNotification(final TableFeaturesErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    @Override
-    @Deprecated
-    public void onTableModErrorNotification(final TableModErrorNotification notification) {
-        LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
-                notification.getTransactionId().getValue()));
-    }
-
-    private static String toStr(final ErrorType type, final Uint16 code, final Uint64 xid) {
-        return "[Type=" + type + ", Code=" + code + ", Xid =" + xid + "]";
-    }
-}
index 19277ed3b69780e5183454f400fb6d26f3be55e2..ce2880ef24300a27117beb69b54a194b4f255ee3 100644 (file)
@@ -13,7 +13,6 @@ import java.util.Map;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.mdsal.binding.api.DataBroker;
-import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -87,7 +86,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.NodeErrorListener;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.util.BindingMap;
 import org.opendaylight.yangtools.yang.common.Uint16;
@@ -103,20 +101,15 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
     private final DataBroker dataBroker;
     private final BundleContext ctx;
     private final String originalFlowName = "Foo";
-    private final NodeErrorListener nodeErrorListener = new NodeErrorListenerLoggingImpl();
     private Node testNode12;
     private final String originalGroupName = "Foo";
-    private final NotificationService notificationService;
 
-    public OpenflowPluginBulkGroupTransactionProvider(final DataBroker dataBroker,
-            final NotificationService notificationService, final BundleContext ctx) {
+    public OpenflowPluginBulkGroupTransactionProvider(final DataBroker dataBroker, final BundleContext ctx) {
         this.dataBroker = dataBroker;
-        this.notificationService = notificationService;
         this.ctx = ctx;
     }
 
     public void init() {
-        notificationService.registerNotificationListener(nodeErrorListener);
         ctx.registerService(CommandProvider.class.getName(), this, null);
         createTestFlow(createTestNode(null), null, null);
     }
index 245e4d556de4c3f531cff2d937c70227c13edf11..d7a97d4cc3311fffcc310b5b42e537b973babd6b 100644 (file)
@@ -13,7 +13,6 @@ import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.mdsal.binding.api.DataBroker;
-import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -93,7 +92,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.MetadataBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.NodeErrorListener;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.util.BindingMap;
 import org.opendaylight.yangtools.yang.common.Uint16;
@@ -110,18 +108,13 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
     private final DataBroker dataBroker;
     private final BundleContext ctx;
     private final String originalFlowName = "Foo";
-    private final NodeErrorListener nodeErrorListener = new NodeErrorListenerLoggingImpl();
-    private final NotificationService notificationService;
 
-    public OpenflowPluginBulkTransactionProvider(final DataBroker dataBroker,
-            final NotificationService notificationService, final BundleContext ctx) {
+    public OpenflowPluginBulkTransactionProvider(final DataBroker dataBroker, final BundleContext ctx) {
         this.dataBroker = dataBroker;
-        this.notificationService = notificationService;
         this.ctx = ctx;
     }
 
     public void init() {
-        notificationService.registerNotificationListener(nodeErrorListener);
         ctx.registerService(CommandProvider.class.getName(), this, null);
         createTestFlow(createTestNode(null), null, null);
     }
index 7865b0817eba5a47a6d3948521fbe5bb1aa11a6c..a7aeb6482f6de9c6180be275cb0703f9e96dab62 100644 (file)
@@ -77,10 +77,10 @@ public class OpenflowpluginTestActivator implements AutoCloseable {
                 new OpenflowpluginTestTopologyNotification(notificationService);
         this.cmdTopologyNotification = openflowpluginTestTopologyNotification;
         OpenflowPluginBulkTransactionProvider openflowPluginBulkTransactionProvider =
-                new OpenflowPluginBulkTransactionProvider(dataBroker, notificationService, ctx);
+                new OpenflowPluginBulkTransactionProvider(dataBroker, ctx);
         this.bulkCmdProvider = openflowPluginBulkTransactionProvider;
         OpenflowPluginBulkGroupTransactionProvider openflowPluginBulkGroupTransactionProvider =
-                new OpenflowPluginBulkGroupTransactionProvider(dataBroker, notificationService, ctx);
+                new OpenflowPluginBulkGroupTransactionProvider(dataBroker, ctx);
         this.groupCmdProvider = openflowPluginBulkGroupTransactionProvider;
     }
 
index eff31def559976228cf1d0214b66b29fca5d30b4..f9675f5dab5837d1179a6f2cecd0dc710da0e1be 100644 (file)
@@ -160,7 +160,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.protocol.match.fields.PbbBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.vlan.match.fields.VlanIdBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev140410.NodeErrorListener;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.util.BindingMap;
 import org.opendaylight.yangtools.yang.common.Uint16;
@@ -183,7 +182,6 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     private static final String DEST_MAC_ADDRESS = "ff:ff:ff:ff:ff:ff";
     private static final String SRC_MAC_ADDRESS = "00:00:00:00:23:ae";
     private final SalFlowListener flowEventListener = new FlowEventListenerLoggingImpl();
-    private final NodeErrorListener nodeErrorListener = new NodeErrorListenerLoggingImpl();
     private final NotificationService notificationService;
 
     public OpenflowpluginTestCommandProvider(final DataBroker dataBroker, final NotificationService notificationService,
@@ -196,7 +194,6 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     public void init() {
         // For switch events
         notificationService.registerNotificationListener(flowEventListener);
-        notificationService.registerNotificationListener(nodeErrorListener);
         ctx.registerService(CommandProvider.class.getName(), this, null);
         createTestFlow(createTestNode(null), null, null);
     }