Class: Commutateurs::Brocade
Instance Method Summary collapse
- #configuration ⇒ Object
- #connect ⇒ Object
- #disconnect ⇒ Object
- #enable ⇒ Object
-
#initialize(host, credentials, verbose = false) ⇒ Brocade
constructor
A new instance of Brocade.
- #save ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(host, credentials, verbose = false) ⇒ Brocade
Returns a new instance of Brocade.
3 4 5 6 |
# File 'lib/commutateurs/brocade.rb', line 3 def initialize(host, credentials, verbose = false) super @transport.default_prompt = /:admin> $/ end |
Instance Method Details
#configuration ⇒ Object
15 16 17 |
# File 'lib/commutateurs/brocade.rb', line 15 def configuration execute('configshow') end |
#connect ⇒ Object
11 12 13 |
# File 'lib/commutateurs/brocade.rb', line 11 def connect @transport.connect end |
#disconnect ⇒ Object
22 23 24 25 |
# File 'lib/commutateurs/brocade.rb', line 22 def disconnect @transport.send 'exit' @transport.close end |
#enable ⇒ Object
8 9 |
# File 'lib/commutateurs/brocade.rb', line 8 def enable end |
#save ⇒ Object
19 20 |
# File 'lib/commutateurs/brocade.rb', line 19 def save end |