Commit d96b041f authored by Lu Xu's avatar Lu Xu 👀

add local link IPv6

parent bc2f0c2b
...@@ -124,4 +124,4 @@ md5sum = 44ae5693f62b7a4dbc98f700f68d8600 ...@@ -124,4 +124,4 @@ md5sum = 44ae5693f62b7a4dbc98f700f68d8600
[vswr-promise] [vswr-promise]
_update_hash_filename_ = promise/check_vswr.py _update_hash_filename_ = promise/check_vswr.py
md5sum = bf3e31fa344dc34d7d1db7bb32217532 md5sum = b5079f4013c59e2e21081e4fef2898c1
...@@ -70,8 +70,43 @@ class RunPromise(GenericPromise): ...@@ -70,8 +70,43 @@ class RunPromise(GenericPromise):
self.logger.info("skipping promise") self.logger.info("skipping promise")
return return
lopcomm_stats_log = self.getConfig('lopcomm-stats-log') lopcomm_stats_log = self.getConfig('lopcomm-stats-log')
data_list = get_data_interval(lopcomm_stats_log, 120)
self.logger.error("lopcomm error:" + lopcomm_stats_log) # notifications = []
# fault_texts = []
# Example of data_list
#('[\n'
# ' {\n'
# ' "notification": {\n'
# ' "@xmlns": "urn:ietf:params:xml:ns:netconf:notification:1.0",\n'
# ' "eventTime": "1970-01-05T00:38:50Z",\n'
# ' "alarm-notif": {\n'
# ' "@xmlns": "urn:o-ran:fm:1.0",\n'
# ' "fault-id": "9",\n'
# ' "fault-source": "Antport1",\n'
# ' "affected-objects": {\n'
# ' "name": "Antport1"\n'
# ' },\n'
# ' "fault-severity": "MAJOR",\n'
# ' "is-cleared": "false",\n'
# ' "fault-text": "PA 1 VSWR Alarm",\n'
# ' "event-time": "1970-01-05T00:38:50Z"\n'
# ' }\n'
# ' }\n'
# ' },\n'
# ']')
if data_list:
for data in data_list:
notification = data['notification']
alarm_notif = notification['alarm-notif']
fault_texts = alarm_notif['fault-text']
if 'VSWR' in fault_texts:
self.logger.error("lopcomm error:" + fault_texts)
else:
self.logger.info("OK")
else:
self.logger.info("No notification, all good")
def test(self): def test(self):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment