Issue-ID: HOLMES-44
Change-Id: I2e3f58ad763cd643d4d1f6d36c6ea3aa2456a37f
Signed-off-by: Shiwei Tian <tian.shiwei@zte.com.cn>
private String specificProblem;
private String vfStatus;
private String parentId;
private String specificProblem;
private String vfStatus;
private String parentId;
+ private int alarmIsCleared; //mark as 1 when alarm type is cleared, else mark as 2
+ private int rootFlag; // mark as 1 when alarm is a root alarm , else mark as 2
@Override
public int hashCode() {
@Override
public int hashCode() {
vesAlarm.setFaultFieldsVersion(this.getFaultFieldsVersion());
vesAlarm.setSpecificProblem(this.getSpecificProblem());
vesAlarm.setVfStatus(this.vfStatus);
vesAlarm.setFaultFieldsVersion(this.getFaultFieldsVersion());
vesAlarm.setSpecificProblem(this.getSpecificProblem());
vesAlarm.setVfStatus(this.vfStatus);
+ vesAlarm.setAlarmIsCleared(this.alarmIsCleared);
+ vesAlarm.setRootFlag(this.rootFlag);
"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop");
policyMsg.setTargetType("VM");
policyMsg.setClosedLoopAlarmStart(1484855);
"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop");
policyMsg.setTargetType("VM");
policyMsg.setClosedLoopAlarmStart(1484855);
- policyMsg.setClosedLoopEventStatus(EVENT_STATUS.ONSET);
+ if (vesAlarm.getAlarmIsCleared() == 1) {
+ policyMsg.setClosedLoopEventStatus(EVENT_STATUS.ABATED);
+ } else {
+ policyMsg.setClosedLoopEventStatus(EVENT_STATUS.ONSET);
+ }
policyMsg.setClosedLoopControlName(
"CL-LB-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8");
policyMsg.setVersion("1.0.2");
policyMsg.setClosedLoopControlName(
"CL-LB-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8");
policyMsg.setVersion("1.0.2");
} catch (Exception e) {
throw new CorrelationException("Failed to use post method query data from server");
}
} catch (Exception e) {
throw new CorrelationException("Failed to use post method query data from server");
}
return getResponseEntity(httpResponse);
}
return getResponseEntity(httpResponse);
}