Class: Prof::Environment::PcfDrinks
- Inherits:
-
Object
- Object
- Prof::Environment::PcfDrinks
- Defined in:
- lib/prof/environment/pcf_drinks.rb
Instance Method Summary collapse
- #bosh_director ⇒ Object
- #cloud_foundry ⇒ Object
- #cloud_foundry_domain ⇒ Object
- #cloud_foundry_uaa ⇒ Object
-
#initialize(tempest_config) ⇒ PcfDrinks
constructor
A new instance of PcfDrinks.
- #ops_manager ⇒ Object
- #ssh_gateway ⇒ Object
Constructor Details
#initialize(tempest_config) ⇒ PcfDrinks
Returns a new instance of PcfDrinks.
25 26 27 |
# File 'lib/prof/environment/pcf_drinks.rb', line 25 def initialize(tempest_config) @tempest_config = tempest_config end |
Instance Method Details
#bosh_director ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/prof/environment/pcf_drinks.rb', line 45 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_foundry ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/prof/environment/pcf_drinks.rb', line 33 def cloud_foundry @cloud_foundry ||= Prof::CloudFoundry.new( domain: cloud_foundry_domain, username: ops_manager.cf_admin_credentials.username, password: ops_manager.cf_admin_credentials.password ) end |
#cloud_foundry_domain ⇒ Object
41 42 43 |
# File 'lib/prof/environment/pcf_drinks.rb', line 41 def cloud_foundry_domain tempest_config.fetch('cloudfoundry').fetch('domain') end |
#cloud_foundry_uaa ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/prof/environment/pcf_drinks.rb', line 62 def cloud_foundry_uaa @cloud_foundry_uaa ||= UAAClient.new( cloud_foundry_domain, cloud_controller_client_credentials.identity, cloud_controller_client_credentials.password ) end |
#ops_manager ⇒ Object
29 30 31 |
# File 'lib/prof/environment/pcf_drinks.rb', line 29 def ops_manager @ops_manager ||= OpsManager.new(environment_name: ENV.fetch('TEMPEST_ENVIRONMENT'), version: ENV.fetch('OM_VERSION')) end |
#ssh_gateway ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/prof/environment/pcf_drinks.rb', line 53 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 |