If the must-message is missing, the input file will compile, but the warning message will say "(null)" which won't be helpful for users to fix the problem.
object newbo { help "Testing dependencies"; must ("gid" && !"newbie description"); must-message "To configure newbo, newbie gid but not description must be set"; } object newbie { help "Newbie section"; object "description" { help "Description"; type string; } object gid { help "Group ID"; attribute gname { help "Group Name"; type string; } attribute id { type enum int { choice apg { help "APG user"; value 1; } choice ipg { help "IPG user"; value 2; } } } }
user@router# set newbo [edit] user@router# show version "8.1I0 [user]"; ## ## Warning: To configure newbo, newbie gid but not description must be set ## newbo; [edit] user@router# set newbie gid [edit] user@router# show version "8.1I0 [user]"; newbie { gid; } newbo; [edit] user@router# commit check configuration check succeeds [edit]
object newbo { help "Testing dependencies"; must ("newbie gid" && !"newbie description"); } object newbie { help "Newbie section"; object "description" { help "Description"; type string; } object gid { help "Group ID"; attribute gname { help "Group Name"; type string; } attribute id { type enum int { choice apg { help "APG user"; value 1; } choice ipg { help "IPG user"; value 2; } } } } }
user@router# set newbo version "8.1I0 [user]"; ## ## Warning: (null) ## newbo; [edit]