diff options
author | Gokul Singaraju <gs244f@att.com> | 2018-06-11 15:56:32 -0400 |
---|---|---|
committer | Gokul Singaraju <gs244f@att.com> | 2018-06-11 16:00:52 -0400 |
commit | 8acbc1de09497b7060e1c24f5c667d322af66ea6 (patch) | |
tree | f529b7402927a082d0f7cb484320da760b205b42 /veslibrary | |
parent | b7a047c328bfd62139ec753580d64a650da28879 (diff) |
Add sequence changes to Fault events only
Issue-ID: VNFSDK-257
Change-Id: I3f78eb87cb4c6fb63e4fb8d2fe91db1687b4f7b7
Signed-off-by: Gokul Singaraju <gs244f@att.com>
Diffstat (limited to 'veslibrary')
5 files changed, 17 insertions, 11 deletions
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java index 19bde72..d40859c 100644 --- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java +++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java @@ -154,8 +154,12 @@ public class EvelFault extends EvelHeader { category = new EvelOptionString(false, null);
alarm_interface_a = new EvelOptionString(false, null);
additional_info = null;
+ if( severity.equals(EVEL_SEVERITIES.EVEL_SEVERITY_NORMAL))
+ sequence = 0;
+ else
+ sequence = 1;
}
-
+
/**************************************************************************//**
* Add an additional value name/value pair to the Fault.
*
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelHeader.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelHeader.java index 9f1d3de..918b5d4 100644 --- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelHeader.java +++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelHeader.java @@ -96,7 +96,7 @@ public class EvelHeader { PRIORITIES priority;
Long start_epoch_microsec = 0L;
Long last_epoch_microsec = 0L;
- int sequence;
+ int sequence = 0;
/***************************************************************************/
/* Optional fields */
@@ -111,7 +111,7 @@ public class EvelHeader { /**************************************************************************//**
* Unique sequence number for events from this VNF.
*****************************************************************************/
- static int event_sequence = 1;
+ int event_sequence = 1;
private static final Logger LOGGER = Logger.getLogger( EvelHeader.class.getName() );
protected static void EVEL_EXIT() {
@@ -128,12 +128,12 @@ public class EvelHeader { *
* @param sequence The next sequence number to use.
*****************************************************************************/
- void evel_set_next_event_sequence( int sequence)
+ void evel_set_next_event_sequence( int seqnce)
{
EVEL_ENTER();
LOGGER.info(MessageFormat.format("Setting event sequence to {0}, was {1} ", sequence, event_sequence));
- event_sequence = sequence;
+ sequence = seqnce;
EVEL_EXIT();
}
@@ -167,10 +167,14 @@ public class EvelHeader { /***************************************************************************/
this.event_domain = DOMAINS.EVEL_DOMAIN_HEARTBEAT;
if(ev_id == null){
+ event_sequence ++;
+ sequence = event_sequence;
event_id = MessageFormat.format("{0}", event_sequence);
LOGGER.warning("WARNING:not confirming to Common Event Format 28.3 standard");
- } else
+ } else {
event_id = ev_id;
+ sequence = 0;
+ }
event_name = eventname;
start_epoch_microsec = last_epoch_microsec;
last_epoch_microsec = System.nanoTime()/1000;
@@ -231,11 +235,9 @@ public class EvelHeader { reporting_entity_name = hostname;
source_name = hostname;
- sequence = event_sequence;
major_version = EVEL_HEADER_MAJOR_VERSION;
minor_version = EVEL_HEADER_MINOR_VERSION;
- event_sequence++;
/***************************************************************************/
/* Optional parameters. */
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelOther.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelOther.java index c6fe75c..31385ed 100644 --- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelOther.java +++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelOther.java @@ -40,7 +40,7 @@ import org.slf4j.helpers.MessageFormatter; public class EvelOther extends EvelHeader {
int major_version = 1;
- int minor_version = 1;
+ int minor_version = 0;
/***************************************************************************/
/* Mandatory fields */
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelScalingMeasurement.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelScalingMeasurement.java index df143ff..669a6ca 100644 --- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelScalingMeasurement.java +++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelScalingMeasurement.java @@ -37,7 +37,7 @@ import org.slf4j.helpers.MessageFormatter; public class EvelScalingMeasurement extends EvelHeader {
int major_version = 2;
- int minor_version = 1;
+ int minor_version = 0;
/**************************************************************************//**
* CPU Usage.
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelThresholdCross.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelThresholdCross.java index 7b7ec51..9d28b4a 100644 --- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelThresholdCross.java +++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelThresholdCross.java @@ -40,7 +40,7 @@ public class EvelThresholdCross extends EvelHeader { int major_version = 1;
- int minor_version = 1;
+ int minor_version = 0;
/**************************************************************************//**
* Alert types.
|