-
Notifications
You must be signed in to change notification settings - Fork 746
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new template for Huawei ONT:
display log info
(#2058)
- Loading branch information
1 parent
dc763d9
commit 509fd9d
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
ntc_templates/templates/huawei_ont_display_log_info.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Value MANUFACTURER (\S.+\S) | ||
Value PRODUCT_CLASS (\S.+\S) | ||
Value SERIAL_NUMBER (\S.+\S) | ||
Value IP (\S.+\S) | ||
Value HW_VER (\S.+\S) | ||
Value SW_VER (\S.+\S) | ||
Value List LOG_INFO (\S.+\S) | ||
|
||
Start | ||
^\s*Manufacturer:${MANUFACTURER};\s*$$ | ||
^\s*ProductClass:${PRODUCT_CLASS};\s*$$ | ||
^\s*SerialNumber:${SERIAL_NUMBER};\s*$$ | ||
^\s*IP:${IP};\s*$$ | ||
^\s*HWVer:${HW_VER};\s*$$ | ||
^\s*SWVer:${SW_VER};\s*$$ | ||
^\s+$$ | ||
^\s*success!\s*$$ | ||
^\s*${LOG_INFO}$$ | ||
^. -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/huawei_ont/display_log_info/huawei_ont_display_log_info.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Manufacturer:Huawei Technologies Co., Ltd; | ||
ProductClass:HG8310M; | ||
SerialNumber:48575443CA49257B; | ||
IP:192.168.0.100; | ||
HWVer:6A5.A; | ||
SWVer:V3R017C00S100; | ||
|
||
1970-01-01 00:17:45 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:quit | ||
1970-01-01 00:17:49 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:su | ||
1970-01-01 00:17:50 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:shell | ||
1970-01-01 00:17:56 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:exit | ||
1970-01-01 00:22:57 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Fail,操作类型:Set,InternetGatewayDevice.X_HW_AMPConfig.PortIsolate: | ||
1970-01-01 00:23:19 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Success,操作类型:Set,InternetGatewayDevice.X_HW_AMPConfig.PortIsolate:,PortIsolateSwitch:enable | ||
1970-01-01 00:23:22 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:quit | ||
1970-01-01 00:23:23 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:quit | ||
1970-01-01 00:23:23 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Success,操作类型:Logout,Username:root | ||
1970-01-01 00:23:30 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Success,操作类型:Login,Username:root | ||
1970-01-01 00:23:45 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Success,操作类型:Set,InternetGatewayDevice.X_HW_AMPConfig.PortIsolate:,PortIsolateSwitch:disable | ||
|
||
success! |
20 changes: 20 additions & 0 deletions
20
tests/huawei_ont/display_log_info/huawei_ont_display_log_info.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
parsed_sample: | ||
- hw_ver: "6A5.A" | ||
ip: "192.168.0.100" | ||
log_info: | ||
- "1970-01-01 00:17:45 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:quit" | ||
- "1970-01-01 00:17:49 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:su" | ||
- "1970-01-01 00:17:50 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:shell" | ||
- "1970-01-01 00:17:56 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:exit" | ||
- "1970-01-01 00:22:57 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Fail,操作类型:Set,InternetGatewayDevice.X_HW_AMPConfig.PortIsolate:" | ||
- "1970-01-01 00:23:19 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Success,操作类型:Set,InternetGatewayDevice.X_HW_AMPConfig.PortIsolate:,PortIsolateSwitch:enable" | ||
- "1970-01-01 00:23:22 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:quit" | ||
- "1970-01-01 00:23:23 [Critical][Shell日志] 终端:CLI(192.168.0.254),执行结果:Success,操作命令:quit" | ||
- "1970-01-01 00:23:23 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Success,操作类型:Logout,Username:root" | ||
- "1970-01-01 00:23:30 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Success,操作类型:Login,Username:root" | ||
- "1970-01-01 00:23:45 [Critical][配置日志] 终端:CLI(192.168.0.254),执行结果:Success,操作类型:Set,InternetGatewayDevice.X_HW_AMPConfig.PortIsolate:,PortIsolateSwitch:disable" | ||
manufacturer: "Huawei Technologies Co., Ltd" | ||
product_class: "HG8310M" | ||
serial_number: "48575443CA49257B" | ||
sw_ver: "V3R017C00S100" |