ONOS-7078 Fixed inconsistencies when encoding/decoding P4Runtime msgs

Now P4InfoBrowser permits looking up entities by name only, not alias.
Applications should use names as defined in the P4Info when
creating PI IDs (e.g. PiCounterId). However, to avoid breaking support
with BMv2-based pipeline models, when referring to header fields in
tables, i.e. match fields, application should drop any scope identifier
from field names, e.g. "hdr.ethernet.src_addr" should be referred by
applications as "ethernet.src_addr". Such inconsistency will be fixed
with ONOS-7066.

Change-Id: I4d6dceadd233a293b845dba84e62a49680ac930b
diff --git a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java
index b434b4d..80127ff 100644
--- a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java
+++ b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java
@@ -112,8 +112,8 @@
         assertThat(browser.tables().hasName(TABLE_0), is(true));
         assertThat(browser.actions().hasName(SET_EGRESS_PORT), is(true));
 
-        int tableId = browser.tables().getByNameOrAlias(TABLE_0).getPreamble().getId();
-        int actionId = browser.actions().getByNameOrAlias(SET_EGRESS_PORT).getPreamble().getId();
+        int tableId = browser.tables().getByName(TABLE_0).getPreamble().getId();
+        int actionId = browser.actions().getByName(SET_EGRESS_PORT).getPreamble().getId();
 
         assertThat(browser.matchFields(tableId).hasName(STANDARD_METADATA + "." + INGRESS_PORT), is(true));
         assertThat(browser.actionParams(actionId).hasName(PORT), is(true));
@@ -139,7 +139,7 @@
                 .testEquals();
 
         // Table ID.
-        int p4InfoTableId = browser.tables().getByNameOrAlias(tableId.id()).getPreamble().getId();
+        int p4InfoTableId = browser.tables().getByName(tableId.id()).getPreamble().getId();
         int encodedTableId = tableEntryMsg.getTableId();
         assertThat(encodedTableId, is(p4InfoTableId));
 
@@ -150,12 +150,12 @@
         Action actionMsg = tableEntryMsg.getAction().getAction();
 
         // Action ID.
-        int p4InfoActionId = browser.actions().getByNameOrAlias(outActionId.name()).getPreamble().getId();
+        int p4InfoActionId = browser.actions().getByName(outActionId.name()).getPreamble().getId();
         int encodedActionId = actionMsg.getActionId();
         assertThat(encodedActionId, is(p4InfoActionId));
 
         // Action param ID.
-        int p4InfoActionParamId = browser.actionParams(p4InfoActionId).getByNameOrAlias(portParamId.name()).getId();
+        int p4InfoActionParamId = browser.actionParams(p4InfoActionId).getByName(portParamId.name()).getId();
         int encodedActionParamId = actionMsg.getParams(0).getParamId();
         assertThat(encodedActionParamId, is(p4InfoActionParamId));