Module: Kitchen::Driver::Oci::Instance::DbHomeDetails

Included in:
DbaasLaunchDetails
Defined in:
lib/kitchen/driver/oci/instance/db_home.rb

Overview

Setter methods that populate the details of OCI::Database::Models::CreateDbHomeDetails.

Author:

  • Justin Steele <justin.steele@oracle.com>

Instance Method Summary collapse

Instance Method Details

#databaseObject

Adds the database property to the db_home_details.



28
29
30
# File 'lib/kitchen/driver/oci/instance/db_home.rb', line 28

def database
  db_home_details.database = database_details
end

#db_home_defined_tagsObject

Adds the defined_tags to the db_home_details.



53
54
55
# File 'lib/kitchen/driver/oci/instance/db_home.rb', line 53

def db_home_defined_tags
  db_home_details.defined_tags = config[:defined_tags]
end

#db_home_display_nameObject

Adds the display_name property to db_home_details.



41
42
43
# File 'lib/kitchen/driver/oci/instance/db_home.rb', line 41

def db_home_display_name
  db_home_details.display_name = ["dbhome", random_number(10)].compact.join
end

#db_home_software_imageObject

Adds the database_software_image_id to the db_home_details.



46
47
48
49
50
# File 'lib/kitchen/driver/oci/instance/db_home.rb', line 46

def db_home_software_image
  return unless config[:dbaas][:db_software_image_id]

  db_home_details.database_software_image_id = config[:dbaas][:db_software_image_id]
end

#db_versionObject

Adds the db_version property to the db_home_details.

Raises:

  • (StandardError)

    if a version has not been provided.



34
35
36
37
38
# File 'lib/kitchen/driver/oci/instance/db_home.rb', line 34

def db_version
  raise "db_version cannot be nil!" if config[:dbaas][:db_version].nil?

  db_home_details.db_version = config[:dbaas][:db_version]
end