occi-api 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/occi/api/client/base/stubs.rb +1 -1
- data/lib/occi/api/client/client_http.rb +6 -1
- data/lib/occi/api/client/http/authn_plugins/keystone.rb +1 -1
- data/lib/occi/api/client/http/party_wrappers.rb +5 -5
- data/lib/occi/api/version.rb +1 -1
- data/occi-api.gemspec +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTdmMWQ2ZjBlNWE0NzE0MTc0OTYxMDY2NGM0MTUwOTZmMGIyM2M3Mw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NmVhNWMyNjNhMmE0OTlkYmM1MzNmZjFlZGM5MGVhY2FjNmY1MzM1OA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YjE1OTg0YzNkZjEzMTU4ODc2MDlmNzgwNmJmZmQ3YjFmMWRkZTU1NTc0NGM2
|
10
|
+
ZTg3ZTgzN2Y2ZDZiYTQ4MDY5ZWU1MTQ1MmNmMGJmNmRkYWY3NzNjYjI5NjJl
|
11
|
+
MGQ1NzM2NzU5OWVlYzM5ZjZkYmQ2YjY2Mjk5NDNiM2EzYTg5ODA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NmUyYjZlNjhjNGY3MTI4OGVjZWIzOWRiZDc1Mjk5MzRjMTljM2UzNWEyMmI0
|
14
|
+
NDNlYmI0MjQ3NmE0MTcyZGU1MjM5Y2U2NWUzNzhkZjk4NDllYjdkMWIzMDI4
|
15
|
+
NDZkODAzZDk0YmM5YzUzNmI2ZmRkMjljY2UxN2M1NTUwNDYyZTk=
|
@@ -40,7 +40,7 @@ module Occi::Api::Client
|
|
40
40
|
# # => #<Occi::Core::Resources>
|
41
41
|
#
|
42
42
|
# @param resource_type_identifier [String] resource type identifier, type name or resource location
|
43
|
-
# @return [Occi::Core::Resources] list of resource descriptions
|
43
|
+
# @return [Occi::Core::Resources, Occi::Core::Links] list of resource or link descriptions
|
44
44
|
def describe(resource_type_identifier=nil)
|
45
45
|
raise Occi::Api::Client::Errors::NotImplementedError, "#{__method__} is just a stub!"
|
46
46
|
end
|
@@ -104,7 +104,12 @@ module Occi::Api::Client
|
|
104
104
|
descriptions.merge! get(path)
|
105
105
|
end
|
106
106
|
|
107
|
-
|
107
|
+
# decide what to return, in case of mixed collections prefer resources
|
108
|
+
if descriptions.resources.empty?
|
109
|
+
descriptions.links
|
110
|
+
else
|
111
|
+
descriptions.resources
|
112
|
+
end
|
108
113
|
end
|
109
114
|
|
110
115
|
# @see Occi::Api::Client::ClientBase
|
@@ -48,7 +48,7 @@ module Occi::Api::Client
|
|
48
48
|
raise ::Occi::Api::Client::Errors::AuthnError,
|
49
49
|
"Unable to get Keystone's URL from the response!" unless match && match[2]
|
50
50
|
|
51
|
-
@keystone_url = match[2].chomp('/')
|
51
|
+
@keystone_url = match[2].chomp('/').chomp('/v2.0')
|
52
52
|
end
|
53
53
|
|
54
54
|
def set_auth_token(tenant = nil)
|
@@ -107,12 +107,12 @@ module Occi::Api::Client
|
|
107
107
|
Occi::Api::Log.debug "Response from location: #{path.inspect}"
|
108
108
|
kind = @model.get_by_location(path) if @model
|
109
109
|
|
110
|
-
Occi::Api::Log.debug "Response should contain kind: #{kind.inspect}"
|
111
|
-
entity_type =
|
112
|
-
|
113
|
-
|
110
|
+
Occi::Api::Log.debug "Response should contain kind: #{kind ? kind.type_identifier.inspect : 'none'}"
|
111
|
+
entity_type = if kind && kind.related_to?(Occi::Core::Link.kind)
|
112
|
+
Occi::Core::Link
|
113
|
+
else
|
114
|
+
Occi::Core::Resource
|
114
115
|
end
|
115
|
-
entity_type = Occi::Core::Resource unless entity_type
|
116
116
|
|
117
117
|
Occi::Api::Log.debug "Parser call: #{response.content_type.inspect} #{path.include?('/-/')} " \
|
118
118
|
"#{entity_type} #{response.headers.inspect}"
|
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.11'
|
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.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Feldhaus
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: occi-core
|
@@ -18,40 +18,40 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 4.2.
|
21
|
+
version: 4.2.11
|
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.11
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: httparty
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- - '>='
|
33
|
+
- - ! '>='
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '0'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- - '>='
|
40
|
+
- - ! '>='
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: json
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - '>='
|
47
|
+
- - ! '>='
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- - '>='
|
54
|
+
- - ! '>='
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
57
|
description: This gem provides ready-to-use client classes to simplify the integration
|
@@ -209,12 +209,12 @@ require_paths:
|
|
209
209
|
- lib
|
210
210
|
required_ruby_version: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
|
-
- - '>='
|
212
|
+
- - ! '>='
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: 1.9.3
|
215
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
216
|
requirements:
|
217
|
-
- - '>='
|
217
|
+
- - ! '>='
|
218
218
|
- !ruby/object:Gem::Version
|
219
219
|
version: '0'
|
220
220
|
requirements: []
|