You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"ydk - ERROR - Cannot find 'data' tag in RPC reply from device".
Steps to Reproduce
Query Arista switch with EOS 4.24.1.1F (tested with cEOS-lab-4.24.1.1F) for interface config
Your Script
from ydk.services import NetconfService, Datastore
from ydk.providers import NetconfServiceProvider
from ydk.models.openconfig import openconfig_interfaces as oc_interfaces
import logging
2020-07-29 19:44:00,581 - ydk - INFO - Path where models are to be downloaded: /root/.ydk/172.18.0.3
2020-07-29 19:44:00,588 - ydk - INFO - Connected to 172.18.0.3 on port 830 using ssh with timeout of -1
2020-07-29 19:44:00,599 - ydk - INFO - Executing 'get' RPC on [openconfig-interfaces:interfaces] from running
2020-07-29 19:44:00,607 - ydk - INFO - ============= Sending RPC to device =============
Traceback (most recent call last):
File "b.py", line 31, in
cfg = netconf.get_config(provider, Datastore.running, interfaces)
File "/usr/local/lib/python3.6/dist-packages/ydk/services/netconf_service.py", line 108, in get_config
return _ns_get(provider, source, read_filter, self._ns.get_config)
File "/usr/local/lib/python3.6/dist-packages/ydk/services/netconf_service.py", line 165, in _ns_get
top_result = ns_call(provider, top_filters)
File "/usr/lib/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/dist-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/usr/local/lib/python3.6/dist-packages/ydk/errors/error_handler.py", line 54, in _raise
exec("raise exc from None")
File "", line 1, in
ydk.errors.YServiceProviderError: Cannot find 'data' tag in RPC reply
2020-07-29 19:44:00,624 - ydk - INFO - Disconnected from device
System Information
Python 3.6.9
root@ydk:/var/tmp# pip freeze
bash: pip: command not found
root@ydk:/var/tmp# pip3 freeze
asn1crypto==0.24.0
chardet==3.0.4
cryptography==2.1.4
idna==2.6
keyring==10.6.0
keyrings.alt==3.0
pybind11==2.5.0
pycrypto==2.6.1
pygobject==3.26.1
python-apt==1.6.5+ubuntu0.3
python-debian==0.1.32
pyxdg==0.25
SecretStorage==2.3.1
six==1.11.0
ydk==0.8.4
ydk-models-ietf==0.1.5.post2
ydk-models-openconfig==0.1.8
root@ydk:/var/tmp# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
Expected Behavior
Data tag should be correctly recognized
Current Behavior
"ydk - ERROR - Cannot find 'data' tag in RPC reply from device".
Steps to Reproduce
Query Arista switch with EOS 4.24.1.1F (tested with cEOS-lab-4.24.1.1F) for interface config
Your Script
from ydk.services import NetconfService, Datastore
from ydk.providers import NetconfServiceProvider
from ydk.models.openconfig import openconfig_interfaces as oc_interfaces
import logging
def set_logger():
logger = logging.getLogger("ydk")
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
formatter = logging.Formatter(("%(asctime)s - %(name)s - "
"%(levelname)s - %(message)s"))
handler.setFormatter(formatter)
logger.addHandler(handler)
set_logger()
provider = NetconfServiceProvider(address="172.18.0.3",
port=830,
username="admin",
password="abc123",
protocol="ssh")
netconf = NetconfService()
interfaces = oc_interfaces.Interfaces()
interface = interfaces.Interface()
interface.name = 'Ethernet2'
interfaces.interface.append(interface)
cfg = netconf.get_config(provider, Datastore.running, interfaces)
Logs
2020-07-29 19:44:00,581 - ydk - INFO - Path where models are to be downloaded: /root/.ydk/172.18.0.3
2020-07-29 19:44:00,588 - ydk - INFO - Connected to 172.18.0.3 on port 830 using ssh with timeout of -1
2020-07-29 19:44:00,599 - ydk - INFO - Executing 'get' RPC on [openconfig-interfaces:interfaces] from running
2020-07-29 19:44:00,607 - ydk - INFO - ============= Sending RPC to device =============
2020-07-29 19:44:00,612 - ydk - ERROR - Cannot find 'data' tag in RPC reply from device
Ethernet2 true 300 false 0 Ethernet2 oc-vlan-types:TPID_0X8100 ianaift:ethernetCsmacd false false false false true 00:00:00:00:00:00 SPEED_UNKNOWN false 200 ACCESS 0 0 0 true 0 false false 1500 false false false 1500Traceback (most recent call last):
File "b.py", line 31, in
cfg = netconf.get_config(provider, Datastore.running, interfaces)
File "/usr/local/lib/python3.6/dist-packages/ydk/services/netconf_service.py", line 108, in get_config
return _ns_get(provider, source, read_filter, self._ns.get_config)
File "/usr/local/lib/python3.6/dist-packages/ydk/services/netconf_service.py", line 165, in _ns_get
top_result = ns_call(provider, top_filters)
File "/usr/lib/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/dist-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/usr/local/lib/python3.6/dist-packages/ydk/errors/error_handler.py", line 54, in _raise
exec("raise exc from None")
File "", line 1, in
ydk.errors.YServiceProviderError: Cannot find 'data' tag in RPC reply
2020-07-29 19:44:00,624 - ydk - INFO - Disconnected from device
System Information
Python 3.6.9
root@ydk:/var/tmp# pip freeze
bash: pip: command not found
root@ydk:/var/tmp# pip3 freeze
asn1crypto==0.24.0
chardet==3.0.4
cryptography==2.1.4
idna==2.6
keyring==10.6.0
keyrings.alt==3.0
pybind11==2.5.0
pycrypto==2.6.1
pygobject==3.26.1
python-apt==1.6.5+ubuntu0.3
python-debian==0.1.32
pyxdg==0.25
SecretStorage==2.3.1
six==1.11.0
ydk==0.8.4
ydk-models-ietf==0.1.5.post2
ydk-models-openconfig==0.1.8
root@ydk:/var/tmp# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic