zbxapi 0.1.397 → 0.1.398

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/api_classes/graph.rb +77 -0
  2. data/zbxapi/revision.rb +1 -1
  3. metadata +26 -11
@@ -0,0 +1,77 @@
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-2012 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$
23
+ # $Revision$
24
+ ##########################################
25
+ #++
26
+
27
+ require "api_classes/subclass_base"
28
+
29
+ #******************************************************************************
30
+ #
31
+ # Class ZbxAPI_Item
32
+ #
33
+ # Class encapsulating Item functions
34
+ #
35
+ # API Function Status
36
+ # get Function implemented
37
+ # create Function implemented
38
+ # update Function implemented
39
+ # delete Function implemented - need to add type checking to input
40
+ #
41
+ #******************************************************************************
42
+
43
+ class ZbxAPI_Graph < ZbxAPI_Sub
44
+ def get(options={})
45
+ checkauth
46
+ checkversion(1,1)
47
+
48
+ obj=do_request(json_obj('graph.get',options))
49
+ return obj['result']
50
+ end
51
+
52
+ def create(options)
53
+ debug(8,:var=>options)
54
+ checkauth
55
+ checkversion(1,1)
56
+
57
+ obj=do_request(json_obj('graph.create', options))
58
+ return obj['result']
59
+ end
60
+
61
+ def update(options)
62
+ debug(8,:var=>options)
63
+ checkauth
64
+ checkversion(1,1)
65
+
66
+ obj=do_request(json_obj('graph.update', options))
67
+ return obj['result']
68
+ end
69
+
70
+ def delete(ids)
71
+ checkauth
72
+ checkversion(1,1)
73
+
74
+ obj=do_request(json_obj('graph.delete', ids))
75
+ return obj['result']
76
+ end
77
+ end
@@ -4,4 +4,4 @@
4
4
  #the rakefile was run
5
5
 
6
6
  ZBXAPI_VERSION="0.1"
7
- ZBXAPI_REVISION="397"
7
+ ZBXAPI_REVISION="398"
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zbxapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.397
4
+ hash: 775
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 398
10
+ version: 0.1.398
5
11
  platform: ruby
6
12
  authors:
7
13
  - A. Nelson
@@ -9,19 +15,22 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2012-05-21 00:00:00 -04:00
13
- default_executable:
18
+ date: 2012-05-22 00:00:00 Z
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: json
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
23
31
  version: "0"
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  description: Provides a straight forward interface to manipulate Zabbix servers using the Zabbix API.
26
35
  email: nelsonab@red-tux.net
27
36
  executables: []
@@ -43,12 +52,12 @@ files:
43
52
  - api_classes/host_group.rb
44
53
  - api_classes/item.rb
45
54
  - api_classes/proxy.rb
55
+ - api_classes/graph.rb
46
56
  - api_classes/sysmap.rb
47
57
  - api_classes/trigger.rb
48
58
  - api_classes/user.rb
49
59
  - api_classes/user_group.rb
50
60
  - api_classes/subclass_base.rb
51
- has_rdoc: true
52
61
  homepage: http://trac.red-tux.net/
53
62
  licenses:
54
63
  - LGPL 2.1
@@ -58,21 +67,27 @@ rdoc_options: []
58
67
  require_paths:
59
68
  - .
60
69
  required_ruby_version: !ruby/object:Gem::Requirement
70
+ none: false
61
71
  requirements:
62
72
  - - ">="
63
73
  - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
64
77
  version: "0"
65
- version:
66
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
+ none: false
67
80
  requirements:
68
81
  - - ">="
69
82
  - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 0
70
86
  version: "0"
71
- version:
72
87
  requirements:
73
88
  - Requires json
74
89
  rubyforge_project: zbxapi
75
- rubygems_version: 1.3.5
90
+ rubygems_version: 1.8.15
76
91
  signing_key:
77
92
  specification_version: 3
78
93
  summary: Ruby wrapper to the Zabbix API