From 1cbebfd6a35ee67c0126e2d7410d68597f00cb1e Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Wed, 27 Apr 2016 09:48:03 +0000 Subject: config: don't take into account State struct in Equal() Signed-off-by: ISHIDA Wataru --- tools/pyang_plugins/bgpyang2golang.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/pyang_plugins') diff --git a/tools/pyang_plugins/bgpyang2golang.py b/tools/pyang_plugins/bgpyang2golang.py index 1f6ee7d0..ebe1de8d 100644 --- a/tools/pyang_plugins/bgpyang2golang.py +++ b/tools/pyang_plugins/bgpyang2golang.py @@ -284,6 +284,8 @@ def emit_class_def(ctx, yang_statement, struct_name, prefix): print >> o, '}' for val_name, type_name, typ, elem in equal_elems: + if val_name == 'State': + continue if typ == EQUAL_TYPE_LEAF: print >> o, 'if lhs.{0} != rhs.{0} {{'.format(val_name) print >> o, 'return false' -- cgit v1.2.3