diff options
author | Fangyin Hu <fangyinx.hu@intel.com> | 2017-10-25 21:47:04 -0700 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2017-10-26 06:01:43 +0000 |
commit | eb9eec208b6e66bf585546ffe5a9554a48fe1208 (patch) | |
tree | a590e05dd3c7783460d5c9fa88d8593b3b17e7cb /resources/libraries/python/SFC/VerifyPacket.py | |
parent | 977851f65718fb82d804dc095a2ddd9735a67b89 (diff) |
Update the NSH protocol header fields
Fix the NSH SFC functional test cases failed issues.
Change-Id: I5d49b50a8c0958dc8db4bc10d6852f0cf4e77962
Signed-off-by: Fangyin Hu <fangyinx.hu@intel.com>
Diffstat (limited to 'resources/libraries/python/SFC/VerifyPacket.py')
-rw-r--r-- | resources/libraries/python/SFC/VerifyPacket.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/resources/libraries/python/SFC/VerifyPacket.py b/resources/libraries/python/SFC/VerifyPacket.py index 189301002c..84eb6aa0a2 100644 --- a/resources/libraries/python/SFC/VerifyPacket.py +++ b/resources/libraries/python/SFC/VerifyPacket.py @@ -106,9 +106,14 @@ class VerifyPacket(object): # get the NSH packet and check it nsh_pkt = NSH(payload_data[8:32]) - if nsh_pkt.flags != sfccon.NSH_FLAGS: - raise RuntimeError("Unexpected NSH flags: {0}". - format(nsh_pkt.flags)) + if nsh_pkt.Version != 0: + raise RuntimeError("Unexpected NSH version: {0}". + format(nsh_pkt.Version)) + + print type(nsh_pkt.OAM) + if nsh_pkt.OAM != 0 or nsh_pkt.OAM != 1: + raise RuntimeError("Unexpected NSH OAM: {0}". + format(nsh_pkt.OAM)) if nsh_pkt.length != sfccon.NSH_HEADER_LENGTH: raise RuntimeError("NSH length {0} incorrect". |