Use all-caps state in O-RAN timing notification

All synchronization states of LOCKED, HOLDOVER, and FREERUN need to be
all-caps in the state change event notifications. This is a requirement
of O-Cloud Notification API Specification for Event Consumers -
O-RAN.WG6.O-Cloud Notification API-v03.00.

Changed the JSON message body of the Sync OS clock, Sync Sync State,
GNSS sync status and Sync PTP Lock State to ensure all caps.

Updated ptp-notification V2 documentation to reflect the notification
message changes.

Test Plan:
PASS: Build container image
PASS: Manually deploy image and test with v2 client
PASS: Clycled through states
PASS: Restarted ptp-notification application and v2 client
received the events after starting the PTP notification pods.
PASS: ptp-tracking unit tests

Closes-bug: 2006941

Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
Change-Id: I351242504eb0dc79c0b17908609b8a8482f9cad6
This commit is contained in:
Andre Mauricio Zelak 2023-02-10 14:18:53 -03:00
parent a482d1ff96
commit 6305a1a70d
2 changed files with 11 additions and 11 deletions

View File

@ -275,7 +275,7 @@ This operation does not accept a request body.
"data_type": "notification",
"ResourceAddress": "/././sync/sync-status/sync-state",
"value_type": "enumeration",
"value": "Locked"
"value": "LOCKED"
}
]
}
@ -320,7 +320,7 @@ This operation does not accept a request body.
"data_type": "notification",
"ResourceAddress": "/././sync/ptp-status/lock-state",
"value_type": "enumeration",
"value": "Locked"
"value": "LOCKED"
}
]
}
@ -343,7 +343,7 @@ This operation does not accept a request body.
"data_type": "notification",
"ResourceAddress": "/././sync/sync-status/os-clock-sync-state",
"value_type": "enumeration",
"value": "Locked"
"value": "LOCKED"
}
]
}
@ -366,7 +366,7 @@ This operation does not accept a request body.
"data_type": "notification",
"ResourceAddress": "/././sync/sync-status/sync-state",
"value_type": "enumeration",
"value": "Locked"
"value": "LOCKED"
}
]
}
@ -389,7 +389,7 @@ This operation does not accept a request body.
"data_type": "notification",
"ResourceAddress": "/././sync/gnss-status/gnss-sync-status",
"value_type": "enumeration",
"value": "Locked"
"value": "LOCKED"
}
]
}
@ -461,7 +461,7 @@ badRequest (400), itemNotFound (404), tiemout(408)
"data_type": "notification",
"ResourceAddress": "/././sync/sync-status/sync-state",
"value_type": "enumeration",
"value": "Holdover"
"value": "HOLDOVER"
}
]
}

View File

@ -109,7 +109,7 @@ class PtpWatcherDefault:
'data_type': data_type,
'ResourceAddress': resource_address,
'value_type': value_type,
'value': sync_state
'value': sync_state.upper()
}
]
}
@ -552,7 +552,7 @@ class PtpWatcherDefault:
'data_type': constants.DATA_TYPE_NOTIFICATION,
'ResourceAddress': resource_address,
'value_type': constants.VALUE_TYPE_ENUMERATION,
'value': sync_state
'value': sync_state.upper()
}
]
}
@ -598,7 +598,7 @@ class PtpWatcherDefault:
'data_type': constants.DATA_TYPE_NOTIFICATION,
'ResourceAddress': resource_address,
'value_type': constants.VALUE_TYPE_ENUMERATION,
'value': sync_state
'value': sync_state.upper()
}
]
}
@ -656,7 +656,7 @@ class PtpWatcherDefault:
'data_type': constants.DATA_TYPE_NOTIFICATION,
'ResourceAddress': resource_address,
'value_type': constants.VALUE_TYPE_ENUMERATION,
'value': sync_state
'value': sync_state.upper()
}
]
}
@ -729,7 +729,7 @@ class PtpWatcherDefault:
'data_type': constants.DATA_TYPE_NOTIFICATION,
'ResourceAddress': resource_address,
'value_type': constants.VALUE_TYPE_ENUMERATION,
'value': sync_state
'value': sync_state.upper()
}
]
}