Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Shawn1992's profile - activity

2017-08-04 09:08:41 -0700 received badge  Famous Question (source)
2017-05-16 20:38:32 -0700 received badge  Taxonomist
2016-10-11 10:25:28 -0700 received badge  Popular Question (source)
2016-10-11 10:25:28 -0700 received badge  Notable Question (source)
2016-06-06 05:35:10 -0700 asked a question odl suddenly stop collecting statistics

stop sending OFPTMULTIPARTREQUEST to switch and no OFPTMULTIPARTREPLY received.

2016-06-05 21:02:15 -0700 commented answer How to get the result of adding flows using SalFlowService?

The flow is built OK. The problem is why RpcResult.isSuccessful() always returns true even the flow wasn't added successfully.

2016-06-02 02:07:22 -0700 asked a question What's the usage of TransactionId in AddFlowOutput?

Using SalFlowService to add a flow will return AddFlowOutput which contains a TransactionId. I don't what's that for? What can I do using TransactionId? Can anyone explain to me? Thanks a lot.

2016-06-02 02:02:11 -0700 received badge  Editor (source)
2016-06-02 02:01:24 -0700 asked a question How to get the result of adding flows using SalFlowService?

I was using SalFlowService to add a flow, the boolean value returned from RpcResult.isSuccessful() is always true, but the flow wasn't added actually. Can anyone tell me why this happen and how to get the real result of adding flows. Thanks a lot !

private boolean addFlow(Flow flow, InstanceIdentifier<Node> nodeIID) {
boolean isAdded = false;
AddFlowInputBuilder builder = new AddFlowInputBuilder(flow);
InstanceIdentifier<Table> tableIdentifier = createTableIdentifier(nodeIID);
builder.setNode(new NodeRef(nodeIID));
builder.setFlowTable(new FlowTableRef(tableIdentifier));
builder.setFlowRef(new FlowRef(createFlowIID(nodeIID, flow.getId())));
builder.setTransactionUri(new Uri(flow.getId().getValue()));
logger.info("Flow :" + builder.toString());
try {
    Future<RpcResult<AddFlowOutput>> future = salFlowService.addFlow(builder.build());
    RpcResult<AddFlowOutput> rpcResult = future.get();
    logger.info("rpcResult : " + rpcResult);
    isAdded = rpcResult.isSuccessful();
    if (rpcResult.isSuccessful()) {
        logger.info("rpcResult is Successful");
        AddFlowOutput addFlowOutput = rpcResult.getResult();
        logger.info("AddFlowOutput = " + addFlowOutput);
        logger.info("transactionId = " + addFlowOutput.getTransactionId().getValue());
    }
} catch (InterruptedException | ExecutionException e) {
    logger.error("addFlow", e);
}
logger.info(" Add flow : node[" + nodeIID + "], flowBuilder[" + builder.build() + "]"
            + (isAdded ? "  Successfully " : "  Unsuccessfully"));

return isAdded;

}