class Bosh::AwsCliPlugin::BoshManifest

Attributes

director_uuid[R]
rds_receipt[R]
stemcell_name[RW]

Public Class Methods

new(vpc_receipt, route53_receipt, director_uuid, rds_receipt, options={}) click to toggle source
Calls superclass method
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 9
def initialize(vpc_receipt, route53_receipt, director_uuid, rds_receipt, options={})
  super(vpc_receipt, route53_receipt, options)
  @director_uuid = director_uuid
  @rds_receipt = rds_receipt
  @stemcell_name = 'bosh-aws-xen-ubuntu'
end

Public Instance Methods

bosh_deployment_name() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 28
def bosh_deployment_name
  "vpc-bosh-#{name}"
end
bosh_rds_host() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 44
def bosh_rds_host
  bosh_rds_properties['address']
end
bosh_rds_password() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 52
def bosh_rds_password
  bosh_rds_properties['roles'].first['password']
end
bosh_rds_port() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 48
def bosh_rds_port
  bosh_rds_properties['port']
end
bosh_rds_properties() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 40
def bosh_rds_properties
  rds_receipt['deployment_manifest']['properties']['bosh']
end
bosh_rds_user() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 56
def bosh_rds_user
  bosh_rds_properties['roles'].first['name']
end
deployment_name() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 20
def deployment_name
  "bosh"
end
director_ssl_cert() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 36
def director_ssl_cert
  certificate.certificate.gsub("\n", "\n        ")
end
director_ssl_key() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 32
def director_ssl_key
  certificate.key.gsub("\n", "\n        ")
end
file_name() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 16
def file_name
  "bosh.yml"
end
to_y() click to toggle source

RSpec overloads to_yaml when you set up expectations on an object; so to_y is just a way to get directly at the to_yaml implementation without fighting RSpec.

# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 62
def to_y
  ERB.new(File.read(get_template("bosh.yml.erb"))).result(binding)
end
to_yaml() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 66
def to_yaml
  to_y
end
vip() click to toggle source
# File lib/bosh_cli_plugin_aws/bosh_manifest.rb, line 24
def vip
  route53_receipt['elastic_ips']['bosh']['ips'][0] || warning('Missing vip field')
end