Fix AlarmEventRecord attribute definitions 66/14166/3
authorAllain Legacy <alegacy@redhat.com>
Wed, 12 Feb 2025 12:42:24 +0000 (07:42 -0500)
committerAllain Legacy <alegacy@redhat.com>
Fri, 7 Mar 2025 13:16:01 +0000 (08:16 -0500)
The interface spec defines several attributes using a suffix
of "ID" rather than "Id".  This includes the following attributes:

* resourceTypeID
* resourceID
* probableCauseID
* alarmDefinitionID

The document also defines perceivedSeverity as an integer field
rather than a string.

The following fields are only conditionally mandatory if alarm
corresponds to the condition being represented.  That is,
alarmChangedTime is only meant to be present if the alarm has
been modified, and alarmAcknowledgedTime is only meant to be
present if the alarm has been acknowledged.

Issued-ID: INT-167
Change-Id: Ic01d199a798626088ed002577e21e4d0c559ee16
Signed-off-by: Allain Legacy <alegacy@redhat.com>
test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.4_SMO_succeeds_to_create_alarmSubscription_receive_alarm_notification_and_query_alarm_list.robot
test_scripts/O2IMS_Compliance_Test/o2ims_compliance/schemas/alarm_properties.json
test_scripts/O2IMS_Compliance_Test/o2ims_compliance/schemas/alarms_properties.json

index b75546b..fbea579 100644 (file)
@@ -162,22 +162,22 @@ s1, create alarmSubscription
     # Array       response body
     # Array       $   minItems=1  uniqueItems=true
 
-    # extract resourceTypeId for query with fitler test
-    ${resourceTypeId}      output   $[0].resourceTypeId
+    # extract resourceTypeID for query with fitler test
+    ${resourceTypeID}      output   $[0].resourceTypeID
 
 # s6, query alarm list with filter
     Clear Expectations
     # GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver)
-    # ${resourceTypeId}      output   $[0].resourceTypeId
+    # ${resourceTypeID}      output   $[0].resourceTypeID
     Expect Response Body        ${CURDIR}/schemas/alarms_properties.json
-    ${res}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureMonitoring/v1/alarms?filter=(eq,resourceTypeID,${resourceTypeId})
+    ${res}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureMonitoring/v1/alarms?filter=(eq,resourceTypeID,${resourceTypeID})
     Clear Expectations
     log      ${res}   level=DEBUG
     Integer     response status    200
     Array       response body
     Array       $   minItems=1  uniqueItems=true
     Expect Response Body        ${CURDIR}/schemas/alarms_properties.json
-    ${res}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureMonitoring/v1/alarms    {"filter": "(eq,resourceTypeID,${resourceTypeId};eq,alarmAcknowledged,false)"}
+    ${res}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureMonitoring/v1/alarms    {"filter": "(eq,resourceTypeID,${resourceTypeID};eq,alarmAcknowledged,false)"}
     Clear Expectations
     log      ${res}   level=DEBUG
     Integer     response status    200
index dcd0517..d0ba652 100644 (file)
@@ -4,27 +4,15 @@
         "alarmEventRecordId": {
             "type": "string"
         },
-        "resourceTypeId": {
-            "type": "string"
-        },
         "resourceTypeID": {
             "type": "string"
         },
-        "resourceId": {
-            "type": "string"
-        },
         "resourceID": {
             "type": "string"
         },
-        "alarmDefinitionId": {
-            "type": "string"
-        },
         "alarmDefinitionID": {
             "type": "string"
         },
-        "probableCauseId": {
-            "type": "string"
-        },
         "probableCauseID": {
             "type": "string"
         },
@@ -41,7 +29,7 @@
             "type": "boolean"
         },
         "perceivedSeverity": {
-            "type": "string"
+            "type": "integer"
         },
         "extensions": {
             "type": [
         "alarmDefinitionID",
         "probableCauseID",
         "alarmRaisedTime",
-        "alarmChangedTime",
-        "alarmAcknowledgeTime",
         "alarmAcknowledged",
         "perceivedSeverity",
         "extensions"
     ]
-}
\ No newline at end of file
+}
index 6d4aff5..8f73730 100644 (file)
@@ -6,27 +6,15 @@
             "alarmEventRecordId": {
                 "type": "string"
             },
-            "resourceTypeId": {
-                "type": "string"
-            },
             "resourceTypeID": {
                 "type": "string"
             },
-            "resourceId": {
-                "type": "string"
-            },
             "resourceID": {
                 "type": "string"
             },
-            "alarmDefinitionId": {
-                "type": "string"
-            },
             "alarmDefinitionID": {
                 "type": "string"
             },
-            "probableCauseId": {
-                "type": "string"
-            },
             "probableCauseID": {
                 "type": "string"
             },
@@ -43,7 +31,7 @@
                 "type": "boolean"
             },
             "perceivedSeverity": {
-                "type": "string"
+                "type": "integer"
             },
             "extensions": {
                 "type": [
             "alarmDefinitionID",
             "probableCauseID",
             "alarmRaisedTime",
-            "alarmChangedTime",
-            "alarmAcknowledgeTime",
             "alarmAcknowledged",
             "perceivedSeverity",
             "extensions"
         ]
     }
-}
\ No newline at end of file
+}