Class: Alaxala::Interface
- Defined in:
- lib/netutils/cli/alaxala/interface.rb
Constant Summary collapse
- PORT_RE =
AX8600 Date 2017/10/14 20:16:41 JST Port Counts: 54 Port Status Speed Duplex FCtl FrLen Description
1/1 up 10GBASE-SR full off 1518 hogehoge 1/2 up 10GBASE-SR full off 1518 fugafuga
/^\s*([0-9\/\s]+)\s+([^\s]*)\s*(up|down|dis|inact|init)\s+([^\s]+)\s+(full|half|-)(?:\(auto\))?\s+(on|off|-)\s+(?:[0-9]+|-)\s+.*$/
Constants inherited from FSM
Instance Method Summary collapse
- #cmd ⇒ Object
-
#initialize(sw) ⇒ Interface
constructor
A new instance of Interface.
Methods inherited from Parser
Methods inherited from FSM
#add, #cb, #changeto, #state_name
Constructor Details
#initialize(sw) ⇒ Interface
Returns a new instance of Interface.
50 51 52 53 54 55 56 57 |
# File 'lib/netutils/cli/alaxala/interface.rb', line 50 def initialize(sw) super() add('Init', :init) add('Date', :date, /^Port Counts:.*$/) add('Count', :count, /^Port\s+(?:Name|Status).*$/) add('Port', :port) @sw = sw end |
Instance Method Details
#cmd ⇒ Object
6 7 8 |
# File 'lib/netutils/cli/alaxala/interface.rb', line 6 def cmd return 'show port' end |