class Bosh::AwsCliPlugin::BatManifest

Attributes

director_uuid[R]
stemcell_name[R]
stemcell_version[R]

Public Class Methods

new(vpc_receipt, route53_receipt, stemcell_version, director_uuid, stemcell_name) click to toggle source
Calls superclass method
# 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

Public Instance Methods

deployment_name() click to toggle source
# File lib/bosh_cli_plugin_aws/bat_manifest.rb, line 19
def deployment_name
  "bat"
end
file_name() click to toggle source
# File lib/bosh_cli_plugin_aws/bat_manifest.rb, line 15
def file_name
  "bat.yml"
end
get_template(template) click to toggle source
# File lib/bosh_cli_plugin_aws/bat_manifest.rb, line 39
def get_template(template)
  File.expand_path("../../../templates/#{template}", __FILE__)
end
second_static_ip() click to toggle source
# 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_ip() click to toggle source
# 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_y() click to toggle source
# 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
vip() click to toggle source
# 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

Private Instance Methods

reserved_ip_range() click to toggle source
# File lib/bosh_cli_plugin_aws/bat_manifest.rb, line 45
def reserved_ip_range
  env_range = ENV.fetch('BOSH_AWS_NETWORK_RESERVED', '')
  env_range.empty? ? '10.10.0.2 - 10.10.0.9' : env_range
end
static_ip_range() click to toggle source
# File lib/bosh_cli_plugin_aws/bat_manifest.rb, line 50
def static_ip_range
  env_range = ENV.fetch('BOSH_AWS_NETWORK_STATIC', '')
  env_range.empty? ? '10.10.0.10 - 10.10.0.30' : env_range
end