Bump mdsal to 5.0.2
[openflowplugin.git] / test-provider / src / main / java / org / opendaylight / openflowplugin / test / NodeErrorListenerLoggingImpl.java
index 1a70b6abac3610c6637969c61fec80497b5d97fc..bc8d27ac4854a2972cf89588686f721efdb4d31e 100644 (file)
@@ -8,7 +8,6 @@
 
 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;
@@ -26,6 +25,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.node.error.service.rev14041
 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;
 
@@ -40,95 +41,95 @@ public class NodeErrorListenerLoggingImpl implements NodeErrorListener {
 
     @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 + "]";
     }
 }