bosh-registry 1.3112.0 → 1.3115.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a04130085b4f28b5f97357a02c2a777ecff85f72
4
- data.tar.gz: 3a63adab34a1c715e70a4637389bab62453a9b6d
3
+ metadata.gz: f00d529566ed51b8965045687540780b9a2cf74a
4
+ data.tar.gz: ab16d1900c414a8a560f86b9dc44458239f62bd8
5
5
  SHA512:
6
- metadata.gz: cc7a7c163f5873fcab626918523c7c8397a2399241285161d7ac86d7c2ecccf5b321eeb9ff62f46a7da4384fbfee90c20b345f8b957a3f9161c5f377f0e5907c
7
- data.tar.gz: 2ed9128dc7d814e966c98e6aaa408496a15859a428555502e6d66b9a6d7264b43367867cd22ebc803b434d53c9bb1eb4340b9bfd70a2983f5254e71ad70a8091
6
+ metadata.gz: 5126943c999c880f14f6feebb329fc9d236fac76f7af3356e98e3d3dc21fae97457d52a2fa74760291771789d8cc021178a102af0cdd6cf9423a75f4dffd25b1
7
+ data.tar.gz: 948daab985ff29ba120f96ee6fbef647dfefeec4605844b42fe1a6cd88e53d8ff8593d6b2fe78c7c564994d162231428f2cd2056dce9e0c73d94126eae453ffe
data/README.md CHANGED
@@ -67,16 +67,18 @@ These are the credentials to connect to AWS services:
67
67
 
68
68
  These are the credentials to connect to OpenStack services:
69
69
 
70
- * `auth_url` (required)
70
+ * `auth_url` (required, either API version 2 or version 3)
71
71
  URL of the OpenStack Identity endpoint to connect to
72
72
  * `username` (required)
73
73
  OpenStack user name
74
74
  * `api_key` (required)
75
75
  OpenStack API key
76
- * `tenant` (required)
76
+ * `tenant` (required for API version 2)
77
77
  OpenStack tenant name
78
- * `domain` (optional)
79
- OpenStack domain
78
+ * `project` (required for API version 3)
79
+ OpenStack project name
80
+ * `domain` (required for API version 3)
81
+ OpenStack domain name
80
82
  * `region` (optional)
81
83
  OpenStack region
82
84
  * `endpoint_type` (optional)
@@ -23,6 +23,7 @@ module Bosh::Registry
23
23
  :openstack_username => @openstack_properties['username'],
24
24
  :openstack_api_key => @openstack_properties['api_key'],
25
25
  :openstack_tenant => @openstack_properties['tenant'],
26
+ :openstack_project_name => @openstack_properties['project'],
26
27
  :openstack_domain_name => @openstack_properties['domain'],
27
28
  :openstack_region => @openstack_properties['region'],
28
29
  :openstack_endpoint_type => @openstack_properties['endpoint_type'],
@@ -33,16 +34,26 @@ module Bosh::Registry
33
34
  def openstack
34
35
  @openstack ||= Fog::Compute.new(@openstack_options)
35
36
  end
36
-
37
+
37
38
  def validate_options(cloud_config)
38
39
  unless cloud_config.has_key?('openstack') &&
39
- cloud_config['openstack'].is_a?(Hash) &&
40
- cloud_config['openstack']['auth_url'] &&
41
- cloud_config['openstack']['username'] &&
42
- cloud_config['openstack']['api_key'] &&
43
- cloud_config['openstack']['tenant']
40
+ cloud_config['openstack'].is_a?(Hash) &&
41
+ cloud_config['openstack']['auth_url'] &&
42
+ cloud_config['openstack']['username'] &&
43
+ cloud_config['openstack']['api_key']
44
44
  raise ConfigError, 'Invalid OpenStack configuration parameters'
45
45
  end
46
+
47
+ if cloud_config['openstack']['auth_url'].match(/v2(\.\d+)?/)
48
+ unless cloud_config['openstack']['tenant']
49
+ raise ConfigError, 'Invalid OpenStack configuration parameters'
50
+ end
51
+
52
+ elsif cloud_config['openstack']['auth_url'].match(/v3(\.\d+)?/)
53
+ unless cloud_config['openstack']['domain'] && cloud_config['openstack']['project']
54
+ raise ConfigError, 'Invalid OpenStack configuration parameters'
55
+ end
56
+ end
46
57
  end
47
58
 
48
59
  # Get the list of IPs belonging to this instance
@@ -51,7 +62,7 @@ module Bosh::Registry
51
62
  # going renew the fog connection one time to make sure that we get a new non-expired token.
52
63
  retried = false
53
64
  begin
54
- instance = openstack.servers.find { |s| s.name == instance_id }
65
+ instance = openstack.servers.find { |s| s.name == instance_id }
55
66
  rescue Excon::Errors::Unauthorized => e
56
67
  unless retried
57
68
  retried = true
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Registry
3
- VERSION = '1.3112.0'
3
+ VERSION = '1.3115.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3112.0
4
+ version: 1.3115.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3112.0
103
+ version: 1.3115.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.3112.0
110
+ version: 1.3115.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement