Here is my yang model:
list a {
key name
leaf name{
description "update to the firmware";
tailf:info "reference ";
type leafref {
path "/system/abc/xyz/name";
}
list component-name{
key component;
leaf component {
type string;
config false;
}
leaf upgrade-from {
description "Firmware update version";
tailf:info "Firmware update version";
config false;
tailf:cdb-oper {
tailf:persistent true;
}
type string {
pattern "[a-zA-Z0-9\\-\\.]+";
length 1..40;
}
}
}
}
I am trying to store value in the leaf upgrade-from. I am getting an error “Error: badly formatted or nonexistent path (8): Not a cdb operational data path”
This is my python code snippet for storing it:
cdb.cd(wsock, "/system/fwupdate/apply-image/{%s}" % image_name) #works fine till here
cdb.create(wsock, "component-name/{cimc}") #error over here
cdb.cd(wsock, "component-name/cimc")
str1 = "v-1"
cdb.set_elem(wsock, str1, "upgrade-from")