Skip to content

Could not fetch schema node: /openconfig-interfaces:interfaces #727

@ygorelik

Description

@ygorelik

Current Behavior

When trying to get BGP and Interfaces using openconfig model, the YDK fails to encode interfaces payload with this error:

YPYCoreError:  Could not fetch schema node: /openconfig-interfaces:interfaces

The error appears due to missing reference to SchemaNodeImpl in the lys_node->priv.

Your Script

        # Initialize services
        provider = NetconfServiceProvider("127.0.0.1", "admin", "admin", 12022, )
        crud = CRUDService()
        codec_service = CodecService()
        codec_provider = CodecServiceProvider()
        codec_provider.encoding = EncodingFormat.XML
         
        # First, create the top-level Bgp and Interface objects
        bgp_filter = openconfig_bgp.Bgp()
        int_filter = openconfig_interfaces.Interfaces()
    
        # Create read filter
        read_filter = Filter(bgp_filter, int_filter)

        # Call the CRUD read
        result = crud.read_config(provider, read_filter)
    
        # Print configuration in XML format
        for entity in result:
            xml_encode = codec_service.encode(codec_provider, entity)
            print(xml_encode)

Logs

test.log

System Information

Python2.7
YDK0.7.1a

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions