void yang_afi_safi_identity2value(const char *key, afi_t *afi, safi_t *safi)
{
	if (strmatch(key, "frr-routing:ipv4-unicast")) {
		*afi = AFI_IP;
		*safi = SAFI_UNICAST;
	} else if (strmatch(key, "frr-routing:ipv6-unicast")) {
		*afi = AFI_IP6;
		*safi = SAFI_UNICAST;
	} else if (strmatch(key, "frr-routing:ipv4-multicast")) {
		*afi = AFI_IP;
		*safi = SAFI_MULTICAST;
	} else if (strmatch(key, "frr-routing:ipv6-multicast")) {
		*afi = AFI_IP6;
		*safi = SAFI_MULTICAST;
	} else if (strmatch(key, "frr-routing:l3vpn-ipv4-unicast")) {
		*afi = AFI_IP;
		*safi = SAFI_MPLS_VPN;
	} else if (strmatch(key, "frr-routing:l3vpn-ipv6-unicast")) {
		*afi = AFI_IP6;
		*safi = SAFI_MPLS_VPN;
	} else if (strmatch(key, "frr-routing:ipv4-labeled-unicast")) {
		*afi = AFI_IP;
		*safi = SAFI_LABELED_UNICAST;
	} else if (strmatch(key, "frr-routing:ipv6-labeled-unicast")) {
		*afi = AFI_IP6;
		*safi = SAFI_LABELED_UNICAST;
	} else if (strmatch(key, "frr-routing:l2vpn-evpn")) {
		*afi = AFI_L2VPN;
		*safi = SAFI_EVPN;
	} else if (strmatch(key, "frr-routing:ipv4-flowspec")) {
		*afi = AFI_IP;
		*safi = SAFI_FLOWSPEC;
	} else if (strmatch(key, "frr-routing:ipv6-flowspec")) {
		*afi = AFI_IP6;
		*safi = SAFI_FLOWSPEC;
	} else {
		*afi = AFI_UNSPEC;
		*safi = SAFI_UNSPEC;
	}
}
void yang_afi_safi_identity2value(const char *key, afi_t *afi, safi_t *safi)
{
	if (strmatch(key, "frr-routing:ipv4-unicast")) {
		*afi = AFI_IP;
		*safi = SAFI_UNICAST;
	} else if (strmatch(key, "frr-routing:ipv6-unicast")) {
		*afi = AFI_IP6;
		*safi = SAFI_UNICAST;
	} else if (strmatch(key, "frr-routing:ipv4-multicast")) {
		*afi = AFI_IP;
		*safi = SAFI_MULTICAST;
	} else if (strmatch(key, "frr-routing:ipv6-multicast")) {
		*afi = AFI_IP6;
		*safi = SAFI_MULTICAST;
	} else if (strmatch(key, "frr-routing:l3vpn-ipv4-unicast")) {
		*afi = AFI_IP;
		*safi = SAFI_MPLS_VPN;
	} else if (strmatch(key, "frr-routing:l3vpn-ipv6-unicast")) {
		*afi = AFI_IP6;
		*safi = SAFI_MPLS_VPN;
	} else if (strmatch(key, "frr-routing:ipv4-labeled-unicast")) {
		*afi = AFI_IP;
		*safi = SAFI_LABELED_UNICAST;
	} else if (strmatch(key, "frr-routing:ipv6-labeled-unicast")) {
		*afi = AFI_IP6;
		*safi = SAFI_LABELED_UNICAST;
	} else if (strmatch(key, "frr-routing:l2vpn-evpn")) {
		*afi = AFI_L2VPN;
		*safi = SAFI_EVPN;
	} else if (strmatch(key, "frr-routing:ipv4-flowspec")) {
		*afi = AFI_IP;
		*safi = SAFI_FLOWSPEC;
	} else if (strmatch(key, "frr-routing:ipv6-flowspec")) {
		*afi = AFI_IP6;
		*safi = SAFI_FLOWSPEC;
	} else {
		*afi = AFI_UNSPEC;
		*safi = SAFI_UNSPEC;
	}
}