zebra: adjust the warnings for ESI of evpn-mh

Since there are two kinds of ESI (Type-0 and Type-3), the warnings
should distinguish between the two cases.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
This commit is contained in:
anlan_cs 2022-03-30 21:45:32 -04:00
parent 4037154240
commit 2e39ebbb09

View File

@ -3392,7 +3392,8 @@ DEFPY(zebra_evpn_es_id,
ret = zebra_evpn_es_type0_esi_update(zif, zero_esi);
if (ret == -1) {
vty_out(vty, "%%Failed to clear ES local id\n");
vty_out(vty,
"%% Failed to clear ES local id or ESI name\n");
return CMD_WARNING;
}
} else {
@ -3404,13 +3405,14 @@ DEFPY(zebra_evpn_es_id,
if (esi_str) {
if (!str_to_esi(esi_str, &esi)) {
vty_out(vty, "%% Malformed ESI\n");
vty_out(vty, "%% Malformed ESI name\n");
return CMD_WARNING;
}
ret = zebra_evpn_es_type0_esi_update(zif, &esi);
} else {
if (!es_lid) {
vty_out(vty, "%%Specify local ES ID\n");
vty_out(vty,
"%% Specify ES local id or ESI name\n");
return CMD_WARNING;
}
ret = zebra_evpn_es_lid_update(zif, es_lid);