summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-04-12 19:15:58 +0300
committerSaku Ytti <saku@ytti.fi>2014-04-12 19:15:58 +0300
commitfb2d7d5ce2a8b7f07dcb3e4fcccf4abdd915da77 (patch)
tree3fed406932fd159b95abd0ea6a27be4d1d706ead /lib/oxidized
parentddfe7685569ef870cb4cecb699fd1c20de189ba5 (diff)
allow running post_login separately
Diffstat (limited to 'lib/oxidized')
-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