lib/zabbixapi/classes/hosts.rb in zabbixapi-2.2.3 vs lib/zabbixapi/classes/hosts.rb in zabbixapi-2.2.4
- old
+ new
@@ -33,12 +33,12 @@
}
)
result.empty? ? false : true
end
- def create_or_update(data)
+ def create_or_update(data, force = false)
hostid = get_id(:host => data[:host])
- hostid ? update(data.merge(:hostid => hostid)) : create(data)
+ hostid ? update(data.merge(:hostid => hostid), force) : create(data)
end
# to make delete call idempotent for all resources
def delete(hostid)
super(:hostid => hostid)