Sha256: 2410bdc3fe2f1f5062501e0860762f354bf70af36b5812dcf92656395142b2b8
Contents?: true
Size: 789 Bytes
Versions: 1
Compression:
Stored size: 789 Bytes
Contents
class ZabbixApi class Hosts < Basic def array_flag true end def method_name "host" end def indentify "host" end def default_options { :host => nil, :interfaces => [], :status => 0, :available => 1, :groups => [], :proxy_hostid => nil } end def unlink_templates(data) result = @client.api_request( :method => "host.massRemove", :params => { :hostids => data[:hosts_id], :templates => data[:templates_id] } ) result.empty? ? false : true end def create_or_update(data) hostid = get_id(:host => data[:host]) hostid ? update(data.merge(:hostid => hostid)) : create(data) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zabbixapi-2.4.0 | lib/zabbixapi/classes/hosts.rb |