sonic-buildimage/device/ragile/x86_64-ragile_ra-b6920-4s-r0/systest.py
pettershao-ragilenetworks 0e0772596e
[ragile] support 32c and 4s platform (#8824)
Signed-off-by: pettershao-ragilenetworks pettershao@ragilenetworks.com

What I did it

Add new platform x86_64-ragile_ra-b6510-32c-r0 (Trident 3)
ASIC Vendor: Broadcom
Switch ASIC: Trident 3
Port Config: 32x100G

Add new platform x86_64-ragile_ra-b6920-4s-r0 (Tomahawk 3)
ASIC Vendor: Broadcom
Switch ASIC: Tomahawk 3
Port Config: 128x100G

-How I did it
Provide device and platform related files.

-How to verify it
show platform fan
show platform ssdhealth
show platform psustatus
show platform summary
show platform syseeprom
show platform temperature
show interface status
2021-11-17 23:49:06 -08:00

44 lines
1.2 KiB
Python

#!/usr/bin/python
# -*- coding: UTF-8 -*-
# * onboard interval check
# * FAN trays
# * PSU
# * temp
import time
import datetime
from monitor import status
def doWork():
a=[];
'''
return: [{'status': '1', 'hw_version': '1.00', 'errcode': 0, 'fan_type': 'M6510-FAN-F', 'errmsg': 'OK', 'Speed': '9778', 'id': 'fan1', 'present': '0', 'sn': '1000000000014'},
{'id': 'fan2', 'errmsg': 'not present', 'errcode': -1},
{'id': 'fan3', 'errmsg': 'not present', 'errcode': -1},
{'id': 'fan4', 'errmsg': 'not present', 'errcode': -1}
]
description: 1.get id
2.errcode equal 0 : dev normal
not equal 0 : get errmsg
3.other message add when all check success
'''
status.checkFan(a)
#status.getTemp(a)
#status.getPsu(a)
nowTime=datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print nowTime
print a
def run(interval):
while True:
try:
time_remaining = interval - time.time()%interval
time.sleep(time_remaining)
doWork()
except Exception as e:
print(e)
if __name__ == '__main__':
interval = 1
run(interval)