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 +4 -4
- data/LICENSE.txt +10 -19
- data/README.md +2 -1
- data/lib/solidfire_api/connection.rb +12 -2
- data/lib/solidfire_api/version.rb +1 -1
- data/solidfire_api.gemspec +3 -3
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e4362dac5d531f0fde18a6a0d6fbaf6ed84261f
|
4
|
+
data.tar.gz: b1c6cd47bc3ae7061c873dfb1539a9fc3b8e1d62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90b83710a6cececf2f911f5d19786af1bd528fe36ab11e8b3ef55f2a421032fb322d02e4fdce16872981fa51d0c55a6fd921ec6257bcc38dd2e339e03e47420e
|
7
|
+
data.tar.gz: 95c9d38319bc23779c7e9ab9556373593cfd66bc95d771d4051dcb2498a2063ce13a47aa729a18bd1b672789d0895aa90a05f92dc62844546340104327f66443
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,13 @@
|
|
1
|
-
Copyright
|
1
|
+
Copyright 2014 Pierre-Luc Dion
|
2
2
|
|
3
|
-
|
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
|
-
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
@@ -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
|
-
|
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
|
data/solidfire_api.gemspec
CHANGED
@@ -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 = "
|
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.
|
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-
|
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: '
|
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: '
|
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: '
|
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: '
|
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
|
-
-
|
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.
|
96
|
+
rubygems_version: 2.2.2
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Solidfire Storage API Ruby Libraries
|