summaryrefslogtreecommitdiffhomepage
path: root/tools/pyang_plugins
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-03-02 11:42:04 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-03 11:44:19 +0900
commit3bb006e8a55ebc97f4036c75427ec5fdf770bab3 (patch)
tree3c33013c4329611e82f22a5341cc9add3f5d525e /tools/pyang_plugins
parent271945b41d5d8056bbd9eef71acadb940665a96d (diff)
config: skip identity and use string as the data type
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'tools/pyang_plugins')
-rw-r--r--tools/pyang_plugins/bgpyang2golang.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/pyang_plugins/bgpyang2golang.py b/tools/pyang_plugins/bgpyang2golang.py
index f65fa1c4..f7bce316 100644
--- a/tools/pyang_plugins/bgpyang2golang.py
+++ b/tools/pyang_plugins/bgpyang2golang.py
@@ -92,10 +92,6 @@ def emit_golang(ctx, module, fd):
emit_typedef(ctx, ctx.get_module('bgp-multiprotocol'))
emit_typedef(ctx, ctx.get_module('bgp-operational'))
- emit_identity(ctx, ctx.get_module('bgp-policy'))
- #emit_identity(ctx, ctx.get_module('routing-policy'))
- emit_identity(ctx, ctx.get_module('bgp-multiprotocol'))
- emit_identity(ctx, ctx.get_module('bgp-operational'))
for struct in ctx.golang_struct_def:
struct_name = struct.arg
@@ -128,10 +124,7 @@ def emit_class_def(ctx, c, struct_name):
# case identityref
if type_name == 'identityref':
- base_module = type_obj.i_orig_module.i_prefix
- base_name = type_obj.i_type_spec.base.arg
- ref = lookup_identity(ctx, base_module, base_name)
- emit_type_name = ref.golang_name
+ emit_type_name = 'string'
# case leafref
elif type_name == 'leafref':