Module: Kitchen::Driver::Oci::Instance::DatabaseDetails
- Included in:
- DbaasLaunchDetails
- Defined in:
- lib/kitchen/driver/oci/instance/database.rb
Overview
Setter methods that populate the details of OCI::Database::Models::CreateDatabaseDetails.
Instance Method Summary collapse
-
#admin_password ⇒ Object
Adds the admin_password property to the database details.
-
#character_set ⇒ Object
Adds the character_set property to the database_details.
-
#database_software_image ⇒ Object
Adds the database_software_image_id property to the database_details if provided.
-
#db_backup_config ⇒ Object
Adds the db_backup_config property to the database_details by creating a new instance of OCI::Database::Models::DbBackupConfig.
-
#db_defined_tags ⇒ Object
Adds the defined tags property to the database_details.
-
#db_name ⇒ Object
Adds the db_name property to the database_details.
-
#db_workload ⇒ Object
Adds the db_workload property to the database details.
-
#ncharacter_set ⇒ Object
Adds the ncharacter_set property to the database_details.
-
#pdb_name ⇒ Object
Adds the pdb_name property to the database_details.
Instance Method Details
#admin_password ⇒ Object
Adds the admin_password property to the database details.
51 52 53 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 51 def admin_password database_details.admin_password = config[:dbaas][:admin_password] ||= random_password(%w{# _ -}) end |
#character_set ⇒ Object
Adds the character_set property to the database_details.
35 36 37 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 35 def character_set database_details.character_set = config[:dbaas][:character_set] ||= "AL32UTF8" end |
#database_software_image ⇒ Object
Adds the database_software_image_id property to the database_details if provided.
28 29 30 31 32 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 28 def database_software_image return unless config[:dbaas][:db_software_image_id] database_details.database_software_image_id = config[:dbaas][:db_software_image_id] end |
#db_backup_config ⇒ Object
Adds the db_backup_config property to the database_details by creating a new instance of OCI::Database::Models::DbBackupConfig.
66 67 68 69 70 71 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 66 def db_backup_config database_details.db_backup_config = OCI::Database::Models::DbBackupConfig.new.tap do |l| l.auto_backup_enabled = false end database_details end |
#db_defined_tags ⇒ Object
Adds the defined tags property to the database_details.
74 75 76 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 74 def database_details. = config[:defined_tags] end |
#db_name ⇒ Object
Adds the db_name property to the database_details.
56 57 58 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 56 def db_name database_details.db_name = config[:dbaas][:db_name] ||= "dbaas1" end |
#db_workload ⇒ Object
Adds the db_workload property to the database details.
45 46 47 48 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 45 def db_workload workload = config[:dbaas][:db_workload] ||= OCI::Database::Models::CreateDatabaseDetails::DB_WORKLOAD_OLTP database_details.db_workload = workload end |
#ncharacter_set ⇒ Object
Adds the ncharacter_set property to the database_details.
40 41 42 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 40 def ncharacter_set database_details.ncharacter_set = config[:dbaas][:ncharacter_set] ||= "AL16UTF16" end |
#pdb_name ⇒ Object
Adds the pdb_name property to the database_details.
61 62 63 |
# File 'lib/kitchen/driver/oci/instance/database.rb', line 61 def pdb_name database_details.pdb_name = config[:dbaas][:pdb_name] end |