-
Notifications
You must be signed in to change notification settings - Fork 78
Could not fetch schema node: /openconfig-interfaces:interfaces #727
Copy link
Copy link
Closed
Labels
Description
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
System Information
Python2.7
YDK0.7.1a
Reactions are currently unavailable