typedef utilities-enumeration
{
type enumeration
{
enum all-utilities;
enum util-a-enum;
enum util-a-enum;
enum util-a-enum;
enum util-a-enum;
}
default all-utilities;
}
grouping utility-type
{
leaf utility-name
{
type utility-enumeration;
}
}
grouping utility-config
{
container some-util-config
{
.
.
.
}
}
grouping util-a-config-type
{
container util-a-config
{
uses utility-config;
must "../utility[utility-name]/utility-name = util-a-enum"
{
error-message "The util-a-enum must be specified for this utility";
}
}
}
grouping application-type
{
container utilities
{
list utility
{
uses utility-type;
key utility-name;
uses util-a-config-type;
uses util-b-config-type;
}
}
}
What needs to happen is that if util-a-config-type is configured as a utility, the utility-name should read util-a-enum. A similar thing needs to happen for util-b-config, etc.
However, the must statement in util-a-config is unable to find utility-name, and the commit fails. I have tried various paths and none worked.
How should the xpath be specified in this must statement?
What debug information can I use to understand how confd evaluates the must statement, so I can figure out the xpath by myself?