Skip to content

YDK fails instantiate some of the generated bundle classes #983

@ygorelik

Description

@ygorelik

Issue tracker is ONLY used for reporting bugs. Please use the YDK Community for any support issues.

Expected Behavior

The generated API must be consistent and stable

Current Behavior

Some of the objects from Cisco IOS XR 6.6.2 bundle cannot be instantiated.

Your Script

from ydk.models.cisco_ios_xr import Cisco_IOS_XR_snmp_agent_cfg as cfg

es = cfg.Snmp.Notification.EntityState()

Logs

(venv) Yakovs-Air:ydk-gen ygorelik$ python scripts/tests/divide.py 
Traceback (most recent call last):
  File "scripts/tests/divide.py", line 3, in <module>
    es = cfg.Snmp.Notification.EntityState()
  File "/Users/ygorelik/ydk-gen/venv/lib/python3.7/site-packages/ydk/models/cisco_ios_xr/Cisco_IOS_XR_snmp_agent_cfg.py", line 5235, in __init__
    self.yang_name = "entity-state"
  File "/Users/ygorelik/ydk-gen/venv/lib/python3.7/site-packages/ydk/models/cisco_ios_xr/Cisco_IOS_XR_snmp_agent_cfg.py", line 5252, in __setattr__
    self._perform_setattr(Snmp.Notification.EntityState, ['switchover', 'oper_status'], name, value)
  File "/Users/ygorelik/ydk-gen/venv/lib/python3.7/site-packages/ydk/types/py_types.py", line 387, in _perform_setattr
    format(name, self.__class__.__name__))
ydk.errors.YModelError: Attempt to assign unknown attribute 'yang_name' to 'EntityState'.

System Information

(venv) Yakovs-Air:ydk-gen ygorelik$ pip list | grep ydk
ydk                         0.8.4
ydk-models-cisco-ios-xe     16.9.3     
ydk-models-cisco-ios-xr     6.6.2      
ydk-models-cisco-ios-xr-663 6.6.3      
ydk-models-ietf             0.1.5.post2
ydk-models-openconfig       0.1.6.post1
ydk-models-ydktest          0.1.0      
ydk-models-ydktest-oc-nis   0.1.0      
ydk-service-gnmi            0.4.0.post4

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions