lib/zabbixapi/classes/hosts.rb in zabbixapi-2.2.4 vs lib/zabbixapi/classes/hosts.rb in zabbixapi-2.4.0

- old
+ new

@@ -33,16 +33,11 @@ } ) result.empty? ? false : true end - def create_or_update(data, force = false) + def create_or_update(data) hostid = get_id(:host => data[:host]) - hostid ? update(data.merge(:hostid => hostid), force) : create(data) - end - - # to make delete call idempotent for all resources - def delete(hostid) - super(:hostid => hostid) + hostid ? update(data.merge(:hostid => hostid)) : create(data) end end end