Class: Kitchen::Driver::Oci::Instance
- Inherits:
-
Kitchen::Driver::Oci
- Object
- Base
- Kitchen::Driver::Oci
- Kitchen::Driver::Oci::Instance
- Defined in:
- lib/kitchen/driver/oci/instance.rb
Overview
generic class for instance models
Direct Known Subclasses
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#config ⇒ Object
Returns the value of attribute config.
-
#oci ⇒ Object
Returns the value of attribute oci.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
- #availability_domain ⇒ Object
- #compartment_id ⇒ Object
- #defined_tags ⇒ Object
- #final_state(state, instance_id) ⇒ Object
- #freeform_tags ⇒ Object
-
#initialize(config, state, oci, api, action) ⇒ Instance
constructor
A new instance of Instance.
- #shape ⇒ Object
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.
32 33 34 35 36 37 38 |
# File 'lib/kitchen/driver/oci/instance.rb', line 32 def initialize(config, state, oci, api, action) super() @config = config @state = state @oci = oci @api = api end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
30 31 32 |
# File 'lib/kitchen/driver/oci/instance.rb', line 30 def api @api end |
#config ⇒ Object
Returns the value of attribute config.
30 31 32 |
# File 'lib/kitchen/driver/oci/instance.rb', line 30 def config @config end |
#oci ⇒ Object
Returns the value of attribute oci.
30 31 32 |
# File 'lib/kitchen/driver/oci/instance.rb', line 30 def oci @oci end |
#state ⇒ Object
Returns the value of attribute state.
30 31 32 |
# File 'lib/kitchen/driver/oci/instance.rb', line 30 def state @state end |
Instance Method Details
#availability_domain ⇒ Object
44 45 46 |
# File 'lib/kitchen/driver/oci/instance.rb', line 44 def availability_domain launch_details.availability_domain = config[:availability_domain] end |
#compartment_id ⇒ Object
40 41 42 |
# File 'lib/kitchen/driver/oci/instance.rb', line 40 def compartment_id launch_details.compartment_id = oci.compartment end |
#defined_tags ⇒ Object
48 49 50 |
# File 'lib/kitchen/driver/oci/instance.rb', line 48 def launch_details. = config[:defined_tags] end |
#final_state(state, instance_id) ⇒ Object
60 61 62 63 64 |
# File 'lib/kitchen/driver/oci/instance.rb', line 60 def final_state(state, instance_id) state.store(:server_id, instance_id) state.store(:hostname, instance_ip(instance_id)) state end |
#freeform_tags ⇒ Object
56 57 58 |
# File 'lib/kitchen/driver/oci/instance.rb', line 56 def launch_details. = end |
#shape ⇒ Object
52 53 54 |
# File 'lib/kitchen/driver/oci/instance.rb', line 52 def shape launch_details.shape = config[:shape] end |