package org.opendaylight.controller.protocol_plugin.openflow.internal;
-import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import org.opendaylight.controller.protocol_plugin.openflow.core.IController;
import org.opendaylight.controller.protocol_plugin.openflow.core.IMessageListener;
import org.opendaylight.controller.protocol_plugin.openflow.core.ISwitch;
-import org.opendaylight.controller.protocol_plugin.openflow.vendorextension.v6extension.V6Error;
-import org.openflow.protocol.OFError;
-import org.openflow.protocol.OFFlowMod;
-import org.openflow.protocol.OFFlowRemoved;
-import org.openflow.protocol.OFMessage;
-import org.openflow.protocol.OFPort;
-import org.openflow.protocol.OFType;
-import org.openflow.protocol.action.OFAction;
-
import org.opendaylight.controller.sal.core.ContainerFlow;
import org.opendaylight.controller.sal.core.IContainerListener;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.utils.GlobalConstants;
import org.opendaylight.controller.sal.utils.HexEncode;
import org.opendaylight.controller.sal.utils.NodeCreator;
-import org.opendaylight.controller.sal.utils.StatusCode;
import org.opendaylight.controller.sal.utils.Status;
+import org.opendaylight.controller.sal.utils.StatusCode;
+import org.openflow.protocol.OFError;
+import org.openflow.protocol.OFFlowMod;
+import org.openflow.protocol.OFFlowRemoved;
+import org.openflow.protocol.OFMessage;
+import org.openflow.protocol.OFPort;
+import org.openflow.protocol.OFType;
+import org.openflow.protocol.action.OFAction;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.slf4j.Logger;
}
if (result instanceof Boolean) {
return ((Boolean) result == Boolean.TRUE) ? new Status(
- StatusCode.SUCCESS, null) : new Status(
+ StatusCode.SUCCESS, rid) : new Status(
StatusCode.TIMEOUT, errorString(null, action,
"Request Timed Out"));
} else if (result instanceof OFError) {
OFError res = (OFError) result;
- if (res.getErrorType() == V6Error.NICIRA_VENDOR_ERRORTYPE) {
- V6Error er = new V6Error(res);
- byte[] b = res.getError();
- ByteBuffer bb = ByteBuffer.allocate(b.length);
- bb.put(b);
- bb.rewind();
- er.readFrom(bb);
- return new Status(StatusCode.INTERNALERROR,
- errorString("program", action,
- "Vendor Extension Internal Error"));
- }
return new Status(StatusCode.INTERNALERROR, errorString(
"program", action, Utils.getOFErrorString(res)));
} else {
return new Status(StatusCode.TIMEOUT, errorString(null,
action, "Request Timed Out"));
} else if (msg2 == null) {
- return new Status(StatusCode.SUCCESS, null);
+ return new Status(StatusCode.SUCCESS, rid);
}
} else if (result instanceof OFError) {
return new Status(StatusCode.INTERNALERROR, errorString(
}
if (result instanceof Boolean) {
return ((Boolean) result == Boolean.TRUE) ? new Status(
- StatusCode.SUCCESS, null) : new Status(
+ StatusCode.SUCCESS, rid) : new Status(
StatusCode.TIMEOUT, errorString(null, action,
"Request Timed Out"));
} else if (result instanceof OFError) {
}
if (result instanceof Boolean) {
return ((Boolean) result == Boolean.TRUE) ? new Status(
- StatusCode.SUCCESS, null) : new Status(
+ StatusCode.SUCCESS, rid) : new Status(
StatusCode.TIMEOUT, errorString(null, action,
"Request Timed Out"));
} else if (result instanceof OFError) {