solidfire_api 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abf592885a3b95257f61953164e1ebc7e57c463a
4
- data.tar.gz: 58d03cad022814b0ca7cf001f880a5a728b9642b
3
+ metadata.gz: 4e4362dac5d531f0fde18a6a0d6fbaf6ed84261f
4
+ data.tar.gz: b1c6cd47bc3ae7061c873dfb1539a9fc3b8e1d62
5
5
  SHA512:
6
- metadata.gz: 0fad6b0bcb4db46156355f6f1451052a094f845e95be10b758a9e3dbb0a4412b08235d51ef61064b4db185e9a8b9e691267e97abc66b672abe9d03188b9db4d5
7
- data.tar.gz: d4624ec6e0988be76043a2e2ca22740195c519cde722ee900334dc0f77eddebb4005ee1c97d981da05c531bcab139c86b8286bc116cc0465b2c39da5ee3dc9ab
6
+ metadata.gz: 90b83710a6cececf2f911f5d19786af1bd528fe36ab11e8b3ef55f2a421032fb322d02e4fdce16872981fa51d0c55a6fd921ec6257bcc38dd2e339e03e47420e
7
+ data.tar.gz: 95c9d38319bc23779c7e9ab9556373593cfd66bc95d771d4051dcb2498a2063ce13a47aa729a18bd1b672789d0895aa90a05f92dc62844546340104327f66443
data/LICENSE.txt CHANGED
@@ -1,22 +1,13 @@
1
- Copyright (c) 2014 Pierre-Luc Dion
1
+ Copyright 2014 Pierre-Luc Dion
2
2
 
3
- MIT License
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
4
6
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
7
+ http://www.apache.org/licenses/LICENSE-2.0
12
8
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.md CHANGED
@@ -32,7 +32,8 @@ Install it:
32
32
  my_sf = SolidfireApi::Connection.new({
33
33
  :mvip => "192.168.0.1",
34
34
  :username => "monitor",
35
- :password => "patate"
35
+ :password => "patate",
36
+ :verify_ssl => true
36
37
  })
37
38
 
38
39
  # Some method examples:
@@ -54,7 +54,13 @@ module SolidfireApi
54
54
  def query_sf(query)
55
55
  # query is a hash that is post in json format to SolidFire API.
56
56
  solidfire_rest_url = "https://#{@username}:#{@password}@#{@mvip}/json-rpc/5.0"
57
- result = JSON.parse(RestClient.post solidfire_rest_url, query.to_json)
57
+
58
+ conn = RestClient::Resource.new(
59
+ solidfire_rest_url,
60
+ :verify_ssl => @verify_ssl
61
+ )
62
+ result = JSON.parse(conn.post query.to_json)
63
+
58
64
  if result["result"].nil?
59
65
  if result["error"].nil?
60
66
  return result
@@ -70,6 +76,11 @@ module SolidfireApi
70
76
  @mvip = options[:mvip]
71
77
  @username = options[:username]
72
78
  @password = options[:password]
79
+ @verify_ssl = options[:verify_ssl]
80
+
81
+ if @verify_ssl.nil?
82
+ @verify_ssl = false
83
+ end
73
84
 
74
85
  api_call = {
75
86
  :method => "GetClusterInfo",
@@ -94,6 +105,5 @@ module SolidfireApi
94
105
  @svip
95
106
  end
96
107
 
97
-
98
108
  end
99
109
  end
@@ -1,3 +1,3 @@
1
1
  module SolidfireApi
2
- VERSION = "0.0.7"
2
+ VERSION = '0.0.8'
3
3
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = %q{Solidfire Storage API Ruby Libraries}
12
12
  spec.description = %q{Ruby client for Solidfire Storage API. Usefull for metric collection of Volumes and cluster status}
13
13
  spec.homepage = "https://github.com/pdion891/solidfire_api"
14
- spec.license = "MIT"
14
+ spec.license = "Apache 2.0"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
- spec.add_development_dependency "rake"
22
+ spec.add_development_dependency "rake", "~> 1.5"
23
23
 
24
24
  # Other Gems dependencies
25
- spec.add_runtime_dependency "rest-client"
25
+ spec.add_runtime_dependency "rest-client", "~> 1.7"
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidfire_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre-Luc Dion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2014-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,30 +28,30 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '1.5'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rest-client
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '1.7'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.7'
55
55
  description: Ruby client for Solidfire Storage API. Usefull for metric collection
56
56
  of Volumes and cluster status
57
57
  email:
@@ -75,7 +75,7 @@ files:
75
75
  - solidfire_api.gemspec
76
76
  homepage: https://github.com/pdion891/solidfire_api
77
77
  licenses:
78
- - MIT
78
+ - Apache 2.0
79
79
  metadata: {}
80
80
  post_install_message:
81
81
  rdoc_options: []
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.1.11
96
+ rubygems_version: 2.2.2
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Solidfire Storage API Ruby Libraries