Using capability in bbf-software-management.yang #2143
-
Hello!
When I am add more then one capabiliy then libyang (function lyd_new_path) didn't recognize value and return LY_EVALID: 2023-12-12T13:29:38+00:00 [T 6] DEBUG: set_state_value (76): Set state field value: xpath="/ietf-hardware:hardware/component[name='switch']/bbf-software-management:software/software[name='cpu_sw']/capability", val="download-target-selection-by-system,activate" 2023-12-12T13:29:38+00:00 [T 6] DEBUG: set_state_value (86): Error from lyd_new_path(): ret_code=7 What am I doing wrong? UPD: with only one capability all work successful UPD2: what do I expect in the response
UPD3: capability from bbf-software-management.yang ... list software { ... leaf-list capability { type identityref { base capability; } description "A capability supported by the server for this software."; } ... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Just create the capabilities one-by-one, you cannot set both values in a single |
Beta Was this translation helpful? Give feedback.
-
Not success on one-by-one. On add second value got error LY_EEXIST [T 28] DEBUG: set_state_value (77): Set state field value: xpath="/ietf-hardware:hardware/component[name='switch']/bbf-software-management:software/software[name='cpu_sw']/capability", val="download-target-selection-by-system,activate", parent=0x56d41610 [T 28] DEBUG: set_state_value (81): Try to set comma sepereted value as leaflist [T 28] DEBUG: set_state_value (89): .. try add leaf-list value 'download-target-selection-by-system' [T 28] DEBUG: set_state_value (89): .. try add leaf-list value 'activate' [T 28] DEBUG: set_state_value (92): .. error from lyd_new_path(): ret_code=4 |
Beta Was this translation helpful? Give feedback.
Just create the capabilities one-by-one, you cannot set both values in a single
lyd_new_path()
call.