Module: Cisco
- Defined in:
- lib/netutils/cli/cisco.rb,
lib/netutils/cli/cisco/cdp.rb,
lib/netutils/cli/cisco/macfib.rb,
lib/netutils/cli/cisco/showarp.rb,
lib/netutils/cli/cisco/showvrf.rb,
lib/netutils/cli/cisco/ifsummary.rb,
lib/netutils/cli/cisco/interface.rb,
lib/netutils/cli/cisco/showroute.rb,
lib/netutils/cli/cisco/showinterface.rb
Defined Under Namespace
Classes: CDP, IfSummary, Interface, MACFIB, ShowARP, ShowInterface, ShowRoute, ShowVRF
Constant Summary
collapse
- CONFIG_RE =
/^.*Current configuration[^\n]+\n(.*)\n.*$/m
Instance Method Summary
collapse
Instance Method Details
#acl_definition(type, name) ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'lib/netutils/cli/cisco.rb', line 17
def acl_definition(type, name)
case type
when 'ip'
when 'mac'
"#{type} access-list extended #{name}"
else
raise(ArgumentError, "Unsupported ACL type: #{type}")
end
end
|
#acl_type_to_cmd(type) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/netutils/cli/cisco.rb', line 27
def acl_type_to_cmd(type)
case type
when 'ip'
when 'mac'
type = 'mac'
else
raise(ArgumentError, "Unsupported ACL type: #{type}")
end
type
end
|
#disable_logging_console ⇒ Object
11
12
13
14
15
|
# File 'lib/netutils/cli/cisco.rb', line 11
def disable_logging_console
configure
cmd('no loggin console')
unconfigure
end
|
#show_running_config ⇒ Object
42
43
44
|
# File 'lib/netutils/cli/cisco.rb', line 42
def show_running_config
return cmd('show running-config')
end
|