Class: Prof::Environment::PcfDrinks

Inherits:
Object
  • Object
show all
Defined in:
lib/prof/environment/pcf_drinks.rb

Instance Method Summary collapse

Constructor Details

#initialize(tempest_config, page: default_capybara_session) ⇒ PcfDrinks

Returns a new instance of PcfDrinks.



26
27
28
29
# File 'lib/prof/environment/pcf_drinks.rb', line 26

def initialize(tempest_config, page: default_capybara_session)
  @tempest_config = tempest_config
  @page           = page
end

Instance Method Details

#bosh_directorObject



47
48
49
50
51
52
53
# File 'lib/prof/environment/pcf_drinks.rb', line 47

def bosh_director
  @bosh_director ||= Hula::BoshDirector.new(
    target_url:  bosh_director_url,
    username:    bosh_credentials.fetch('identity'),
    password:    bosh_credentials.fetch('password')
  )
end

#cloud_foundryObject



35
36
37
38
39
40
41
# File 'lib/prof/environment/pcf_drinks.rb', line 35

def cloud_foundry
  @cloud_foundry ||= CloudFoundry.new(
    domain:   cloud_foundry_domain,
    username: cloud_foundry_credentials.username,
    password: cloud_foundry_credentials.password
  )
end

#cloud_foundry_domainObject



43
44
45
# File 'lib/prof/environment/pcf_drinks.rb', line 43

def cloud_foundry_domain
  tempest_config.fetch(:cloudfoundry).fetch(:domain)
end

#cloud_foundry_uaaObject



64
65
66
67
68
69
70
# File 'lib/prof/environment/pcf_drinks.rb', line 64

def cloud_foundry_uaa
  @cloud_foundry_uaa ||= UAAClient.new(
    cloud_foundry_domain,
    cloud_controller_client_credentials.identity,
    cloud_controller_client_credentials.password
  )
end

#ops_managerObject



31
32
33
# File 'lib/prof/environment/pcf_drinks.rb', line 31

def ops_manager
  @ops_manager ||= OpsManager.new(ops_manager_config.merge(page: page))
end

#ssh_gatewayObject



55
56
57
58
59
60
61
62
# File 'lib/prof/environment/pcf_drinks.rb', line 55

def ssh_gateway
  SshGateway.new(
    gateway_host:     ssh_gateway_config.fetch(:host),
    gateway_username: ssh_gateway_config.fetch(:username),
    gateway_password: ssh_gateway_config[:password],
    ssh_key:          ssh_gateway_config[:ssh_key]
  )
end