ganeti_client 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -1,10 +1,12 @@
1
- == Todo
2
-
3
- 5. Improve this README with better docs
4
- 6. Write tests!
1
+ == About
5
2
 
3
+ This is a client for the Ganeti RAPI written in Ruby.
4
+ For more information on Ganeti, visit:
5
+ - http://code.google.com/p/ganeti/
6
+ - http://ganeti-doc.googlecode.com/svn/ganeti-2.1/html/rapi.html
6
7
 
7
- == About
8
+ This client has been tested using ruby 1.8.7 (2009-06-12 patchlevel 174)
9
+ and Ganeti 2.1.6
8
10
 
9
11
 
10
12
  == Installation
@@ -13,6 +15,11 @@
13
15
 
14
16
 
15
17
  == Usage
18
+ # When using irb require the library first
19
+ require 'ganeti_client'
20
+
21
+ # When using in combination of rails, add it to the Gemfile
22
+
16
23
 
17
24
  # Create a client instance
18
25
  client = GanetiClient::Client.new("host:port", "username", "password")
@@ -28,6 +35,8 @@
28
35
  info.name
29
36
  => "hostname"
30
37
 
38
+ # More info can be found on the wiki page: http://wiki.github.com/netronix/ganeti_client/
39
+
31
40
 
32
41
  == Contributing
33
42
 
@@ -39,7 +48,8 @@
39
48
 
40
49
  == Author
41
50
 
42
- Michaël Rigart
51
+ Michaël Rigart
52
+ michael@netronix.be
43
53
  http://www.netronix.be
44
54
 
45
55
 
@@ -921,15 +921,19 @@ module Ganeti
921
921
  parse_response(response.body.strip)
922
922
  else
923
923
  response.instance_eval { class << self; attr_accessor :body_parsed; end }
924
- begin; response.body_parsed = parse_response(response.body); rescue; end
925
- response.error! # raises exception corresponding to http error Net::XXX
924
+ begin
925
+ response.body_parsed = parse_response(response.body)
926
+ rescue
927
+ # raises exception corresponding to http error Net::XXX
928
+ puts response.error!
929
+ end
926
930
  end
927
931
  end
928
932
  end
929
933
 
930
934
 
931
935
  # Description:
932
- # TEST
936
+ # parse the response body to JSON
933
937
  #
934
938
  # Parameters:
935
939
  # string response_body
data/lib/ganeti_client.rb CHANGED
@@ -21,7 +21,7 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  #++
23
23
 
24
-
24
+ require 'rubygems'
25
25
  require 'net/http'
26
26
  require 'net/https'
27
27
  require 'uri'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ganeti_client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Micha\xC3\xABl Rigart"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-20 00:00:00 +02:00
18
+ date: 2010-08-28 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21