commit | 2254dcdcf036e731d7c889665926d3258dfb0925 | [log] [tgz] |
---|---|---|
author | Carmelo Cascone <carmelo@opennetworking.org> | Tue Aug 20 17:05:27 2019 -0700 |
committer | Carmelo Cascone <carmelo@opennetworking.org> | Tue Aug 20 17:05:27 2019 -0700 |
tree | 5197c52e1c84f258f5a10c664754e251d49d988e | |
parent | a4a89fb52181668eb6deb2e2e4f6a32e7dbf079a [diff] |
Fix P4RuntimeClient not logging write errors Change-Id: I07d9e3ecdc4bcd7178db2fe5356c984d8ae64d5b
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteRequestImpl.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteRequestImpl.java index 49f85a3..36befeb 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteRequestImpl.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteRequestImpl.java
@@ -200,7 +200,7 @@ // it means we have processed the response error // details and a log message will be produced for // each failed entity. No need to log the top level - // SRE. + // SRE. Otherwise, log a generic WRITE error. client.handleRpcError(t, "WRITE"); } future.complete(response);
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteResponseImpl.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteResponseImpl.java index 35ee132..3ce3251 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteResponseImpl.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteResponseImpl.java
@@ -238,7 +238,7 @@ return setFailAllAndBuild(throwable); } final StatusRuntimeException sre = (StatusRuntimeException) throwable; - if (!sre.getStatus().equals(Status.UNKNOWN)) { + if (sre.getStatus().getCode() != Status.Code.UNKNOWN) { // Error trailers expected only if status is UNKNOWN. return setFailAllAndBuild(throwable); }