bosh_cpi 1.3058.0 → 1.3062.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: a42e919ae19dc67292a94c95f0cd85a999d07ce7
4
- data.tar.gz: 59c552ac235691e4bc212f34081fef1d779c7268
3
+ metadata.gz: 7eaf665b994d67411061a512f8c576c537b327ca
4
+ data.tar.gz: eb3248fc010e7010d26ce0705dcf5b2fff2890f7
5
5
  SHA512:
6
- metadata.gz: fd24d5a6f634918b5b02a33185f79bcfdd177bac0f2c254b08fc63dd5ab603f4a2a7c11726565c9dcdea593f6217c8e64852252554fbd1e626c02fe713d142fa
7
- data.tar.gz: e9a9699d439d5aa794acdf02dd3ceb7c1c56935a4d193895d03de760d28d2bc1bc3f688f336b783fe5946fdfd886b535dd1a9e40e997b217c602cb5d7994e49e
6
+ metadata.gz: f85f251d0b3931765de8e71dfddf149d9238c6c11c4fade1a8508f36c338c9f397e64689b3ee30ce2c5dbd176dc1c08eb93a5ef242aa872d9406ce1633ad6eb2
7
+ data.tar.gz: 44c50dee1b9fcce2b84aa4ba360511f1c26cfabedbe97732a32bf7a9897d50ca813679ebd88726db754c4d3e0f95038309f0e2ed12d989cf0e2a4b8ce77968ea
data/lib/cloud.rb CHANGED
@@ -8,6 +8,7 @@ require "cloud/config"
8
8
  require "cloud/errors"
9
9
  require "cloud/provider"
10
10
  require "cloud/external_cpi"
11
+ require "cloud/internal_cpi"
11
12
 
12
13
  module Bosh
13
14
 
@@ -0,0 +1,25 @@
1
+ module Bosh::Clouds
2
+ class InternalCpi
3
+ def initialize(cloud)
4
+ @cloud = cloud
5
+ end
6
+
7
+ private
8
+
9
+ def method_missing(method_sym, *arguments, &block)
10
+ invoke_cpi_method(method_sym, arguments)
11
+ end
12
+
13
+ def respond_to?(method_sym)
14
+ cloud.respond_to?(method_sym)
15
+ end
16
+
17
+ def cloud
18
+ @cloud
19
+ end
20
+
21
+ def invoke_cpi_method(method_sym, arguments)
22
+ cloud.send(method_sym, *JSON.parse(JSON.dump(arguments)))
23
+ end
24
+ end
25
+ end
@@ -4,14 +4,14 @@ module Bosh::Clouds
4
4
  if cloud_config.has_key?('provider')
5
5
  ExternalCpiProvider.create(cloud_config['provider']['path'], director_uuid)
6
6
  else
7
- PluginCloudProvider.create(cloud_config['plugin'], cloud_config['properties'])
7
+ InternalCpiProvider.create(cloud_config['plugin'], cloud_config['properties'])
8
8
  end
9
9
  end
10
10
  end
11
11
 
12
12
  private
13
13
 
14
- class PluginCloudProvider
14
+ class InternalCpiProvider
15
15
  def self.create(plugin, options)
16
16
  begin
17
17
  require "cloud/#{plugin}"
@@ -19,7 +19,7 @@ module Bosh::Clouds
19
19
  raise CloudError, "Could not load Cloud Provider Plugin: #{plugin}, with error #{error.inspect}"
20
20
  end
21
21
 
22
- Bosh::Clouds.const_get(plugin.capitalize).new(options)
22
+ InternalCpi.new(Bosh::Clouds.const_get(plugin.capitalize).new(options))
23
23
  end
24
24
  end
25
25
 
data/lib/cloud/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Clouds
3
- VERSION = '1.3058.0'
3
+ VERSION = '1.3062.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_cpi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3058.0
4
+ version: 1.3062.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-08-24 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bosh_common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3058.0
19
+ version: 1.3062.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.3058.0
26
+ version: 1.3062.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: membrane
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -96,7 +96,7 @@ dependencies:
96
96
  version: '0'
97
97
  description: |-
98
98
  BOSH CPI
99
- 7510f3
99
+ 704861
100
100
  email: support@cloudfoundry.com
101
101
  executables: []
102
102
  extensions: []
@@ -112,6 +112,7 @@ files:
112
112
  - lib/cloud/config.rb
113
113
  - lib/cloud/errors.rb
114
114
  - lib/cloud/external_cpi.rb
115
+ - lib/cloud/internal_cpi.rb
115
116
  - lib/cloud/provider.rb
116
117
  - lib/cloud/version.rb
117
118
  homepage: https://github.com/cloudfoundry/bosh