Class: Kitchen::Driver::Oci::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/driver/oci/api.rb

Overview

Api class that defines the various API classes used to interact with OCI

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(oci_config, config) ⇒ Api

Returns a new instance of Api.



25
26
27
28
# File 'lib/kitchen/driver/oci/api.rb', line 25

def initialize(oci_config, config)
  @oci_config = oci_config
  @config = config
end

Instance Attribute Details

#configKitchen::LazyHash (readonly)

The config provided by the driver

Returns:

  • (Kitchen::LazyHash)


42
43
44
# File 'lib/kitchen/driver/oci/api.rb', line 42

def config
  @config
end

#oci_configOCI::Config (readonly)

The config used to authenticate to OCI

Returns:

  • (OCI::Config)


35
36
37
# File 'lib/kitchen/driver/oci/api.rb', line 35

def oci_config
  @oci_config
end

Instance Method Details

#blockstorageObject



60
61
62
# File 'lib/kitchen/driver/oci/api.rb', line 60

def blockstorage
  generic_api(OCI::Core::BlockstorageClient)
end

#computeObject



44
45
46
# File 'lib/kitchen/driver/oci/api.rb', line 44

def compute
  generic_api(OCI::Core::ComputeClient)
end

#dbaasObject



52
53
54
# File 'lib/kitchen/driver/oci/api.rb', line 52

def dbaas
  generic_api(OCI::Database::DatabaseClient)
end

#identityObject



56
57
58
# File 'lib/kitchen/driver/oci/api.rb', line 56

def identity
  generic_api(OCI::Identity::IdentityClient)
end

#networkObject



48
49
50
# File 'lib/kitchen/driver/oci/api.rb', line 48

def network
  generic_api(OCI::Core::VirtualNetworkClient)
end