Commit e502bdd6 authored by Ted Young's avatar Ted Young Committed by Colin Obyrne

Add manifest helpers for cloud_configs and deployments using them

Manifest helpers that create deployment manifests with the cloud config
properties have been renamed to "legacy_*"
Signed-off-by: default avatarColin Obyrne <cobyrne@pivotal.io>
parent e33e0c3d
......@@ -4,7 +4,7 @@ describe 'cancel task', type: :integration do
with_reset_sandbox_before_each
it 'creates a task and then successfully cancels it' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['compilation']['workers'] = 1
manifest_hash['jobs'][0]['template'] = 'job_with_blocking_compilation'
manifest_hash['jobs'][0]['instances'] = 1
......
......@@ -13,7 +13,7 @@ describe 'cli: cloudcheck', type: :integration do
runner.run("upload stemcell #{spec_asset('valid_stemcell.tgz')}")
manifest = Bosh::Spec::Deployments.simple_manifest
manifest = Bosh::Spec::Deployments.legacy_simple_manifest
manifest['jobs'][0]['persistent_disk'] = 100
deployment_manifest = yaml_file('simple', manifest)
......
......@@ -59,7 +59,7 @@ describe 'cli: compiled_packages', type: :integration do
it 'allows the user to import compiled packages after a previously successful import' do
target_and_login
deployment_manifest = yaml_file('simple_manifest', Bosh::Spec::Deployments.simple_manifest)
deployment_manifest = yaml_file('simple_manifest', Bosh::Spec::Deployments.legacy_simple_manifest)
bosh_runner.run("deployment #{deployment_manifest.path}")
bosh_runner.run("upload stemcell #{spec_asset('valid_stemcell.tgz')}")
bosh_runner.run("upload release #{create_release}")
......
......@@ -14,7 +14,7 @@ describe 'cli: deployment process', type: :integration do
parse_release_tarball_path(output)
end
deployment_manifest = yaml_file('simple', Bosh::Spec::Deployments.simple_manifest)
deployment_manifest = yaml_file('simple', Bosh::Spec::Deployments.legacy_simple_manifest)
expect(File).to exist(release_filename)
expect(File).to exist(deployment_manifest.path)
......@@ -32,7 +32,7 @@ describe 'cli: deployment process', type: :integration do
context 'given two deployments from one release' do
it 'is successful' do
release_filename = spec_asset('valid_release.tgz')
minimal_manifest = Bosh::Spec::Deployments.minimal_manifest
minimal_manifest = Bosh::Spec::Deployments.legacy_minimal_manifest
deployment_manifest = yaml_file('minimal', minimal_manifest)
target_and_login
......@@ -66,7 +66,7 @@ describe 'cli: deployment process', type: :integration do
describe 'bosh deployments' do
it 'lists deployment details' do
release_filename = spec_asset('valid_release.tgz')
deployment_manifest = yaml_file('minimal', Bosh::Spec::Deployments.minimal_manifest)
deployment_manifest = yaml_file('minimal', Bosh::Spec::Deployments.legacy_minimal_manifest)
Dir.mktmpdir do |tmpdir|
cloud_config_path = File.join(tmpdir, 'cloud_config.yml')
......@@ -99,7 +99,7 @@ Deployments total: 1
describe 'bosh delete deployment' do
it 'deletes an existing deployment' do
release_filename = spec_asset('valid_release.tgz')
deployment_manifest = yaml_file('minimal', Bosh::Spec::Deployments.minimal_manifest)
deployment_manifest = yaml_file('minimal', Bosh::Spec::Deployments.legacy_minimal_manifest)
target_and_login
bosh_runner.run("deployment #{deployment_manifest.path}")
......
......@@ -5,7 +5,7 @@ describe 'cli: locks', type: :integration do
context 'when a deployment is in progress' do
before do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['update']['canary_watch_time'] = 6000
deploy_simple(manifest_hash: manifest_hash, no_track: true)
end
......
......@@ -16,7 +16,7 @@ describe 'cli: package compilation', type: :integration do
end
deployment_manifest = yaml_file(
'simple_manifest', Bosh::Spec::Deployments.simple_manifest)
'simple_manifest', Bosh::Spec::Deployments.legacy_simple_manifest)
target_and_login
bosh_runner.run("deployment #{deployment_manifest.path}")
......@@ -43,7 +43,7 @@ describe 'cli: package compilation', type: :integration do
end
it 'sends only immediate dependancies to the agent for each package compilation task' do
manifest = Bosh::Spec::Deployments.simple_manifest
manifest = Bosh::Spec::Deployments.legacy_simple_manifest
manifest['jobs'][0]['template'] = ['foobar', 'goobaz']
manifest['jobs'][0]['instances'] = 1
manifest['resource_pools'][0]['size'] = 1
......@@ -100,7 +100,7 @@ describe 'cli: package compilation', type: :integration do
end
it 'returns truncated output' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['compilation']['workers'] = 1
manifest_hash['jobs'][0]['template'] = 'fails_with_too_much_output'
manifest_hash['jobs'][0]['instances'] = 1
......
......@@ -4,7 +4,7 @@ describe 'cli: property management', type: :integration do
with_reset_sandbox_before_each
it 'can get/set/unset deployment properties' do
manifest = Bosh::Spec::Deployments.simple_manifest
manifest = Bosh::Spec::Deployments.legacy_simple_manifest
manifest['jobs'] = []
deploy_simple(manifest_hash: manifest)
......
......@@ -4,7 +4,7 @@ describe 'cli: vms', type: :integration do
with_reset_sandbox_before_each
it 'should return vms in a deployment' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['releases'].first['version'] = 'latest'
deploy_simple(manifest_hash: manifest_hash)
......
......@@ -30,7 +30,7 @@ describe 'collocating templates from multiple releases', type: :integration do
bosh_runner.run("upload release #{spec_asset('dummy2-release.tgz')}")
bosh_runner.run("upload stemcell #{spec_asset('valid_stemcell.tgz')}")
manifest_hash = Bosh::Spec::Deployments.simple_manifest.merge(manifest)
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest.merge(manifest)
deployment_manifest = yaml_file('simple', manifest_hash)
bosh_runner.run("deployment #{deployment_manifest.path}")
bosh_runner.run("deploy")
......@@ -64,7 +64,7 @@ describe 'collocating templates from multiple releases', type: :integration do
bosh_runner.run("upload release #{spec_asset('dummy2-release.tgz')}")
bosh_runner.run("upload stemcell #{spec_asset('valid_stemcell.tgz')}")
manifest_hash = Bosh::Spec::Deployments.simple_manifest.merge(manifest)
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest.merge(manifest)
deployment_manifest = yaml_file('simple', manifest_hash)
bosh_runner.run("deployment #{deployment_manifest.path}")
......
......@@ -4,7 +4,7 @@ describe 'deploy job template', type: :integration do
with_reset_sandbox_before_each
it 're-evaluates job templates with new manifest job properties' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['properties'] = { 'test_property' => 1 }
deploy_simple(manifest_hash: manifest_hash)
......@@ -21,7 +21,7 @@ describe 'deploy job template', type: :integration do
end
it 're-evaluates job templates with new dynamic network configuration' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['networks'].first['type'] = 'dynamic'
manifest_hash['networks'].first['cloud_properties'] = {}
manifest_hash['networks'].first.delete('subnets')
......@@ -52,7 +52,7 @@ describe 'deploy job template', type: :integration do
after { current_sandbox.health_monitor_process.stop }
it 'creates alerts to mark the start and end of an update deployment' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
deploy_simple(manifest_hash: manifest_hash)
waiter.wait(60) do
......
......@@ -4,7 +4,7 @@ describe 'deploy job update', type: :integration do
with_reset_sandbox_before_each
it 'updates a job with multiple instances in parallel and obeys max_in_flight' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['update']['canaries'] = 0
manifest_hash['update']['max_in_flight'] = 2
manifest_hash['properties'] = { 'test_property' => 2 }
......@@ -19,7 +19,7 @@ describe 'deploy job update', type: :integration do
it 'redacts manifest diff values when requested' do
deploy_simple
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['update']['canary_watch_time'] = 0
manifest_hash['jobs'][0]['instances'] = 2
manifest_hash['resource_pools'][0]['size'] = 2
......@@ -38,7 +38,7 @@ describe 'deploy job update', type: :integration do
director.vm('foobar/0').fail_job
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['update']['canary_watch_time'] = 0
manifest_hash['jobs'][0]['instances'] = 2
manifest_hash['resource_pools'][0]['size'] = 2
......
......@@ -4,7 +4,7 @@ describe 'deploy', type: :integration do
with_reset_sandbox_before_each
it 'allows removing deployed jobs and adding new jobs at the same time' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['jobs'].first['name'] = 'fake-name1'
deploy_simple(manifest_hash: manifest_hash)
expect_running_vms(%w(fake-name1/0 fake-name1/1 fake-name1/2))
......@@ -19,7 +19,7 @@ describe 'deploy', type: :integration do
end
it 'supports scaling down and then scaling up' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['resource_pools'].first['size'] = 3
manifest_hash['jobs'].first['instances'] = 3
......@@ -40,7 +40,7 @@ describe 'deploy', type: :integration do
end
it 'supports fixed size resource pools' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['resource_pools'].first['size'] = 3
manifest_hash['jobs'].first['instances'] = 3
......@@ -65,7 +65,7 @@ describe 'deploy', type: :integration do
end
it 'supports dynamically sized resource pools' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['resource_pools'].first.delete('size')
manifest_hash['jobs'].first['instances'] = 3
......@@ -89,7 +89,7 @@ describe 'deploy', type: :integration do
end
it 'deletes extra vms when switching from fixed-size to dynamically-sized resource pools' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['resource_pools'].first['size'] = 2
manifest_hash['jobs'].first['instances'] = 1
......
......@@ -5,7 +5,7 @@ describe "Director deprecating the 'template' syntax", type: :integration do
context 'when the manifest uses template with an array' do
it 'issues a deprecation warning' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['releases'].first['version'] = 'latest'
manifest_hash['jobs'][0].delete('template')
manifest_hash['jobs'][0]['template'] = [ 'foobar' ]
......@@ -18,7 +18,7 @@ describe "Director deprecating the 'template' syntax", type: :integration do
context 'when the manifest uses template with a string' do
it 'does not issue a deprecation warning' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['releases'].first['version'] = 'latest'
manifest_hash['jobs'][0]['instances'] = 1
manifest_hash['resource_pools'][0]['size'] = 1
......
......@@ -21,7 +21,7 @@ describe 'director_scheduler', type: :integration do
runner.run('upload release')
runner.run("upload stemcell #{spec_asset('valid_stemcell.tgz')}")
deployment_hash = Bosh::Spec::Deployments.simple_manifest
deployment_hash = Bosh::Spec::Deployments.legacy_simple_manifest
deployment_hash['jobs'][0]['persistent_disk'] = 20480
deployment_manifest = yaml_file('simple', deployment_hash)
runner.run("deployment #{deployment_manifest.path}")
......
......@@ -4,7 +4,7 @@ describe 'disk pools', type: :integration do
with_reset_sandbox_before_each
it 'allows specifying a disk_pool' do
manifest = Bosh::Spec::Deployments.simple_manifest
manifest = Bosh::Spec::Deployments.legacy_simple_manifest
manifest['disk_pools'] = [{
'name' => 'fast_disks',
'disk_size' => 3000,
......@@ -19,7 +19,7 @@ describe 'disk pools', type: :integration do
end
it 'allows specifying persistent_disk size on a job' do
manifest = Bosh::Spec::Deployments.simple_manifest
manifest = Bosh::Spec::Deployments.legacy_simple_manifest
manifest['jobs'].first['persistent_disk'] = 3000
deploy_simple(manifest_hash: manifest)
......@@ -30,7 +30,7 @@ describe 'disk pools', type: :integration do
end
it 'allows NOT specifying a persistent_disk' do
manifest = Bosh::Spec::Deployments.simple_manifest
manifest = Bosh::Spec::Deployments.legacy_simple_manifest
deploy_simple(manifest_hash: manifest)
......
......@@ -5,7 +5,7 @@ describe 'drain', type: :integration do
with_reset_sandbox_before_all
before(:all) do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['releases'].first['version'] = 'latest'
manifest_hash['jobs'][0]['instances'] = 1
manifest_hash['resource_pools'][0]['size'] = 1
......@@ -33,7 +33,7 @@ describe 'drain', type: :integration do
with_reset_sandbox_before_all
before(:all) do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['releases'].first['version'] = 'latest'
manifest_hash['jobs'][0]['instances'] = 1
manifest_hash['resource_pools'][0]['size'] = 1
......
......@@ -8,7 +8,7 @@ describe 'run errand failure', type: :integration, with_tmp_dir: true do
with_tmp_dir_before_all
before(:all) do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
# Include other jobs in the deployment
manifest_hash['jobs'].first['instances'] = 1
......@@ -115,7 +115,7 @@ describe 'run errand failure', type: :integration, with_tmp_dir: true do
with_reset_sandbox_before_each
let(:manifest_hash) do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
# Mark foobar as an errand even though it does not have bin/run
manifest_hash['jobs'].first['lifecycle'] = 'errand'
......@@ -155,7 +155,7 @@ describe 'run errand failure', type: :integration, with_tmp_dir: true do
with_reset_sandbox_before_each
let(:manifest_hash) do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
# Errand with sufficient resources
manifest_hash['jobs'] << {
......
......@@ -28,7 +28,7 @@ describe 'run errand success', type: :integration, with_tmp_dir: true do
with_reset_sandbox_before_each
let(:manifest_hash) do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
# Include other jobs in the deployment
manifest_hash['resource_pools'].first['size'] = 3
......@@ -202,7 +202,7 @@ describe 'run errand success', type: :integration, with_tmp_dir: true do
context 'when the number of dynamic IPs is equal to the total number of vms' do
let(:manifest_hash) do
manifest_hash = Bosh::Spec::Deployments.test_release_manifest.merge({
manifest_hash = Bosh::Spec::Deployments.legacy_test_release_manifest.merge({
'compilation' => {
'workers' => 1,
'network' => 'fake-network',
......@@ -301,7 +301,7 @@ describe 'run errand success', type: :integration, with_tmp_dir: true do
end
def manifest_with_errand
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['jobs'].first['instances'] = 1
manifest_hash['jobs'] << {
......
......@@ -8,7 +8,7 @@ describe 'health_monitor: 1', type: :integration do
# ~50s
it 'HM can be queried for stats' do
deployment_hash = Bosh::Spec::Deployments.simple_manifest
deployment_hash = Bosh::Spec::Deployments.legacy_simple_manifest
deployment_hash['jobs'][0]['instances'] = 1
deploy_simple(manifest_hash: deployment_hash)
......@@ -44,7 +44,7 @@ describe 'health_monitor: 1', type: :integration do
it 'only resurrects stateless nodes that are configured to be resurrected' do
skip 'The interaction of a resurrected node and a non-resurrected node are important but broken. See #69728124'
deployment_hash = Bosh::Spec::Deployments.simple_manifest
deployment_hash = Bosh::Spec::Deployments.legacy_simple_manifest
deployment_hash['jobs'][0]['instances'] = 2
deploy_simple(manifest_hash: deployment_hash)
......@@ -72,7 +72,7 @@ describe 'health_monitor: 1', type: :integration do
# Turn resurrector off
current_sandbox.reconfigure_health_monitor('health_monitor_without_resurrector.yml.erb')
deployment_hash = Bosh::Spec::Deployments.simple_manifest
deployment_hash = Bosh::Spec::Deployments.legacy_simple_manifest
deployment_hash['jobs'][0]['instances'] = 2
deploy_simple(manifest_hash: deployment_hash)
......@@ -91,7 +91,7 @@ describe 'health_monitor: 1', type: :integration do
# ~50s
it 'notifies health monitor about job failures' do
deployment_hash = Bosh::Spec::Deployments.simple_manifest
deployment_hash = Bosh::Spec::Deployments.legacy_simple_manifest
deployment_hash['jobs'][0]['instances'] = 1
deploy_simple(manifest_hash: deployment_hash)
......
......@@ -8,7 +8,7 @@ describe 'health_monitor: 2', type: :integration do
# ~6m
it 'does not resurrect stateful nodes' do
deployment_hash = Bosh::Spec::Deployments.simple_manifest
deployment_hash = Bosh::Spec::Deployments.legacy_simple_manifest
deployment_hash['jobs'][0]['instances'] = 1
deployment_hash['jobs'][0]['persistent_disk'] = 20_480
deploy_simple(manifest_hash: deployment_hash)
......@@ -26,7 +26,7 @@ describe 'health_monitor: 2', type: :integration do
after { current_sandbox.health_monitor_process.stop }
it 'resurrects stateful nodes ' do
deployment_hash = Bosh::Spec::Deployments.simple_manifest
deployment_hash = Bosh::Spec::Deployments.legacy_simple_manifest
deployment_hash['jobs'][0]['instances'] = 1
deployment_hash['jobs'][0]['persistent_disk'] = 20_480
deploy_simple(manifest_hash: deployment_hash)
......
......@@ -4,7 +4,7 @@ describe 'network configuration', type: :integration do
with_reset_sandbox_before_each
it 'reserves first available dynamic ip' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['networks'].first['subnets'][0] = {
'range' => '192.168.1.0/24',
'gateway' => '192.168.1.1',
......@@ -31,7 +31,7 @@ describe 'network configuration', type: :integration do
end
it 'creates new VM if existing VM cannot be reconfigured to desired network settings' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['networks'].first['subnets'].first['static'] = %w(192.168.1.100)
manifest_hash['resource_pools'].first['size'] = 1
manifest_hash['jobs'].first['instances'] = 1
......@@ -49,7 +49,7 @@ describe 'network configuration', type: :integration do
end
it 'preserves existing network reservations on a second deployment' do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
# For routed subnets larger than /31 or /32,
# the number of available host addresses is usually reduced by two,
# namely the largest address, which is reserved as the broadcast address,
......
......@@ -5,7 +5,7 @@ describe 'package dependencies', type: :integration do
with_reset_sandbox_before_each
let(:manifest_hash) do
manifest_hash = Bosh::Spec::Deployments.simple_manifest
manifest_hash = Bosh::Spec::Deployments.legacy_simple_manifest
manifest_hash['releases'].first['version'] = 'latest'
manifest_hash['resource_pools'].first.delete('size')
manifest_hash['jobs'] = [
......
......@@ -45,7 +45,7 @@ describe 'delete release', type: :integration do
bosh_runner.run("upload stemcell #{spec_asset('valid_stemcell.tgz')}")
deployment_manifest = yaml_file('simple', Bosh::Spec::Deployments.simple_manifest)
deployment_manifest = yaml_file('simple', Bosh::Spec::Deployments.legacy_simple_manifest)
bosh_runner.run("deployment #{deployment_manifest.path}")
bosh_runner.run('deploy')
......
......@@ -61,7 +61,7 @@ describe 'release lifecycle', type: :integration do
bosh_runner.run("upload stemcell #{spec_asset('valid_stemcell.tgz')}")
manifest = Bosh::Spec::Deployments.simple_manifest
manifest = Bosh::Spec::Deployments.legacy_simple_manifest
manifest['releases'].first['version'] = 'latest'
deployment_manifest = yaml_file('simple', manifest)
......
......@@ -2,20 +2,16 @@ module Bosh::Spec
class Deployments
# This is a minimal manifest that deploys successfully.
# It doesn't have any jobs, so it's not very realistic though
def self.minimal_manifest
{
'name' => 'minimal',
'director_uuid' => 'deadbeef',
'releases' => [{
'name' => 'appcloud',
'version' => '0.1' # It's our dummy valid release from spec/assets/valid_release.tgz
}],
def self.legacy_minimal_manifest
minimal_manifest.merge(minimal_cloud_config)
end
def self.minimal_cloud_config
{
'networks' => [{
'name' => 'a',
'subnets' => [],
}],
'name' => 'a',
'subnets' => [],
}],
'compilation' => {
'workers' => 1,
......@@ -24,6 +20,45 @@ module Bosh::Spec
},
'resource_pools' => [],
}
end
def self.simple_cloud_config
minimal_cloud_config.merge({
'networks' => [{
'name' => 'a',
'subnets' => [{
'range' => '192.168.1.0/24',
'gateway' => '192.168.1.1',
'dns' => ['192.168.1.1', '192.168.1.2'],
'static' => ['192.168.1.10'],
'reserved' => [],
'cloud_properties' => {},
}],
}],
'resource_pools' => [{
'name' => 'a',
'size' => 3,
'cloud_properties' => {},
'network' => 'a',
'stemcell' => {
'name' => 'ubuntu-stemcell',
'version' => '1',
},
}]
})
end
def self.minimal_manifest
{
'name' => 'minimal',
'director_uuid' => 'deadbeef',
'releases' => [{
'name' => 'appcloud',
'version' => '0.1' # It's our dummy valid release from spec/assets/valid_release.tgz
}],
'update' => {
'canaries' => 2,
......@@ -34,6 +69,17 @@ module Bosh::Spec
}
end
def self.legacy_test_release_manifest
legacy_minimal_manifest.merge(
'name' => 'simple',
'releases' => [{
'name' => 'bosh-release',
'version' => '0.1-dev',
}]
)
end
def self.test_release_manifest
minimal_manifest.merge(
'name' => 'simple',
......@@ -45,31 +91,12 @@ module Bosh::Spec
)
end
def self.legacy_simple_manifest
simple_manifest.merge(simple_cloud_config)
end
def self.simple_manifest
test_release_manifest.merge({
'networks' => [{
'name' => 'a',
'subnets' => [{
'range' => '192.168.1.0/24',
'gateway' => '192.168.1.1',
'dns' => ['192.168.1.1', '192.168.1.2'],
'static' => ['192.168.1.10'],
'reserved' => [],
'cloud_properties' => {},
}],
}],
'resource_pools' => [{
'name' => 'a',
'size' => 3,
'cloud_properties' => {},
'network' => 'a',
'stemcell' => {
'name' => 'ubuntu-stemcell',
'version' => '1',
},
}],
'jobs' => [{
'name' => 'foobar',
'template' => 'foobar',
......
......@@ -67,7 +67,7 @@ module IntegrationExampleGroup
end
def set_deployment(options)
manifest_hash = options.fetch(:manifest_hash, Bosh::Spec::Deployments.simple_manifest)
manifest_hash = options.fetch(:manifest_hash, Bosh::Spec::Deployments.legacy_simple_manifest)
# Hold reference to the tempfile so that it stays around
# until the end of tests or next deploy.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment