Class: Bosh::AwsCliPlugin::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, #keep_unreachable_vms, #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, #network_type, #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

#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


39
40
41
# File 'lib/bosh_cli_plugin_aws/bat_manifest.rb', line 39

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

#second_static_ipObject


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

def second_static_ip
  ENV.fetch('BOSH_AWS_SECOND_STATIC_IP', '10.10.0.30')
end

#static_ipObject


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

def static_ip
  ENV.fetch('BOSH_AWS_STATIC_IP', '10.10.0.29')
end

#to_yObject


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

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

#vipObject


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

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