occi-api 4.2.0.beta.10 → 4.2.0.beta.12
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0454d6d2434cf832d9a771a26366f8741c9fc4f
|
4
|
+
data.tar.gz: 2128a013520395a20fd0883ef3d782d140a35cae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28dff1463abcd17a1905414c8ca320c1fb54c3f771071412160c631143204458964a32f22b8faec2d8f5e71b1d5df44c612152cf40d23841e1a21200e7de2915
|
7
|
+
data.tar.gz: b91888dfabd1c46378a1cd72689f12269f028ddfac91fac069f983c8747e8c9ff519fb02688ea1799362ad844823dfcc6b68709af592dea9dedda413e3d76b9c
|
@@ -50,7 +50,7 @@ module Occi::Api::Client
|
|
50
50
|
|
51
51
|
if tis.length > 1
|
52
52
|
raise Occi::Api::Client::Errors::AmbiguousNameError,
|
53
|
-
"
|
53
|
+
"Action type #{type.inspect} is ambiguous, use a type identifier!"
|
54
54
|
end
|
55
55
|
|
56
56
|
tis.first
|
@@ -13,7 +13,7 @@ module Occi::Api::Client
|
|
13
13
|
def initialize(options = {})
|
14
14
|
# define defaults and convert options to Hashie::Mash if necessary
|
15
15
|
defaults = Hashie::Mash.new({
|
16
|
-
:endpoint => "http://localhost:
|
16
|
+
:endpoint => "http://localhost:3000/",
|
17
17
|
:auth => {:type => "none"},
|
18
18
|
:log => {:out => STDERR, :level => Occi::Log::WARN, :logger => nil},
|
19
19
|
:auto_connect => true,
|
@@ -15,7 +15,8 @@ module Occi::Api::Client
|
|
15
15
|
# 'Accept' => 'application/occi+json,text/plain;q=0.8,text/occi;q=0.2'
|
16
16
|
DEFAULT_HEADERS = {
|
17
17
|
'Accept' => 'text/plain,text/occi;q=0.2',
|
18
|
-
'User-Agent' => "rOCCI
|
18
|
+
'User-Agent' => "rOCCI-core/#{Occi::VERSION} rOCCI-api/#{Occi::Api::VERSION} OCCI/1.1 " \
|
19
|
+
"#{RUBY_ENGINE}-#{RUBY_PLATFORM}/#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
|
19
20
|
}
|
20
21
|
headers DEFAULT_HEADERS
|
21
22
|
|
@@ -24,7 +25,7 @@ module Occi::Api::Client
|
|
24
25
|
#
|
25
26
|
# @example
|
26
27
|
# options = {
|
27
|
-
# :endpoint => "http://localhost:
|
28
|
+
# :endpoint => "http://localhost:3000/",
|
28
29
|
# :timeout => 15
|
29
30
|
# :auth => {:type => "none"},
|
30
31
|
# :log => {:out => STDERR, :level => Occi::Log::WARN, :logger => nil},
|
@@ -40,7 +41,7 @@ module Occi::Api::Client
|
|
40
41
|
super options
|
41
42
|
|
42
43
|
self.class.base_uri @endpoint.to_s
|
43
|
-
self.class.
|
44
|
+
self.class.default_timeout @options[:timeout].to_i unless @options[:timeout].blank?
|
44
45
|
|
45
46
|
# get model information from the endpoint
|
46
47
|
# and create Occi::Model instance
|
@@ -68,6 +69,9 @@ module Occi::Api::Client
|
|
68
69
|
:headers => headers
|
69
70
|
)
|
70
71
|
|
72
|
+
response_msg = response_message(response)
|
73
|
+
raise "HTTP GET failed! #{response_msg}" unless response.code == 200
|
74
|
+
|
71
75
|
# TODO: remove the gsub OCCI-OS hack as soon as they stop using 'uri:'
|
72
76
|
response.body.gsub(/\# uri:\/(compute|storage|network)\/[\n]?/, '').split("\n").compact
|
73
77
|
end
|
data/lib/occi/api/version.rb
CHANGED
data/occi-api.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.test_files = `git ls-files -- {test,spec}/*`.split("\n")
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
|
-
gem.add_dependency 'occi-core', '~> 4.2.
|
21
|
+
gem.add_dependency 'occi-core', '~> 4.2.5'
|
22
22
|
gem.add_dependency 'httparty'
|
23
23
|
gem.add_dependency 'json'
|
24
24
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: occi-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.0.beta.
|
4
|
+
version: 4.2.0.beta.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Feldhaus
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 4.2.
|
21
|
+
version: 4.2.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 4.2.
|
28
|
+
version: 4.2.5
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: httparty
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|