Class: Bosh::Aws::BatManifest

Inherits:
MicroboshManifest show all
Defined in:
lib/bosh_cli_plugin_aws/bat_manifest.rb

Instance Attribute Summary collapse

Attributes inherited from MicroboshManifest

#hm_director_password, #hm_director_user, #route53_receipt, #vpc_receipt

Instance Method Summary collapse

Methods inherited from MicroboshManifest

#access_key_id, #availability_zone, #cache_access_key_id, #cache_bucket_name, #cache_secret_access_key, #certificate, #compiled_package_cache?, #director_ssl, #director_ssl_cert, #director_ssl_key, #key_pair_name, #name, #private_key_path, #region, #secret_access_key, #ssl_certs, #subnet, #to_yaml, #vpc_config

Constructor Details

#initialize(vpc_receipt, route53_receipt, stemcell_version, director_uuid, stemcell_name) ⇒ BatManifest

Returns a new instance of BatManifest.



8
9
10
11
12
13
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 8

def initialize(vpc_receipt, route53_receipt, stemcell_version, director_uuid, stemcell_name)
  super(vpc_receipt, route53_receipt)
  @stemcell_version = stemcell_version
  @director_uuid = director_uuid
  @stemcell_name = stemcell_name
end

Instance Attribute Details

#director_uuidObject (readonly)

Returns the value of attribute director_uuid.



6
7
8
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 6

def director_uuid
  @director_uuid
end

#stemcell_nameObject (readonly)

Returns the value of attribute stemcell_name.



6
7
8
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 6

def stemcell_name
  @stemcell_name
end

#stemcell_versionObject (readonly)

Returns the value of attribute stemcell_version.



6
7
8
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 6

def stemcell_version
  @stemcell_version
end

Instance Method Details

#deployment_nameObject



19
20
21
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 19

def deployment_name
  "bat"
end

#domainObject



23
24
25
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 23

def domain
  vpc_receipt["vpc"]["domain"] || warning('Missing domain field')
end

#file_nameObject



15
16
17
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 15

def file_name
  "bat.yml"
end

#get_template(template) ⇒ Object



35
36
37
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 35

def get_template(template)
  File.expand_path("../../../templates/#{template}", __FILE__)
end

#to_yObject



31
32
33
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 31

def to_y
  ERB.new(File.read(get_template("bat.yml.erb"))).result(binding)
end

#vipObject



27
28
29
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 27

def vip
  route53_receipt['elastic_ips']['bat']['ips'][0] || warning('Missing vip field')
end