Hi Team,
I have below yang model ,
container noise-level {
description
"Noise floor level limits";
leaf max {
description
"Maxinum noise floor level";
tailf:cli-full-command;
tailf:cli-trim-default;
type enumeration {
enum -45dBm0 {
description
"rms value in dBm0";
value -45;
}
enum -50dBm0 {
description
"rms value in dBm0";
value -50;
}
}
default -50dBm0;
}
leaf min {
description
"Mininum noise floor level";
tailf:cli-full-command;
tailf:cli-trim-default;
type enumeration {
enum -55dBm0 {
description
"rms value in dBm0";
value -55;
}
enum -60dBm0 {
description
"rms value in dBm0";
value -60;
}
}
default -60dBm0;
}
must "./min <= ./max" {
error-message "min-noise-floor must be <= max-noise-floor";
}
}
Now I want to compare values of min and max . By putting must statement I am not able to achieve .
Example ,
Router(conf-voi-serv)#cpa threshold noise-level max ?
-45dBm0 rms value in dBm0
-50dBm0 rms value in dBm0
-55dBm0 rms value in dBm0
-60dBm0 rms value in dBm0
Router(conf-voi-serv)#cpa threshold noise-level max -60
Router(conf-voi-serv)#
Router(conf-voi-serv)#
Router(conf-voi-serv)#cpa threshold noise-level max -60
Router(conf-voi-serv)#cpa threshold noise-level min
Router(conf-voi-serv)#cpa threshold noise-level min ?
-55dBm0 rms value in dBm0
-60dBm0 rms value in dBm0
-65dBm0 rms value in dBm0
-70dBm0 rms value in dBm0
Router(conf-voi-serv)#cpa threshold noise-level min -55
min-noise-floor must be <= max-noise-floor
Min should not have larger value than max .