bosh-gen 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +1 -0
- data/lib/bosh/gen/models/deployment_manifest.rb +7 -9
- data/lib/bosh/gen/version.rb +1 -1
- data/spec/fixtures/deployment_manifests/2_jobs_1_ip_8196_disk.yml +1 -2
- data/spec/fixtures/deployment_manifests/2_jobs_1_ip_8196_disk_with_numeric.yml +1 -2
- data/spec/fixtures/deployment_manifests/2_jobs_2_ips_no_disk.yml +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a9020cf883b488cfb4f48688a78c2824018d9e7
|
4
|
+
data.tar.gz: 256ff1b2761ac9b2bd195bfffcb2d4105a22ab93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d24f7e19053b2227e85bd96f89f9af128a8e30cd95cac02b8dde0d2301591169dab6910e0834b1d5395cc6c91a69255fc0b9c5d25a8ca1e96f8fa9d1e19fd2d5
|
7
|
+
data.tar.gz: 7689fe1c79be6da4a48b507a99ae7e6de9e922d40b5a892bb228c7424dc9057137eba24c52d3bb2263bd7ca33d52816bed1acd9ad328d6050b68ab725fa3ad8a
|
data/ChangeLog.md
CHANGED
@@ -3,13 +3,13 @@ require "yaml"
|
|
3
3
|
module Bosh::Gen::Models
|
4
4
|
class DeploymentManifest
|
5
5
|
attr_reader :manifest
|
6
|
-
|
6
|
+
|
7
7
|
def initialize(name, director_uuid, release_properties, cloud_properties, properties)
|
8
8
|
@manifest = {}
|
9
9
|
@cloud_properties = cloud_properties
|
10
10
|
@properties = properties
|
11
11
|
@security_groups = ["default"]
|
12
|
-
@stemcell_version = "
|
12
|
+
@stemcell_version = "latest"
|
13
13
|
@stemcell = { "name" => "bosh-stemcell", "version" => @stemcell_version }
|
14
14
|
@persistent_disk = cloud_properties.delete("persistent_disk").to_i
|
15
15
|
@static_ips = cloud_properties.delete("static_ips") || []
|
@@ -18,7 +18,7 @@ module Bosh::Gen::Models
|
|
18
18
|
# This is much more helpful in early development days
|
19
19
|
# of a release
|
20
20
|
release_properties["version"] = 'latest'
|
21
|
-
|
21
|
+
|
22
22
|
manifest["name"] = name
|
23
23
|
manifest["director_uuid"] = director_uuid
|
24
24
|
manifest["release"] = release_properties.dup
|
@@ -51,7 +51,6 @@ module Bosh::Gen::Models
|
|
51
51
|
{
|
52
52
|
"name" => "common",
|
53
53
|
"network" => "default",
|
54
|
-
"size" => 0,
|
55
54
|
"stemcell" => @stemcell,
|
56
55
|
"cloud_properties" => cloud_properties.dup
|
57
56
|
}
|
@@ -60,8 +59,8 @@ module Bosh::Gen::Models
|
|
60
59
|
manifest["jobs"] = []
|
61
60
|
manifest["properties"] = @properties
|
62
61
|
end
|
63
|
-
|
64
|
-
# Each item of +jobs+ is a hash.
|
62
|
+
|
63
|
+
# Each item of +jobs+ is a hash.
|
65
64
|
# The minimum hash is:
|
66
65
|
# { "name" => "jobname" }
|
67
66
|
# This is the equivalent to:
|
@@ -94,11 +93,10 @@ module Bosh::Gen::Models
|
|
94
93
|
manifest_job["persistent_disk"] = @persistent_disk if @persistent_disk > 0
|
95
94
|
manifest["jobs"] << manifest_job
|
96
95
|
end
|
97
|
-
manifest["resource_pools"].first["size"] = manifest["jobs"].inject(0) {|total, job| total + job["instances"]}
|
98
96
|
end
|
99
|
-
|
97
|
+
|
100
98
|
def to_yaml
|
101
99
|
manifest.to_yaml
|
102
100
|
end
|
103
101
|
end
|
104
|
-
end
|
102
|
+
end
|
data/lib/bosh/gen/version.rb
CHANGED