mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:41:21 +00:00
lib: add 2string for zapi nhg result codes
Add a utility '2string' function for daemon nhg result codes. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
53c42c82de
commit
90b0718e07
@ -741,6 +741,29 @@ enum zclient_send_status {
|
|||||||
ZCLIENT_SEND_BUFFERED = 1
|
ZCLIENT_SEND_BUFFERED = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline const char *
|
||||||
|
zapi_nhg_notify_owner2str(enum zapi_nhg_notify_owner note)
|
||||||
|
{
|
||||||
|
const char *ret = "UNKNOWN";
|
||||||
|
|
||||||
|
switch (note) {
|
||||||
|
case ZAPI_NHG_FAIL_INSTALL:
|
||||||
|
ret = "ZAPI_NHG_FAIL_INSTALL";
|
||||||
|
break;
|
||||||
|
case ZAPI_NHG_INSTALLED:
|
||||||
|
ret = "ZAPI_NHG_INSTALLED";
|
||||||
|
break;
|
||||||
|
case ZAPI_NHG_REMOVE_FAIL:
|
||||||
|
ret = "ZAPI_NHG_REMOVE_FAIL";
|
||||||
|
break;
|
||||||
|
case ZAPI_NHG_REMOVED:
|
||||||
|
ret = "ZAPI_NHG_REMOVED";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static inline const char *
|
static inline const char *
|
||||||
zapi_rule_notify_owner2str(enum zapi_rule_notify_owner note)
|
zapi_rule_notify_owner2str(enum zapi_rule_notify_owner note)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user