diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index 42ef07f3c6d73f9c77842145a83e25458d4f5292..638f19345475130d37468d4ab0020f69b7d97a83 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -59,7 +59,6 @@ class InterfaceHandler(_Handler): address_prefix = get_int (resource_value, 'address_prefix') # 24 mtu = get_int (resource_value, 'mtu' ) # 1500 - yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') yang_if_path = 'interface[name="{:s}"]'.format(if_name) yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) @@ -87,10 +86,6 @@ class InterfaceHandler(_Handler): yang_ipv4_addr.create_path('config/ip', address_ip) yang_ipv4_addr.create_path('config/prefix-length', address_prefix) - LOGGER.info('YangHandler Data:') - for path, dnode in yang_handler.get_data_paths().items(): - LOGGER.info('|-> {:s}: {:s}'.format(str(path), json.dumps(dnode.print_dict()))) - str_path = '/interfaces/interface[name={:s}]'.format(if_name) str_data = yang_if.print_mem('json') json_data = json.loads(str_data) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py index 2a4c19baa7ccdcc177e2724609a87636d1398a8a..f6f61a32403f154578da0247d0e1db24a727b017 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py @@ -36,15 +36,13 @@ class NetworkInstanceInterfaceHandler(_Handler): if IS_CEOS: ni_if_id = if_name + PATH_TMPL = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]' + str_path = PATH_TMPL.format(ni_name, ni_if_id) + if delete: - PATH_TMPL = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]' - str_path = PATH_TMPL.format(ni_name, ni_if_id) str_data = json.dumps({}) return str_path, str_data - str_path = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]'.format( - ni_name, ni_if_id - ) #str_data = json.dumps({ # 'id': if_id, # 'config': {'id': if_id, 'interface': if_name, 'subinterface': sif_index},