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

Validation error message for leaf-list should be more descriptive #398

Closed
111pontes opened this issue Mar 6, 2017 · 0 comments
Closed

Comments

@111pontes
Copy link
Collaborator

Model validation exception for duplicates provides an indication of the error, but no indication of what node caused the validation error. Same enhancement should be applied to other validation errors (e.g. duplicate keys in a list).

2017-03-06 09:57:00,427 - ydk.services.crud_service - INFO - READ operation completed
Traceback (most recent call last):
  File "./nc-read-xr-ip-rib-ipv4-oper-99-ydk.py", line 78, in <module>
    rib = crud.read(provider, rib)
  File "/usr/local/lib/python2.7/dist-packages/ydk/services/crud_service.py", line 152, in read
    return provider.decode(payload, read_filter)
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/netconf_provider.py", line 91, in decode
    return self.sp_instance.decode(payload, read_filter)
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_provider_plugin.py", line 132, in decode
    XmlDecoder._bind_to_object(payload, entity, self._get_capabilities())
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 65, in _bind_to_object
    XmlDecoder._bind_to_object_helper(curr_rt, top_entity, active_deviation_tables, pretty_p='|-')
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 91, in _bind_to_object_hel
per
    XmlDecoder._bind_to_object_helper(rt[0], instance, deviation_tables, pretty_p + '-|')
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 103, in _bind_to_object_he
lper
    XmlDecoder._bind_to_object_helper(rtchild, child, deviation_tables, pretty_p + '-l')
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 91, in _bind_to_object_hel
per
    XmlDecoder._bind_to_object_helper(rt[0], instance, deviation_tables, pretty_p + '-|')
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 103, in _bind_to_object_he
lper
    XmlDecoder._bind_to_object_helper(rtchild, child, deviation_tables, pretty_p + '-l')
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 103, in _bind_to_object_he
lper
    XmlDecoder._bind_to_object_helper(rtchild, child, deviation_tables, pretty_p + '-l')
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 91, in _bind_to_object_hel
per
    XmlDecoder._bind_to_object_helper(rt[0], instance, deviation_tables, pretty_p + '-|')
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 103, in _bind_to_object_he
lper
    XmlDecoder._bind_to_object_helper(rtchild, child, deviation_tables, pretty_p + '-l')
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 84, in _bind_to_object_hel
per
    entity.__dict__[member.presentation_name] = XmlDecoder._to_real_list_type(rt, member, entity)
  File "/usr/local/lib/python2.7/dist-packages/ydk/providers/_decoder.py", line 149, in _to_real_list_type
    results.append(result)
  File "/usr/local/lib/python2.7/dist-packages/ydk/types.py", line 319, in append
    raise YPYModelError("{} already in list".format(item))
ydk.errors.YPYModelError: 0 already in list
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant