Class: Opsmgr::Cmd::IaasGateway
- Inherits:
-
Object
- Object
- Opsmgr::Cmd::IaasGateway
- Defined in:
- lib/opsmgr/cmd/bosh_command.rb
Instance Method Summary collapse
- #gateway(&block) ⇒ Object
-
#initialize(bosh_command:, environment_name:, logger:) ⇒ IaasGateway
constructor
A new instance of IaasGateway.
Constructor Details
#initialize(bosh_command:, environment_name:, logger:) ⇒ IaasGateway
Returns a new instance of IaasGateway.
145 146 147 148 149 |
# File 'lib/opsmgr/cmd/bosh_command.rb', line 145 def initialize(bosh_command:, environment_name:, logger:) @bosh_command = bosh_command @environment = Opsmgr::Environments.for(environment_name) @logger = logger end |
Instance Method Details
#gateway(&block) ⇒ Object
151 152 153 154 155 156 157 158 159 160 |
# File 'lib/opsmgr/cmd/bosh_command.rb', line 151 def gateway(&block) case environment.settings.iaas_type when 'vsphere' block.call when 'aws', 'openstack' ssh_key_gateway(block) when 'vcloud' ssh_password_gateway(block) end end |