package org.opendaylight.openflowplugin.test;
-import java.math.BigInteger;
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.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;
@Override
public void onBadActionErrorNotification(BadActionErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onBadInstructionErrorNotification(BadInstructionErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onBadMatchErrorNotification(BadMatchErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onBadRequestErrorNotification(BadRequestErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onExperimenterErrorNotification(ExperimenterErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onFlowModErrorNotification(FlowModErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onGroupModErrorNotification(GroupModErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onHelloFailedErrorNotification(HelloFailedErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onMeterModErrorNotification(MeterModErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onPortModErrorNotification(PortModErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onQueueOpErrorNotification(QueueOpErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onRoleRequestErrorNotification(RoleRequestErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onSwitchConfigErrorNotification(SwitchConfigErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onTableFeaturesErrorNotification(TableFeaturesErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
@Override
public void onTableModErrorNotification(TableModErrorNotification notification) {
- LOG.error("Error notification ----"
- + toStr(notification.getType(), notification.getCode(), notification.getTransactionId().getValue()));
+ LOG.error("Error notification {}", toStr(notification.getType(), notification.getCode(),
+ notification.getTransactionId().getValue()));
}
- private String toStr(ErrorType type, int code, BigInteger xid) {
+ private String toStr(ErrorType type, Uint16 code, Uint64 xid) {
return "[Type=" + type + ", Code=" + code + ", Xid =" + xid + "]";
}
}