Class: Kitchen::Driver::Oci::Instance
- Inherits:
-
Kitchen::Driver::Oci
- Object
- Base
- Kitchen::Driver::Oci
- Kitchen::Driver::Oci::Instance
- Includes:
- CommonLaunchDetails
- Defined in:
- lib/kitchen/driver/oci/instance.rb,
lib/kitchen/driver/oci/instance/dbaas.rb,
lib/kitchen/driver/oci/instance/common.rb,
lib/kitchen/driver/oci/instance/compute.rb,
lib/kitchen/driver/oci/instance/db_home.rb,
lib/kitchen/driver/oci/instance/database.rb
Overview
generic class for instance models
Direct Known Subclasses
Defined Under Namespace
Modules: CommonLaunchDetails, ComputeLaunchDetails, DatabaseDetails, DbHomeDetails, DbaasLaunchDetails
Instance Attribute Summary collapse
-
#api ⇒ Kitchen::Driver::Oci::Api
The API object that contains each of the authenticated clients for interfacing with OCI.
-
#config ⇒ Kitchen::LazyHash
The config provided by the driver.
-
#oci ⇒ Kitchen::Driver::Oci::Config
The config object that contains properties of the authentication to OCI.
-
#state ⇒ Hash
The definition of the state of the instance from the statefile.
Instance Method Summary collapse
- #final_state(state, instance_id) ⇒ Object
-
#initialize(config, state, oci, api, action) ⇒ Instance
constructor
A new instance of Instance.
Methods included from CommonLaunchDetails
#availability_domain, #compartment_id, #defined_tags, #freeform_tags, #shape
Methods inherited from Kitchen::Driver::Oci
#create, #destroy, validation_error
Methods included from Models
#instance_class, #volume_class
Constructor Details
#initialize(config, state, oci, api, action) ⇒ Instance
Returns a new instance of Instance.
33 34 35 36 37 38 39 |
# File 'lib/kitchen/driver/oci/instance.rb', line 33 def initialize(config, state, oci, api, action) super() @config = config @state = state @oci = oci @api = api end |
Instance Attribute Details
#api ⇒ Kitchen::Driver::Oci::Api
The API object that contains each of the authenticated clients for interfacing with OCI
67 68 69 |
# File 'lib/kitchen/driver/oci/instance.rb', line 67 def api @api end |
#config ⇒ Kitchen::LazyHash
The config provided by the driver
46 47 48 |
# File 'lib/kitchen/driver/oci/instance.rb', line 46 def config @config end |
#oci ⇒ Kitchen::Driver::Oci::Config
The config object that contains properties of the authentication to OCI
60 61 62 |
# File 'lib/kitchen/driver/oci/instance.rb', line 60 def oci @oci end |
#state ⇒ Hash
The definition of the state of the instance from the statefile
53 54 55 |
# File 'lib/kitchen/driver/oci/instance.rb', line 53 def state @state end |
Instance Method Details
#final_state(state, instance_id) ⇒ Object
69 70 71 72 73 |
# File 'lib/kitchen/driver/oci/instance.rb', line 69 def final_state(state, instance_id) state.store(:server_id, instance_id) state.store(:hostname, instance_ip(instance_id)) state end |