summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/oxidized/input/cli.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/oxidized/input/cli.rb b/lib/oxidized/input/cli.rb
index 2e6ac35..22d188c 100644
--- a/lib/oxidized/input/cli.rb
+++ b/lib/oxidized/input/cli.rb
@@ -9,12 +9,16 @@ module Oxidized
end
def get
- @post_login.each { |command, block| block ? block.call : (cmd command) }
+ connect_cli
d = @node.model.get
disconnect
d
end
+ def connect_cli
+ @post_login.each { |command, block| block ? block.call : (cmd command) }
+ end
+
def disconnect_cli
@pre_logout.each { |command, block| block ? block.call : (cmd command, nil) }
end