Closed rinhomdf closed 3 years ago
This is not a bug, but a request of new feature, YDK API enhancement.
The _neighbor.apply_policy.config.importpolicy is YLeafList object, therefore multiple value assignment could be done this way:
neighbor.apply_policy.config.import_policy.extend(["policy1", "policy2"])
or
neighbor.apply_policy.config.import_policy = "policy1"
neighbor.apply_policy.config.import_policy = "policy2"
Openconfig bundle coming with 0.8.5 (0.1.8) has a type mismatch according to what is reported in the generated docs.
Expected Behavior
The following apply_policy defintion should not return YModel error of incorrect type
Current Behavior
Instead it returns a YModel Error exception when passing values
ydk.errors.YModelError: Invalid value ['policy1', 'policy2'] for 'import_policy'. Got type: 'list'. Expected types: 'str'
It has to be replaced for now with:
System Information
python 3.7.7 ydk 0.8.5 ydk-models-openconfig 0.1.8