142 lines
5.2 KiB
Plaintext
142 lines
5.2 KiB
Plaintext
*** Settings ***
|
|
Resource ../../../02-Keyword/tsg_bfapi/device/Device.robot
|
|
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
|
Library json
|
|
Library DateTime
|
|
*** Test Cases ***
|
|
Device-SN-Get-v1-00001
|
|
Comment 查询SN列表
|
|
${list} GetSNList
|
|
log ${list}
|
|
Device-SN-Info-Get-v1-00002
|
|
Comment 查询SN信息
|
|
${list} GetSNInfo CBT2201925000001
|
|
log ${list}
|
|
Device-Traffics-Get-v1-00003
|
|
Comment 查询设备流量信息
|
|
${data} GetDeviceDatas CBT2201925000001 2020-07-01 00:00:00 2020-07-08 00:00:00 traffics
|
|
log ${data}
|
|
|
|
Device-CPU-Get-v1-00004
|
|
Comment 查询设备CPU信息
|
|
${data} GetDeviceDatas CBT2201925000001 2020-07-01 00:00:00 2020-07-08 00:00:00 cpu
|
|
log ${data}
|
|
|
|
Device-Mem-Get-v1-00005
|
|
Comment 查询设备内存信息
|
|
${data} GetDeviceDatas CBT2201925000001 2020-07-01 00:00:00 2020-07-08 00:00:00 mem
|
|
log ${data}
|
|
|
|
Device-Ports-Get-v1-00006
|
|
Comment 查询设备端口信息
|
|
${data} GetDeviceDatas CBT2201925000001 2020-07-01 00:00:00 2020-07-08 00:00:00 port
|
|
|
|
Device-Alarms-Get-v1-00007
|
|
Comment 查询设备告警信息
|
|
${data} GetDeviceDatas CBT2201925000001 2020-07-01 00:00:00 2020-07-08 00:00:00 alarm
|
|
log ${data}
|
|
|
|
Device-Alarms-Delte-v1-00008
|
|
Comment 清除设备告警信息
|
|
${list} Create List CBT22019250000010000000003711305|192.168.40.175|wx|test
|
|
${data} ClearAlarm ${list}
|
|
log ${data}
|
|
|
|
Device-Alarms-Delte-v1-00009
|
|
Comment 清除设备告警信息
|
|
${list} Create List ${100}|192.168.40.175||
|
|
${data} ClearAlarm ${list}
|
|
log ${data}
|
|
|
|
Device-Alarms-Delte-v1-00010
|
|
Comment 清除设备告警信息
|
|
${list} Create List CBT22019250000010000000003711309|192.168.40.175|${EMPTY}|${EMPTY}
|
|
${data} ClearAlarm ${list}
|
|
log ${data}
|
|
|
|
Device-Chassis-Get-v1-00011
|
|
Comment 获取设备板卡信息
|
|
${data} GetDeviceChassis CBT2201925000001
|
|
log ${data}
|
|
|
|
Device-ClusterStatus-Get-v1-00012
|
|
Comment 获取集群设备状态
|
|
${data} GetClusterStatus
|
|
log ${data}
|
|
|
|
Device-Tag-Get-v1-00013
|
|
Comment 获取设备标签
|
|
${data} GetDeviceTag ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY}
|
|
log ${data}
|
|
|
|
Device-Tag-Post-v1-00014
|
|
Comment 新增设备标签
|
|
${data} AddDeviceTag 4|wx-test001,|wx-test-002
|
|
log ${data}
|
|
|
|
Device-Tag-Refer-Get-v1-00015
|
|
Comment 获取设备标签引用
|
|
${data} GetDeviceTagRefer
|
|
log ${data}
|
|
|
|
Device-Ntp-Get-v1-00016
|
|
Comment ntp查询
|
|
${data} GetNtpInfo
|
|
log ${data}
|
|
|
|
Device-Ntp-Edit-v1-00017
|
|
Comment ntp修改
|
|
${data} EditNtpInfo 192.168.10.108
|
|
log ${data}
|
|
|
|
Tsg-Oam-Get-v1-00018
|
|
Comment 查询oam硬件板卡配置信息
|
|
${data} TsgOamRedirect /cm/chassis/192.168.40.175 GET application/x-www-form-urlencoded ${EMPTY}
|
|
log ${data}
|
|
|
|
Tsg-Oam-Get-v1-00019
|
|
Comment 查询oam硬件FRU信息
|
|
${data} TsgOamRedirect /cm/FRU/192.168.40.175/0 GET application/x-www-form-urlencoded ${EMPTY}
|
|
log ${data}
|
|
|
|
Tsg-Oam-Post-v1-00019
|
|
Comment 设置oam硬件hostname
|
|
${dict} Create Dictionary chassis_ip=192.168.40.175 sled_id=0 hostname=test
|
|
${data} TsgOamRedirect /cm/hostname POST application/x-www-form-urlencoded ${dict}
|
|
log ${data}
|
|
|
|
Tsg-Oam-Post-v1-00020
|
|
Comment 更新ntp server设置
|
|
${dict} Create Dictionary chassis_ip=192.168.40.175 sled_id=0
|
|
${list} Create List ${dict}
|
|
${data} TsgOamRedirect /cm/softreboot POST application/x-www-form-urlencoded ${dict}
|
|
log ${data}
|
|
Tsg-Oam-Snmp-Update-00021
|
|
Comment 更新SNMP配置
|
|
${dict} Create Dictionary chassis_ip=192.168.40.175 snmp_version=v2
|
|
${response} UpdateSnmp ${dict}
|
|
log ${response}
|
|
|
|
Tsg-Oam-Snmp-Update-00022
|
|
Comment 更新SNMP配置
|
|
${dict} Create Dictionary chassis_ip=192.168.40.175 snmp_version=v3 users=wangxin|wangxin123|add,wangxin1|wangxin123|add
|
|
${response} UpdateSnmp ${dict}
|
|
log ${response}
|
|
|
|
Tsg-Oam-Snmp-Update-00023
|
|
Comment 更新SNMP配置
|
|
${dict} Create Dictionary chassis_ip=192.168.40.175 snmp_version=v3 users=wangxin|wangxin123|add
|
|
${response} UpdateSnmp ${dict}
|
|
log ${response}
|
|
Tsg-Oam-Snmp-Update-00024
|
|
Comment 更新SNMP配置
|
|
${dict} Create Dictionary chassis_ip=192.168.40.175 snmp_version=v2
|
|
${dict1} Create Dictionary chassis_ip=192.168.40.175 snmp_version=v3 users=wangxin|wangxin123|add
|
|
${list} Create List ${dict} ${dict1}
|
|
${response} UpdateSnmp ${list}
|
|
log ${response}
|
|
|
|
Tsg-Oam-Snmp-Update-00025
|
|
Comment 更新SNMP配置
|
|
${response} UpdateSnmpBatch v3 wangxin wangxin123
|
|
log ${response} |