Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ygorelik opened this issue Mar 27, 2018 · 1 comment
Closed

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

ygorelik opened this issue Mar 27, 2018 · 1 comment
Assignees
Labels
Projects

Comments

@ygorelik
Copy link
Collaborator

ygorelik commented Mar 27, 2018

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

@ygorelik ygorelik added the bug label Mar 27, 2018
@ygorelik ygorelik self-assigned this Mar 27, 2018
@ghost ghost added this to To do in YDK May 1, 2018
@ygorelik
Copy link
Collaborator Author

ygorelik commented May 18, 2018

Found the root cause: the "openconfig-interfaces" module schema was populated in Libyang repository, but not in YDK. Added corresponding check to assure that the module schema is populated in YDK. Added corresponding debug statements. Added sanity test.

See log file for details
test_727.log

YDK automation moved this from To do to Done May 18, 2018
ghost pushed a commit that referenced this issue May 22, 2018
* Fixed issue #727

* Fixing Travis

* Fixing Travis

* Fixing Travis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
YDK
  
Done
Development

No branches or pull requests

1 participant