bosh-registry 1.3115.0 → 1.3120.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8b138c46152a2e700ef8342892291d5ea9e21a2
|
4
|
+
data.tar.gz: 4af5dc71fdcaedeb59147d995755e3053bc8cba6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f046d5a6e0a9a1f8ff407ae221a563a4cc940adfda019aecd74424caec33be07c7da10392087c4ba2a108ef0faea31a5f75d65030b051f05f5eb50a273336a4c
|
7
|
+
data.tar.gz: 426aed1e1cf6e90c154f96a57d61c03fd8e89dbee9a881aaa3a2f0c1f7c40685459ca64438d239fe8a3f2432a818ea5052af026797d4f13c71ccbc2d1a92b147
|
data/lib/bosh/registry/config.rb
CHANGED
@@ -25,13 +25,17 @@ module Bosh::Registry
|
|
25
25
|
|
26
26
|
@db = connect_db(config["db"])
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
if config.has_key?("cloud")
|
29
|
+
plugin = config["cloud"]["plugin"]
|
30
|
+
begin
|
31
|
+
require "bosh/registry/instance_manager/#{plugin}"
|
32
|
+
rescue LoadError
|
33
|
+
raise ConfigError, "Could not find Provider Plugin: #{plugin}"
|
34
|
+
end
|
35
|
+
@instance_manager = Bosh::Registry::InstanceManager.const_get(plugin.capitalize).new(config["cloud"])
|
36
|
+
else
|
37
|
+
@instance_manager = Bosh::Registry::InstanceManager.new
|
33
38
|
end
|
34
|
-
@instance_manager = Bosh::Registry::InstanceManager.const_get(plugin.capitalize).new(config["cloud"])
|
35
39
|
end
|
36
40
|
|
37
41
|
def connect_db(db_config)
|
@@ -62,15 +66,16 @@ module Bosh::Registry
|
|
62
66
|
raise ConfigError, "Database configuration is missing from config file"
|
63
67
|
end
|
64
68
|
|
65
|
-
|
66
|
-
|
67
|
-
|
69
|
+
if config.has_key?("cloud")
|
70
|
+
unless config["cloud"].is_a?(Hash)
|
71
|
+
raise ConfigError, "Cloud configuration is missing from config file"
|
72
|
+
end
|
68
73
|
|
69
|
-
|
70
|
-
|
74
|
+
if config["cloud"]["plugin"].nil?
|
75
|
+
raise ConfigError, "Cloud plugin is missing from config file"
|
76
|
+
end
|
71
77
|
end
|
72
78
|
end
|
73
79
|
|
74
80
|
end
|
75
|
-
|
76
81
|
end
|
data/lib/bosh/registry/errors.rb
CHANGED
@@ -38,6 +38,15 @@ module Bosh::Registry
|
|
38
38
|
get_instance(instance_id).destroy
|
39
39
|
end
|
40
40
|
|
41
|
+
##
|
42
|
+
# Get the list of IPs belonging to this instance
|
43
|
+
# @param [String] instance_id instance id
|
44
|
+
def instance_ips(instance_id)
|
45
|
+
raise NotImplemented, "Default implementation of InstanceManager does not support " \
|
46
|
+
"IPs retrieval. Create IaaS-specific subclass and override this method " \
|
47
|
+
"if IPs verfication is needed."
|
48
|
+
end
|
49
|
+
|
41
50
|
private
|
42
51
|
|
43
52
|
def check_instance_ips(ip, instance_id)
|
@@ -14,7 +14,11 @@ module Bosh::Registry
|
|
14
14
|
@openstack_properties = cloud_config['openstack']
|
15
15
|
|
16
16
|
unless @openstack_properties['auth_url'].match(/\/tokens$/)
|
17
|
-
|
17
|
+
if is_v3? @openstack_properties['auth_url']
|
18
|
+
@openstack_properties['auth_url'] = @openstack_properties['auth_url'] + '/auth/tokens'
|
19
|
+
else
|
20
|
+
@openstack_properties['auth_url'] = @openstack_properties['auth_url'] + '/tokens'
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
@openstack_options = {
|
@@ -49,7 +53,7 @@ module Bosh::Registry
|
|
49
53
|
raise ConfigError, 'Invalid OpenStack configuration parameters'
|
50
54
|
end
|
51
55
|
|
52
|
-
elsif cloud_config['openstack']['auth_url']
|
56
|
+
elsif is_v3? cloud_config['openstack']['auth_url']
|
53
57
|
unless cloud_config['openstack']['domain'] && cloud_config['openstack']['project']
|
54
58
|
raise ConfigError, 'Invalid OpenStack configuration parameters'
|
55
59
|
end
|
@@ -75,6 +79,10 @@ module Bosh::Registry
|
|
75
79
|
return (instance.private_ip_addresses + instance.floating_ip_addresses).compact
|
76
80
|
end
|
77
81
|
|
82
|
+
private
|
83
|
+
def is_v3?(url)
|
84
|
+
url.match(/\/v3(?=\/|$)/)
|
85
|
+
end
|
78
86
|
end
|
79
87
|
|
80
88
|
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.
|
4
|
+
version: 1.3120.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-
|
11
|
+
date: 2015-10-27 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.
|
103
|
+
version: 1.3120.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.
|
110
|
+
version: 1.3120.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|