Hi Community,
I’m trying to build a POC application that sends notification to a Netconf stream.
I’m using the standard ietf-alarms.yang model where alarm-type-id is defined as identity.
The model also define ‘notification alarm-notification’ which is what I’m trying to use.
I have the following code which try to build the notification XML:
static void send_notifalarm()
{
confd_tag_value_t vals[7];
int i = 0;
struct confd_identityref idref;
idref.id = al_alarm_type_id;
idref.ns = al__ns;
CONFD_SET_TAG_XMLBEGIN(&vals[i], al_alarm_notification, al__ns); i++;
CONFD_SET_TAG_STR(&vals[i], al_resource, "//object=mcp-1800//slot=msa"); i++;
CONFD_SET_TAG_IDENTITYREF(&vals[i], al_alarm_type_id, idref); i++;
CONFD_SET_TAG_STR(&vals[i], al_alarm_type_qualifier, "NE-1800"); i++;
CONFD_SET_TAG_ENUM_VALUE(&vals[i], al_perceived_severity, 3); i++;
CONFD_SET_TAG_STR(&vals[i], al_alarm_text, "Hello my first alarm in Muse!"); i++;
CONFD_SET_TAG_XMLEND(&vals[i], al_alarm_notification, al__ns); i++;
send_notification(vals, i);
}
However, when sending the notification, in the devel.log I see the following error:
26-Jan-2020::20:45:56.495 localhost confd[11470]: devel-c Failed to send notification for stream notif: /alarm-notification/alarm-type-id: {44,{1913099140,1821525234}}: “al:alarm-type-id” is not a valid value.
I read through the RFCs/ConfD User Guide/WWW and many more resources but could not understand how do I need to fill alarm-type-id correctly in the notification (XML).
Any help will be appreciated.
Doron