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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c35477a7a236472b0e8688d4e1707917b6233219
4
- data.tar.gz: 24870c6344ce4b5b2e1626d0ca0100e299ec7d17
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTdmMWQ2ZjBlNWE0NzE0MTc0OTYxMDY2NGM0MTUwOTZmMGIyM2M3Mw==
5
+ data.tar.gz: !binary |-
6
+ NmVhNWMyNjNhMmE0OTlkYmM1MzNmZjFlZGM5MGVhY2FjNmY1MzM1OA==
5
7
  SHA512:
6
- metadata.gz: 9af9cf21a3aac55d6ad3cc6b2641be65173db39eb1a14653fcb88035f25cca66d4d62c3ddbb96fa1fe89e298f82c2d814d671ec0a2b1e078bc980de9c0ffe96a
7
- data.tar.gz: 4ed4f07f440648c707c74b401def3d86dc74071bbcce163b6c7098792426a27120f816df8690d611635eb94a990b4393f62fc1cf15bf7375e02a8ae35ec414bf
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
- descriptions.resources
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 = nil
112
- if kind && kind.related_to?(Occi::Core::Link)
113
- entity_type = Occi::Core::Link
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}"
@@ -1,5 +1,5 @@
1
1
  module Occi
2
2
  module Api
3
- VERSION = "4.2.0" unless defined?(::Occi::Api::VERSION)
3
+ VERSION = "4.2.1" unless defined?(::Occi::Api::VERSION)
4
4
  end
5
5
  end
@@ -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.10'
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.0
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-02-16 00:00:00.000000000 Z
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.10
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.10
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: []