lib/oxidized/fetch/fetch.rb in oxidized-fetch-0.1.0 vs lib/oxidized/fetch/fetch.rb in oxidized-fetch-0.2.0
- old
+ new
@@ -25,10 +25,11 @@
# @option opts [String] :protocols protocols to use to connect, default "ssh ,telnet"
# @option opts [boolean] :verbose extra output, e.g. show command given in output
# @yieldreturn [self] if called in block, returns self and disconnnects session after exiting block
# @return [void]
def initialize opts, &block
+ group = opts.delete :group
host = opts.delete :host
model = opts.delete :model
timeout = opts.delete :timeout
username = opts.delete :username
password = opts.delete :password
@@ -43,12 +44,12 @@
Oxidized.mgr = Manager.new
@@oxi = true
end
@node = if model
- Node.new(:name=>host, :model=>model)
+ Node.new(:name=>host, :group=>group, :model=>model)
else
- Nodes.new(:node=>host).first
+ Nodes.new(:node=>host, :group=>group).first
end
if not @node
begin
require 'corona'
community ||= Corona::CFG.community