aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/VES5.0/evel
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/VES5.0/evel')
-rw-r--r--vnfs/VES5.0/evel/evel-library/code/evel_library/evel.h11
-rw-r--r--vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c2
-rw-r--r--vnfs/VES5.0/evel/evel-library/code/evel_library/evel_voicequality.c1
-rw-r--r--vnfs/VES5.0/evel/evel-library/code/evel_library/metadata.c24
4 files changed, 36 insertions, 2 deletions
diff --git a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel.h b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel.h
index 896dd9d1..5c05993d 100644
--- a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel.h
+++ b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel.h
@@ -1441,6 +1441,17 @@ EVEL_ERR_CODES evel_initialize(const char * const fqdn,
);
/**************************************************************************//**
+ * Initialize value for vm_name for all coming events
+ * @param source_name Source name string.
+ * Must confirm with EVEL source name standard
+ * @returns Status code
+ * @retval EVEL_SUCCESS On success
+ * @retval ::EVEL_ERR_CODES On failure.
+ *****************************************************************************/
+EVEL_ERR_CODES evel_set_source_name(char * src_name);
+
+
+/**************************************************************************//**
* Clean up the EVEL library.
*
* @note that at present don't expect Init/Term cycling not to leak memory!
diff --git a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c
index d10543b0..fb94dafb 100644
--- a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c
+++ b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c
@@ -477,7 +477,7 @@ EVEL_ERR_CODES event_handler_initialize(const char * const event_api_url,
/***************************************************************************/
if( ring_buf_size < EVEL_EVENT_BUFFER_DEPTH )
{
- log_error_state("Warning: Failed to initialize Ring buffer size to %d. "
+ log_error_state("Warning: Failed to initialize Ring buffer size to %d. ",
ring_buf_size);
goto exit_label;
}
diff --git a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_voicequality.c b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_voicequality.c
index 543d509d..04238d1f 100644
--- a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_voicequality.c
+++ b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_voicequality.c
@@ -467,7 +467,6 @@ void evel_json_encode_voice_quality(EVEL_JSON_BUFFER * jbuf,
DLIST_ITEM * addlInfoItem = NULL;
END_OF_CALL_VOICE_QUALITY_METRICS * vQMetrics = NULL;
- DLIST_ITEM * vQMetricsItem = NULL;
EVEL_ENTER();
diff --git a/vnfs/VES5.0/evel/evel-library/code/evel_library/metadata.c b/vnfs/VES5.0/evel/evel-library/code/evel_library/metadata.c
index fceb893c..b8650745 100644
--- a/vnfs/VES5.0/evel/evel-library/code/evel_library/metadata.c
+++ b/vnfs/VES5.0/evel/evel-library/code/evel_library/metadata.c
@@ -309,6 +309,7 @@ exit_label:
return rc;
}
+
/**************************************************************************//**
* Initialize default values for vm_name and vm_uuid - for testing purposes.
*****************************************************************************/
@@ -341,6 +342,29 @@ void openstack_metadata_initialize()
}
/**************************************************************************//**
+ * Initialize value for vm_name for all coming events
+ * @param source_name Source name string.
+ * Must confirm with EVEL source name standard
+ * @returns Status code
+ * @retval EVEL_SUCCESS On success
+ * @retval ::EVEL_ERR_CODES On failure.
+ *****************************************************************************/
+EVEL_ERR_CODES evel_set_source_name(char * src_name)
+{
+ if( src_name && src_name[0] )
+ {
+ if( strlen(src_name) < MAX_METADATA_STRING ){
+ strcpy(vm_name,src_name);
+ return EVEL_SUCCESS;
+ } else
+ EVEL_DEBUG("Event Source Name too long");
+ }
+ else
+ EVEL_DEBUG("Invalid Event Source Name string");
+ return EVEL_ERR_GEN_FAIL;
+}
+
+/**************************************************************************//**
* Get a string value from supplied JSON by matching the key.
*
* As the structure of the metadata we're looking at is pretty straightforward