The update operation in crud_service.py has a _create_update_entity_filter function, which tries to read the entity in the module, the
update_filter = getattr(module, entity._meta_info().name)() fails to fetch the nested class instance(for example Interfaces.Interface() is not accessible) because of the behavior of python getattr function, which does not support consecutive attribute retrievals.
The fix for this issue can be to use the operator.attrgetattr() python function instead.
import operator
update_filter = operator.attrgetter(entity._meta_info().name)(module)()
feel free to contribute to the ydk-gen repository (GitHub - CiscoDevNet/ydk-gen: Generate model-driven APIs from YANG models) by creating a pull request
Comments
0 comments
Please sign in to leave a comment.