External api proposal
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / translator / ErrorV10Translator.java
index a5e3ec6f3f141a738ede759c506b33c1c3297c4e..29354dd0e66ce60db82c2bb6da3c0d6cb145b482 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2013-2014 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,
@@ -11,7 +11,8 @@ import java.math.BigInteger;
 
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.errors.rev131116.ErrorType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotificationBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev131103.TransactionId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev150304.TransactionId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;
 
 /**
@@ -35,18 +36,20 @@ public class ErrorV10Translator extends AbstractErrorTranslator {
         }
         return type;
     }
-    
+
     /**
      * @param message
      * @param errorType
+     * @param node
      * @return translated error message of general type (OF-1.0)
      */
     @Override
-    public org.opendaylight.yang.gen.v1.urn.opendaylight.flow.errors.rev131116.ErrorMessage getGranularNodeErrors(ErrorMessage message, ErrorType errorType){
+    public org.opendaylight.yang.gen.v1.urn.opendaylight.flow.errors.rev131116.ErrorMessage getGranularNodeErrors(ErrorMessage message, ErrorType errorType, NodeRef node){
         NodeErrorNotificationBuilder nodeErrBuilder = new NodeErrorNotificationBuilder();
         nodeErrBuilder.setTransactionId(new TransactionId(BigInteger.valueOf(message.getXid())));
         nodeErrBuilder.setType(errorType);
         nodeErrBuilder.setCode(message.getCode());
+        nodeErrBuilder.setNode(node);
 
         if (message.getData() != null) {
             nodeErrBuilder.setData(new String(message.getData()));