zabbixapi 0.5.1b9 → 0.5.1b10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/zabbixapi/basic/basic_logic.rb +4 -2
- data/lib/zabbixapi/version.rb +1 -1
- metadata +2 -2
|
@@ -20,6 +20,7 @@ class ZabbixApi
|
|
|
20
20
|
|
|
21
21
|
def create_or_update(data)
|
|
22
22
|
puts "[DEBUG] Call create_or_update with parametrs: #{data.inspect}" if @client.options[:debug]
|
|
23
|
+
|
|
23
24
|
id = get_id(indentify.to_sym => data[indentify.to_sym])
|
|
24
25
|
id ? update(data.merge(key.to_sym => id.to_s)) : create(data)
|
|
25
26
|
end
|
|
@@ -34,7 +35,8 @@ class ZabbixApi
|
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
unless dump.deep_include?(data, key.to_sym)
|
|
37
|
-
|
|
38
|
+
data_update = array_flag ? [data] : data
|
|
39
|
+
result = @client.api_request(:method => "#{method_name}.update", :params => data_update)
|
|
38
40
|
parse_keys result
|
|
39
41
|
else
|
|
40
42
|
item_id
|
|
@@ -89,7 +91,7 @@ class ZabbixApi
|
|
|
89
91
|
|
|
90
92
|
def get_or_create(data)
|
|
91
93
|
puts "[DEBUG] Call get_or_create with parametrs: #{data.inspect}" if @client.options[:debug]
|
|
92
|
-
|
|
94
|
+
|
|
93
95
|
unless id = get_id(data)
|
|
94
96
|
id = create(data)
|
|
95
97
|
end
|
data/lib/zabbixapi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zabbixapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1b10
|
|
5
5
|
prerelease: 5
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -63,7 +63,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
63
63
|
version: '0'
|
|
64
64
|
segments:
|
|
65
65
|
- 0
|
|
66
|
-
hash:
|
|
66
|
+
hash: -675997134437473761
|
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
none: false
|
|
69
69
|
requirements:
|