cloud_stack_client 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/cloud_stack_client.gemspec +5 -4
- data/lib/cloud_stack_client/api.rb +5 -3
- data/lib/cloud_stack_client/version.rb +1 -1
- metadata +15 -16
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 778a4f96c609ff2ec371358c041c7b557100a1fc
|
4
|
+
data.tar.gz: 9ba256147dc558599460fd29348c336813b0d5bc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 786b4d64858f71569d76111c3985bfea3f4fcca9d525ed8e32f76a3f3196ca83d7976a684b2ce25afcf44909c6ac7975d00b784792a2338ea1f942759bb4454f
|
7
|
+
data.tar.gz: 71224e74cbda449b1100d91a3e57f0c58ce121c5771caa37707421dd4f4ef99cf8ef57a1e6e4daa4f5fa865cbb15ada5bac4ad4009e094dca7f3a72dcf97f9c7
|
data/cloud_stack_client.gemspec
CHANGED
@@ -7,10 +7,11 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.name = "cloud_stack_client"
|
8
8
|
gem.version = CloudStackClient::VERSION
|
9
9
|
gem.authors = ["Roman Messer"]
|
10
|
-
gem.email = ["
|
11
|
-
gem.description = %q{
|
12
|
-
gem.summary = %q{
|
13
|
-
|
10
|
+
gem.email = ["rms@ict-cloud.com"]
|
11
|
+
gem.description = %q{CloudStack API client to execute any command against a CloudStack Infrastructure. Also contains a commandline utility with auto paging and support to read credentials from a config file.}
|
12
|
+
gem.summary = %q{Library to work with the CloudStack API.}
|
13
|
+
gem.homepage = "https://bitbucket.org/RmMsr/cloud_stack_client"
|
14
|
+
gem.license = "MIT"
|
14
15
|
|
15
16
|
if File.exist? '.git'
|
16
17
|
gem.files = `git ls-files`.split($/)
|
@@ -35,7 +35,7 @@ module CloudStackClient
|
|
35
35
|
# @see CloudStackClient::Helpers::hash_password
|
36
36
|
def self.get_credentials(api_uri, username, hashed_password, domain = "", http_method = nil , ssl_check = nil)
|
37
37
|
http_method ||= API_DEFAULTS[:http_method]
|
38
|
-
ssl_check
|
38
|
+
ssl_check = API_DEFAULTS[:ssl_check] if ssl_check.nil?
|
39
39
|
parameters = {:command => "login", :response => "json", :username => username, :password => hashed_password, :domain => parse_domain(domain)}
|
40
40
|
headers, body = execute_query(api_uri, generate_query(parameters), [], http_method, ssl_check)
|
41
41
|
credentials = {}
|
@@ -73,7 +73,7 @@ module CloudStackClient
|
|
73
73
|
# @return [REXML::Document, Hash] An XML Document or the parsed JSON (commonly a Hash)
|
74
74
|
def self.query(api_uri, parameters, credentials, http_method = nil, ssl_check = nil)
|
75
75
|
http_method ||= API_DEFAULTS[:http_method]
|
76
|
-
ssl_check
|
76
|
+
ssl_check = API_DEFAULTS[:ssl_check] if ssl_check.nil?
|
77
77
|
if credentials.is_a?(Hash) && credentials.has_key?(:api_key) && credentials.has_key?(:secret_key)
|
78
78
|
parameters[:apiKey] = credentials[:api_key]
|
79
79
|
parameters[:secret] = credentials[:secret_key]
|
@@ -110,7 +110,7 @@ module CloudStackClient
|
|
110
110
|
def self.query_with_auto_paging(api_uri, parameters, credentials, page_size = nil, http_method = nil, ssl_check = nil)
|
111
111
|
page_size ||= API_DEFAULTS[:page_size]
|
112
112
|
http_method ||= API_DEFAULTS[:http_method]
|
113
|
-
ssl_check
|
113
|
+
ssl_check = API_DEFAULTS[:ssl_check] if ssl_check.nil?
|
114
114
|
output = nil
|
115
115
|
parameters[:page] = 0
|
116
116
|
parameters[:pageSize] = page_size
|
@@ -283,6 +283,8 @@ module CloudStackClient
|
|
283
283
|
http.ca_file = File.join(File.dirname(__FILE__), "../../assets/cacert.pem")
|
284
284
|
end
|
285
285
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
286
|
+
else
|
287
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
286
288
|
end
|
287
289
|
end
|
288
290
|
request_cookies = nil
|
metadata
CHANGED
@@ -1,21 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud_stack_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Roman Messer
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
|
-
description:
|
15
|
-
a commandline utility with auto paging and support to read credentials
|
16
|
-
file.
|
13
|
+
description: CloudStack API client to execute any command against a CloudStack Infrastructure.
|
14
|
+
Also contains a commandline utility with auto paging and support to read credentials
|
15
|
+
from a config file.
|
17
16
|
email:
|
18
|
-
-
|
17
|
+
- rms@ict-cloud.com
|
19
18
|
executables:
|
20
19
|
- cloud-stack.rb
|
21
20
|
extensions: []
|
@@ -38,29 +37,29 @@ files:
|
|
38
37
|
- lib/cloud_stack_client/definitions.rb
|
39
38
|
- lib/cloud_stack_client/helpers.rb
|
40
39
|
- lib/cloud_stack_client/version.rb
|
41
|
-
homepage:
|
42
|
-
licenses:
|
40
|
+
homepage: https://bitbucket.org/RmMsr/cloud_stack_client
|
41
|
+
licenses:
|
42
|
+
- MIT
|
43
|
+
metadata: {}
|
43
44
|
post_install_message:
|
44
45
|
rdoc_options: []
|
45
46
|
require_paths:
|
46
47
|
- lib
|
47
48
|
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
-
none: false
|
49
49
|
requirements:
|
50
|
-
- -
|
50
|
+
- - '>='
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
54
|
requirements:
|
56
|
-
- -
|
55
|
+
- - '>='
|
57
56
|
- !ruby/object:Gem::Version
|
58
57
|
version: '0'
|
59
58
|
requirements: []
|
60
59
|
rubyforge_project:
|
61
|
-
rubygems_version:
|
60
|
+
rubygems_version: 2.0.3
|
62
61
|
signing_key:
|
63
|
-
specification_version:
|
64
|
-
summary:
|
62
|
+
specification_version: 4
|
63
|
+
summary: Library to work with the CloudStack API.
|
65
64
|
test_files: []
|
66
65
|
has_rdoc:
|