Class: Cisco::Interface

Inherits:
Parser show all
Defined in:
lib/netutils/cli/cisco/interface.rb

Constant Summary

Constants inherited from FSM

FSM::FSM_S_INIT

Instance Method Summary collapse

Methods inherited from Parser

#add, #parse, #regexp

Methods inherited from FSM

#add, #cb, #changeto, #state_name

Constructor Details

#initialize(sw) ⇒ Interface

Returns a new instance of Interface.



10
11
12
13
14
15
16
17
18
# File 'lib/netutils/cli/cisco/interface.rb', line 10

def initialize(sw)
	super()
	add('Init',	:init)
	add('Name',	:name,	/^ +Model: +(.+)$/)
	add('Model',	:model,	/^ +Type: +(.+)$/)
	add('Type',	:type)
	add('Speed',	:speed,	/^ +Duplex: +(.+)$/)
	@sw = sw
end

Instance Method Details

#cmdObject



6
7
8
# File 'lib/netutils/cli/cisco/interface.rb', line 6

def cmd
	return 'show interfaces capabilities'
end