bosh_deployer 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,13 +37,7 @@ module Bosh::Deployer
37
37
 
38
38
  @db = Sequel.sqlite
39
39
 
40
- @db.create_table :vsphere_disk do
41
- primary_key :id
42
- column :path, :text
43
- column :datacenter, :text
44
- column :datastore, :text
45
- column :size, :integer
46
- end
40
+ migrate_cpi
47
41
 
48
42
  @db.create_table :instances do
49
43
  primary_key :id
@@ -114,6 +108,20 @@ module Bosh::Deployer
114
108
 
115
109
  private
116
110
 
111
+ def migrate_cpi
112
+ cpi = @cloud_options["plugin"]
113
+ require_path = File.join("cloud", cpi)
114
+ cpi_path = $LOAD_PATH.find { |p| File.exist?(
115
+ File.join(p, require_path)) }
116
+ migrations = File.expand_path("../db/migrations", cpi_path)
117
+
118
+ if File.directory?(migrations)
119
+ Sequel.extension :migration
120
+ Sequel::TimestampMigrator.new(
121
+ @db, migrations, :table => "#{cpi}_cpi_schema").run
122
+ end
123
+ end
124
+
117
125
  def deep_merge(src, dst)
118
126
  src.merge(dst) do |key, old, new|
119
127
  if new.respond_to?(:blank) && new.blank?
@@ -29,11 +29,11 @@ module Bosh::Deployer
29
29
 
30
30
  # @return [Integer] size in MiB
31
31
  def disk_size(cid)
32
- disk_model[cid].size
32
+ disk_model.first(:uuid => cid).size
33
33
  end
34
34
 
35
35
  def persistent_disk_changed?
36
- Config.resources['persistent_disk'] != disk_size(state.disk_cid)
36
+ Config.resources["persistent_disk"] != disk_size(state.disk_cid)
37
37
  end
38
38
 
39
39
  def check_dependencies
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bosh
4
4
  module Deployer
5
- VERSION = "1.2.0"
5
+ VERSION = "1.3.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-30 00:00:00.000000000 Z
12
+ date: 2012-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bosh_cli
@@ -64,17 +64,17 @@ dependencies:
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
- - - ~>
67
+ - - ! '>='
68
68
  - !ruby/object:Gem::Version
69
- version: 0.5.1
69
+ version: 0.6.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ~>
75
+ - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.5.1
77
+ version: 0.6.0
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: bosh_aws_cpi
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -208,22 +208,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
208
208
  - - ! '>='
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
- segments:
212
- - 0
213
- hash: 2681661945241081021
214
211
  required_rubygems_version: !ruby/object:Gem::Requirement
215
212
  none: false
216
213
  requirements:
217
214
  - - ! '>='
218
215
  - !ruby/object:Gem::Version
219
216
  version: '0'
220
- segments:
221
- - 0
222
- hash: 2681661945241081021
223
217
  requirements: []
224
218
  rubyforge_project:
225
- rubygems_version: 1.8.24
219
+ rubygems_version: 1.8.23
226
220
  signing_key:
227
221
  specification_version: 3
228
222
  summary: Micro BOSH Deployer
229
223
  test_files: []
224
+ has_rdoc: