zabbixapi 0.5.1b6 → 0.5.1b7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zabbixapi/basic/basic_logic.rb +13 -1
- data/lib/zabbixapi/version.rb +1 -1
- metadata +2 -2
@@ -23,7 +23,7 @@ class ZabbixApi
|
|
23
23
|
|
24
24
|
dump = {}
|
25
25
|
item_id = data[key.to_sym].to_i
|
26
|
-
|
26
|
+
dump_by_id(key.to_sym => data[key.to_sym]).each do |item|
|
27
27
|
dump = symbolize_keys(item) if item[key].to_i == data[key.to_sym].to_i
|
28
28
|
end
|
29
29
|
|
@@ -48,6 +48,18 @@ class ZabbixApi
|
|
48
48
|
)
|
49
49
|
end
|
50
50
|
|
51
|
+
def dump_by_id(data)
|
52
|
+
@client.api_request(
|
53
|
+
:method => "#{method_name}.get",
|
54
|
+
:params => {
|
55
|
+
:filter => {
|
56
|
+
key.to_sym => data[key.to_sym]
|
57
|
+
},
|
58
|
+
:output => "extend"
|
59
|
+
}
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
51
63
|
def all
|
52
64
|
result = {}
|
53
65
|
@client.api_request(:method => "#{method_name}.get", :params => {:output => "extend"}).each do |item|
|
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.1b7
|
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: 2549650011715709632
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
none: false
|
69
69
|
requirements:
|