From 3bb006e8a55ebc97f4036c75427ec5fdf770bab3 Mon Sep 17 00:00:00 2001 From: Hiroshi Yokoi Date: Mon, 2 Mar 2015 11:42:04 +0900 Subject: config: skip identity and use string as the data type Signed-off-by: FUJITA Tomonori --- tools/pyang_plugins/bgpyang2golang.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'tools/pyang_plugins') 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': -- cgit v1.2.3