zbxapi 0.1.335 → 0.1.352

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/api_classes/proxy.rb +47 -0
  2. data/zbxapi.rb +5 -4
  3. data/zbxapi/revision.rb +1 -1
  4. metadata +10 -25
@@ -0,0 +1,47 @@
1
+ # Title:: Zabbix API Ruby Library
2
+ # License:: LGPL 2.1 http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
3
+ # Copyright:: Copyright (C) 2009,2010 Andrew Nelson nelsonab(at)red-tux(dot)net
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ #--
20
+ ##########################################
21
+ # Subversion information
22
+ # $Id: proxy.rb 344 2011-11-18 01:44:36Z nelsonab $
23
+ # $Revision: 344 $
24
+ ##########################################
25
+ #++
26
+
27
+ require "api_classes/subclass_base"
28
+
29
+
30
+ #******************************************************************************
31
+ #
32
+ # Class ZbxAPI_Proxy
33
+ #
34
+ # Class encapsulating proxy functions
35
+ #
36
+ # get
37
+ #
38
+ #******************************************************************************
39
+
40
+ class ZbxAPI_Proxy< ZbxAPI_Sub
41
+ def get(options={})
42
+ checkauth
43
+ checkversion(1,3)
44
+ obj=do_request(json_obj('proxy.get',options))
45
+ obj['result']
46
+ end
47
+ end
data/zbxapi.rb CHANGED
@@ -19,8 +19,8 @@
19
19
  #--
20
20
  ##########################################
21
21
  # Subversion information
22
- # $Id: zbxapi.rb 335 2011-10-14 15:36:12Z nelsonab $
23
- # $Revision: 335 $
22
+ # $Id: zbxapi.rb 344 2011-11-18 01:44:36Z nelsonab $
23
+ # $Revision: 344 $
24
24
  ##########################################
25
25
  #++
26
26
 
@@ -49,6 +49,7 @@ require "api_classes/history"
49
49
  require "api_classes/host"
50
50
  require "api_classes/host_group"
51
51
  require "api_classes/item"
52
+ require "api_classes/proxy"
52
53
  require "api_classes/sysmap"
53
54
  require "api_classes/trigger"
54
55
  require "api_classes/user"
@@ -73,8 +74,7 @@ class ZabbixAPI
73
74
  #subordinate class
74
75
  attr_accessor :user # [User#new]
75
76
  #subordinate class
76
- attr_accessor :usergroup, :host, :item, :hostgroup, :application, :trigger, :sysmap, :history
77
-
77
+ attr_accessor :usergroup, :host, :item, :hostgroup, :application, :trigger, :sysmap, :history, :proxy
78
78
  @id=0
79
79
  @auth=''
80
80
  @url=nil
@@ -101,6 +101,7 @@ class ZabbixAPI
101
101
  @user = ZbxAPI_User.new(self)
102
102
  @usergroup = ZbxAPI_UserGroup.new(self)
103
103
  @host = ZbxAPI_Host.new(self)
104
+ @proxy = ZbxAPI_Proxy.new(self)
104
105
  @item = ZbxAPI_Item.new(self)
105
106
  @hostgroup = ZbxAPI_HostGroup.new(self)
106
107
  @application = ZbxAPI_Application.new(self)
data/zbxapi/revision.rb CHANGED
@@ -4,4 +4,4 @@
4
4
  #the rakefile was run
5
5
 
6
6
  ZBXAPI_VERSION="0.1"
7
- ZBXAPI_REVISION="335"
7
+ ZBXAPI_REVISION="352"
metadata CHANGED
@@ -1,13 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zbxapi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 645
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- - 335
10
- version: 0.1.335
4
+ version: 0.1.352
11
5
  platform: ruby
12
6
  authors:
13
7
  - A. Nelson
@@ -15,23 +9,19 @@ autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
11
 
18
- date: 2011-10-14 00:00:00 -04:00
12
+ date: 2011-11-25 00:00:00 -05:00
19
13
  default_executable:
20
14
  dependencies:
21
15
  - !ruby/object:Gem::Dependency
22
16
  name: json
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
26
20
  requirements:
27
21
  - - ">="
28
22
  - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
23
  version: "0"
33
- type: :runtime
34
- version_requirements: *id001
24
+ version:
35
25
  description: Provides a straight forward interface to manipulate Zabbix servers using the Zabbix API.
36
26
  email: nelsonab@red-tux.net
37
27
  executables: []
@@ -52,6 +42,7 @@ files:
52
42
  - api_classes/host.rb
53
43
  - api_classes/host_group.rb
54
44
  - api_classes/item.rb
45
+ - api_classes/proxy.rb
55
46
  - api_classes/sysmap.rb
56
47
  - api_classes/trigger.rb
57
48
  - api_classes/user.rb
@@ -67,27 +58,21 @@ rdoc_options: []
67
58
  require_paths:
68
59
  - .
69
60
  required_ruby_version: !ruby/object:Gem::Requirement
70
- none: false
71
61
  requirements:
72
62
  - - ">="
73
63
  - !ruby/object:Gem::Version
74
- hash: 3
75
- segments:
76
- - 0
77
64
  version: "0"
65
+ version:
78
66
  required_rubygems_version: !ruby/object:Gem::Requirement
79
- none: false
80
67
  requirements:
81
68
  - - ">="
82
69
  - !ruby/object:Gem::Version
83
- hash: 3
84
- segments:
85
- - 0
86
70
  version: "0"
71
+ version:
87
72
  requirements:
88
73
  - Requires json
89
74
  rubyforge_project: zbxapi
90
- rubygems_version: 1.3.7
75
+ rubygems_version: 1.3.5
91
76
  signing_key:
92
77
  specification_version: 3
93
78
  summary: Ruby wrapper to the Zabbix API