Class: Commutateurs::Fortigate
- Defined in:
- lib/commutateurs/fortigate.rb
Instance Method Summary collapse
- #configuration ⇒ Object
- #connect ⇒ Object
- #disconnect ⇒ Object
- #enable ⇒ Object
-
#initialize(host, credentials, verbose = false) ⇒ Fortigate
constructor
A new instance of Fortigate.
- #save ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(host, credentials, verbose = false) ⇒ Fortigate
Returns a new instance of Fortigate.
3 4 5 6 7 |
# File 'lib/commutateurs/fortigate.rb', line 3 def initialize(host, credentials, verbose = false) super @transport.default_prompt = / [#\$] $/ @transport.more = /--More-- / end |
Instance Method Details
#configuration ⇒ Object
16 17 18 |
# File 'lib/commutateurs/fortigate.rb', line 16 def configuration execute('show') end |
#connect ⇒ Object
12 13 14 |
# File 'lib/commutateurs/fortigate.rb', line 12 def connect @transport.connect end |
#disconnect ⇒ Object
23 24 25 26 |
# File 'lib/commutateurs/fortigate.rb', line 23 def disconnect @transport.send 'exit' @transport.close end |
#enable ⇒ Object
9 10 |
# File 'lib/commutateurs/fortigate.rb', line 9 def enable end |
#save ⇒ Object
20 21 |
# File 'lib/commutateurs/fortigate.rb', line 20 def save end |