bosh-director 1.5.0.pre.1190 → 1.5.0.pre.1193
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'bosh/director/api/controllers/base_controller'
|
2
2
|
require 'bosh/director/api/stemcell_manager'
|
3
|
+
require 'bosh/director/compiled_package_group'
|
3
4
|
require 'bosh/director/compiled_packages_exporter'
|
4
5
|
|
5
6
|
module Bosh::Director
|
@@ -7,13 +8,14 @@ module Bosh::Director
|
|
7
8
|
class CompiledPackagesController < BaseController
|
8
9
|
get '/stemcells/:stemcell_name/:stemcell_version/releases/:release_name/:release_version/compiled_packages' do
|
9
10
|
stemcell_manager = Api::StemcellManager.new
|
10
|
-
stemcell_manager.find_by_name_and_version(params[:stemcell_name], params[:stemcell_version])
|
11
|
+
stemcell = stemcell_manager.find_by_name_and_version(params[:stemcell_name], params[:stemcell_version])
|
11
12
|
|
12
13
|
release_manager = Api::ReleaseManager.new
|
13
14
|
release = release_manager.find_by_name(params[:release_name])
|
14
|
-
release_manager.find_version(release, params[:release_version])
|
15
|
+
release_version = release_manager.find_version(release, params[:release_version])
|
15
16
|
|
16
|
-
|
17
|
+
compiled_packages = CompiledPackageGroup.new(release_version, stemcell)
|
18
|
+
exporter = CompiledPackagesExporter.new(compiled_packages, App.instance.blobstores.blobstore)
|
17
19
|
|
18
20
|
send_file exporter.tgz_path, type: :tgz
|
19
21
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'bosh/director/models/compiled_package'
|
2
|
+
|
3
|
+
module Bosh::Director
|
4
|
+
class CompiledPackageGroup
|
5
|
+
def initialize(release_version, stemcell)
|
6
|
+
@release_version = release_version
|
7
|
+
@stemcell = stemcell
|
8
|
+
end
|
9
|
+
|
10
|
+
def compiled_packages
|
11
|
+
@release_version.packages.map do |package|
|
12
|
+
Models::CompiledPackage[
|
13
|
+
:package_id => package.id,
|
14
|
+
:stemcell_id => @stemcell.id,
|
15
|
+
:dependency_key => @release_version.package_dependency_key(package.name)
|
16
|
+
]
|
17
|
+
end.compact
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,13 +1,20 @@
|
|
1
|
-
require '
|
1
|
+
require 'bosh/director/tar_gzipper'
|
2
2
|
|
3
3
|
module Bosh::Director
|
4
|
+
class CompiledPackageDownloader
|
5
|
+
end
|
6
|
+
|
4
7
|
class CompiledPackagesExporter
|
5
|
-
def initialize
|
6
|
-
@
|
8
|
+
def initialize(compiled_package_group, blobstore_client)
|
9
|
+
@compiled_package_group = compiled_package_group
|
10
|
+
@blobstore_client = blobstore_client
|
7
11
|
end
|
8
12
|
|
9
13
|
def tgz_path
|
10
|
-
@
|
14
|
+
downloader = CompiledPackageDownloader.new(@compiled_package_group, @blobstore_client)
|
15
|
+
download_dir = downloader.download
|
16
|
+
|
17
|
+
TarGzipper.new.compress(download_dir, '*', File.join(download_dir, 'compiled_packages.tgz')).path
|
11
18
|
end
|
12
19
|
end
|
13
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-director
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.pre.
|
4
|
+
version: 1.5.0.pre.1193
|
5
5
|
prerelease: 6
|
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: 2013-10-
|
12
|
+
date: 2013-10-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bcrypt-ruby
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 1.5.0.pre.
|
37
|
+
version: 1.5.0.pre.1193
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.5.0.pre.
|
45
|
+
version: 1.5.0.pre.1193
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: bosh-core
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.5.0.pre.
|
53
|
+
version: 1.5.0.pre.1193
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.5.0.pre.
|
61
|
+
version: 1.5.0.pre.1193
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: bosh_common
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.5.0.pre.
|
69
|
+
version: 1.5.0.pre.1193
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 1.5.0.pre.
|
77
|
+
version: 1.5.0.pre.1193
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: bosh_cpi
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ~>
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.5.0.pre.
|
85
|
+
version: 1.5.0.pre.1193
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ~>
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 1.5.0.pre.
|
93
|
+
version: 1.5.0.pre.1193
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: bosh_openstack_cpi
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - ~>
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 1.5.0.pre.
|
101
|
+
version: 1.5.0.pre.1193
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 1.5.0.pre.
|
109
|
+
version: 1.5.0.pre.1193
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: bosh_aws_cpi
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.5.0.pre.
|
117
|
+
version: 1.5.0.pre.1193
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ~>
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 1.5.0.pre.
|
125
|
+
version: 1.5.0.pre.1193
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: bosh_vsphere_cpi
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ~>
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 1.5.0.pre.
|
133
|
+
version: 1.5.0.pre.1193
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,7 @@ dependencies:
|
|
138
138
|
requirements:
|
139
139
|
- - ~>
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: 1.5.0.pre.
|
141
|
+
version: 1.5.0.pre.1193
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: eventmachine
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -445,7 +445,7 @@ dependencies:
|
|
445
445
|
version: '1.0'
|
446
446
|
description: ! 'BOSH Director
|
447
447
|
|
448
|
-
|
448
|
+
31de34'
|
449
449
|
email: support@cloudfoundry.com
|
450
450
|
executables:
|
451
451
|
- bosh-director
|
@@ -525,6 +525,7 @@ files:
|
|
525
525
|
- lib/bosh/director/client.rb
|
526
526
|
- lib/bosh/director/cloudcheck_helper.rb
|
527
527
|
- lib/bosh/director/compile_task.rb
|
528
|
+
- lib/bosh/director/compiled_package_group.rb
|
528
529
|
- lib/bosh/director/compiled_packages_exporter.rb
|
529
530
|
- lib/bosh/director/config.rb
|
530
531
|
- lib/bosh/director/configuration_hasher.rb
|