+++ /dev/null
-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;
- }
-}
-
+++ /dev/null
-/*
- * 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 + "]";
- }
-}
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;
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;
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);
}
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;
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;
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);
}
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;
}
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;
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,
public void init() {
// For switch events
notificationService.registerNotificationListener(flowEventListener);
- notificationService.registerNotificationListener(nodeErrorListener);
ctx.registerService(CommandProvider.class.getName(), this, null);
createTestFlow(createTestNode(null), null, null);
}