# -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## H3C.VRP.get_chassis_id test
## Auto-generated by manage.py debug-script at 2011-03-11 09:13:51
##----------------------------------------------------------------------
## Copyright (C) 2007-2011 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------
from noc.lib.test import ScriptTestCase
class H3C_VRP_get_chassis_id_Test(ScriptTestCase):
    script="H3C.VRP.get_chassis_id"
    vendor="H3C"
    platform='5500-EI'
    version='3.03.02s56ep05'
    input={}
    result='00:24:73:1A:4A:80'
    motd='\n'
    cli={
## 'display version'
'display version': """
%Mar 11 09:13:43:644 2011 5500-EI-TEC3 SHELL/5/LOGIN:- 1 - admin(172.20.0.181) in unit1 logindisplay version
3Com Corporation
Switch 5500-EI Software Version 3Com OS V3.03.02s56ep05
Copyright (c) 2004-2009 3Com Corporation and its licensors, All rights reserved.
Switch 5500-EI uptime is 33 weeks, 3 days, 22 hours, 1 minute

Switch 5500-EI 28-Port with 1 Processor
64M     bytes DRAM
16384K  bytes Flash Memory
Config Register points to FLASH

CPLD Version is CPLD 001
Bootrom Version is 4.02
[Subslot 0] 24 FE + 4 GE Hardware Version is 00.00.00 
""",
## 'display stp'
'display stp': """display stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge         :32768.0024-731a-4a80
Bridge Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.0024-731a-4a80 / 0
CIST RegRoot/IRPC   :32768.0024-731a-4a80 / 0
CIST RootPortId     :0.0
BPDU-Protection     :disabled
TC-Protection       :enabled / Threshold=6
Bridge Config
Digest Snooping     :disabled
TC or TCN received  :1904
Time since last TC  :56 days 21h:50m:54s

----[Port1(Ethernet1/0/1)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.1
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
                                           Port Config
 Digest Snooping     :disabled
 Rapid Fwd State     :Rapid Forwarding 
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :1483
          TCN: 0, Config: 0, RST: 0, MST: 1483
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port2(Ethernet1/0/2)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.2
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Rapid Fwd State     :Rapid Forwarding 
                                           Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :12
          TCN: 0, Config: 0, RST: 0, MST: 12
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port3(Ethernet1/0/3)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.3
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
                                           BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port4(Ethernet1/0/4)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.4
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port5(Ethernet1/0/5)][FORWARDING]----
                                           Port Protocol       :enabled
 Port Role           :CIST Designated Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.5
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=true
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Rapid Fwd State     :Rapid Forwarding 
 Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :633413
          TCN: 0, Config: 0, RST: 0, MST: 633413
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port6(Ethernet1/0/6)][FORWARDING]----
 Port Protocol       :enabled
 Port Role           :CIST Designated Port
 Port Priority       :128
                                           Port Cost(Legacy)   :Config=auto / Active=200
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.6
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=true
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Rapid Fwd State     :Rapid Forwarding 
 Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :2407052
          TCN: 0, Config: 0, RST: 0, MST: 2407052
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port7(Ethernet1/0/7)][FORWARDING]----
 Port Protocol       :enabled
 Port Role           :CIST Designated Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.7
 Port Edged          :Config=enabled / Active=enabled  
                                           Point-to-point      :Config=auto / Active=true
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Rapid Fwd State     :Rapid Forwarding 
 Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :2407117
          TCN: 0, Config: 0, RST: 0, MST: 2407117
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port8(Ethernet1/0/8)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.8
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
                                           MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Rapid Fwd State     :Rapid Forwarding 
 Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :36510
          TCN: 0, Config: 0, RST: 0, MST: 36510
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port9(Ethernet1/0/9)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.9
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
                                           Rapid Fwd State     :Rapid Forwarding 
 Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :82
          TCN: 0, Config: 0, RST: 0, MST: 82
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port10(Ethernet1/0/10)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.10
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
                                                    TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port11(Ethernet1/0/11)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.11
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

                                          ----[Port12(Ethernet1/0/12)][DISABLED]----
 Port Protocol       :disabled

----[Port13(Ethernet1/0/13)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.13
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port14(Ethernet1/0/14)][DOWN]----
                                           Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.14
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port15(Ethernet1/0/15)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
                                           Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.15
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port16(Ethernet1/0/16)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.16
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
                                           Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port17(Ethernet1/0/17)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.17
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
                                           Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port18(Ethernet1/0/18)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.18
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
                                           BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port19(Ethernet1/0/19)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.19
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port20(Ethernet1/0/20)][DISABLED]----
                                           Port Protocol       :disabled

----[Port21(Ethernet1/0/21)][FORWARDING]----
 Port Protocol       :enabled
 Port Role           :CIST Designated Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.21
 Port Edged          :Config=enabled / Active=enabled  
 Point-to-point      :Config=auto / Active=true
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Rapid Fwd State     :Rapid Forwarding 
 Num of Vlans Mapped :1 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :4549699
          TCN: 0, Config: 0, RST: 0, MST: 4549699
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port22(Ethernet1/0/22)][DISABLED]----
                                           Port Protocol       :disabled

----[Port23(Ethernet1/0/23)][DISABLED]----
 Port Protocol       :disabled

----[Port24(Ethernet1/0/24)][DISABLED]----
 Port Protocol       :disabled

----[Port25(GigabitEthernet1/0/25)][DISABLED]----
 Port Protocol       :disabled

----[Port26(GigabitEthernet1/0/26)][DISABLED]----
 Port Protocol       :disabled

----[Port27(GigabitEthernet1/0/27)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.27
 Port Edged          :Config=disabled / Active=disabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
                                           MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :0 
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :0
          TCN: 0, Config: 0, RST: 0, MST: 0
 BPDU Received       :0
          TCN: 0, Config: 0, RST: 0, MST: 0

----[Port28(GigabitEthernet1/0/28)][DOWN]----
 Port Protocol       :enabled
 Port Role           :CIST Disabled Port
 Port Priority       :128
 Port Cost(Legacy)   :Config=auto / Active=200000
 Desg. Bridge/Port   :32768.0024-731a-4a80 / 128.28
 Port Edged          :Config=disabled / Active=disabled  
 Point-to-point      :Config=auto / Active=false
 Transmit Limit      :10 packets/hello-time
 Protection Type     :None
 MSTP BPDU format    :Config=auto / Active=legacy
 Port Config
 Digest Snooping     :disabled
 Num of Vlans Mapped :4 
                                           PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
 BPDU Sent           :35
          TCN: 0, Config: 0, RST: 0, MST: 35
 BPDU Received       :1635708
          TCN: 0, Config: 0, RST: 0, MST: 1635708""",
}
    snmp_get={}
    snmp_getnext={}
