Hi,
I need to design a CLI command using YANG where the user can configure one or multiple SSH MAC algorithms. Also, they can remove one or more algorithms in the “no” form. However, none of the methods I have tried meet my requirements.
container mac-algorithm {
choice mac-algo {
description "Configure SSH MACs algorithms.";
case algo {
leaf-list mac-algos {
leaf hmac-sha1 {
description "Configure hmac-sha1 algo";
type empty;
}
leaf hmac-sha2-256 {
description "Configure hmac-sha2-256 algo";
type empty;
}
leaf hmac-sha2-512 {
description "Configure hmac-sha2-512 algo";
type empty;
}
leaf "hmac-sha1-etm-openssh.com" {
description "Configure hmac-sha1-etm@openssh.com algo";
type empty;
}
leaf "hmac-sha2-256-etm-openssh.com" {
description "Configure hmac-sha2-256-etm@openssh.com algo";
type empty;
}
leaf "hmac-sha2-512-etm-openssh.com" {
description "Configure hmac-sha2-512-etm@openssh.com algo";
type empty;
}
}
}
}
}