Skip to content

Commit 8eaee33

Browse files
Vivi Kongsagarp337
authored andcommitted
Added - Support for ExaCS | Infrastructure patching v2
1 parent c3e73d2 commit 8eaee33

7 files changed

+84
-0
lines changed

internal/integrationtest/database_cloud_exadata_infrastructure_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) {
289289
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.compartment_id", compartmentId),
290290
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.compute_count", "2"),
291291
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.customer_contacts.#", "1"),
292+
//resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.db_server_version"),
292293
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.customer_contacts.0.email", "[email protected]"),
293294
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.display_name", "displayName2"),
294295
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.freeform_tags.%", "1"),
@@ -306,10 +307,13 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) {
306307
//resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.maintenance_window.0.patching_mode", "NONROLLING"),
307308
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.maintenance_window.0.preference", "CUSTOM_PREFERENCE"),
308309
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.maintenance_window.0.weeks_of_month.#", "1"),
310+
//resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.monthly_db_server_version"),
311+
//resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.monthly_storage_server_version"),
309312
//resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.next_maintenance_run_id"), // null for fake resource
310313
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.shape", "Exadata.X8M"),
311314
resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.state"),
312315
resource.TestCheckResourceAttr(datasourceName, "cloud_exadata_infrastructures.0.storage_count", "3"),
316+
//resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.storage_server_version"),
313317
resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.time_created"),
314318
resource.TestCheckResourceAttrSet(datasourceName, "cloud_exadata_infrastructures.0.total_storage_size_in_gbs"),
315319
),
@@ -327,6 +331,7 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) {
327331
resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId),
328332
resource.TestCheckResourceAttr(singularDatasourceName, "compute_count", "2"),
329333
resource.TestCheckResourceAttr(singularDatasourceName, "customer_contacts.#", "1"),
334+
//resource.TestCheckResourceAttrSet(singularDatasourceName, "db_server_version"),
330335
resource.TestCheckResourceAttr(singularDatasourceName, "customer_contacts.0.email", "[email protected]"),
331336
resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"),
332337
resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"),
@@ -344,10 +349,13 @@ func TestDatabaseCloudExadataInfrastructureResource_basic(t *testing.T) {
344349
//resource.TestCheckResourceAttr(singularDatasourceName, "maintenance_window.0.patching_mode", "NONROLLING"),
345350
resource.TestCheckResourceAttr(singularDatasourceName, "maintenance_window.0.preference", "CUSTOM_PREFERENCE"),
346351
resource.TestCheckResourceAttr(singularDatasourceName, "maintenance_window.0.weeks_of_month.#", "1"),
352+
//resource.TestCheckResourceAttrSet(singularDatasourceName, "monthly_db_server_version"),
353+
//resource.TestCheckResourceAttrSet(singularDatasourceName, "monthly_storage_server_version"),
347354
//resource.TestCheckResourceAttrSet(singularDatasourceName, "next_maintenance_run_id"), // null for fake resource
348355
resource.TestCheckResourceAttr(singularDatasourceName, "shape", "Exadata.X8M"),
349356
resource.TestCheckResourceAttrSet(singularDatasourceName, "state"),
350357
resource.TestCheckResourceAttr(singularDatasourceName, "storage_count", "3"),
358+
//resource.TestCheckResourceAttrSet(singularDatasourceName, "storage_server_version"),
351359
resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"),
352360
resource.TestCheckResourceAttrSet(singularDatasourceName, "total_storage_size_in_gbs"),
353361
),

internal/service/database/database_cloud_exadata_infrastructure_data_source.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ func (s *DatabaseCloudExadataInfrastructureDataSourceCrud) SetData() error {
108108
s.D.Set("db_node_storage_size_in_gbs", *s.Res.DbNodeStorageSizeInGBs)
109109
}
110110

111+
if s.Res.DbServerVersion != nil {
112+
s.D.Set("db_server_version", *s.Res.DbServerVersion)
113+
}
114+
111115
if s.Res.DefinedTags != nil {
112116
s.D.Set("defined_tags", tfresource.DefinedTagsToMap(s.Res.DefinedTags))
113117
}
@@ -152,6 +156,14 @@ func (s *DatabaseCloudExadataInfrastructureDataSourceCrud) SetData() error {
152156
s.D.Set("memory_size_in_gbs", *s.Res.MemorySizeInGBs)
153157
}
154158

159+
if s.Res.MonthlyDbServerVersion != nil {
160+
s.D.Set("monthly_db_server_version", *s.Res.MonthlyDbServerVersion)
161+
}
162+
163+
if s.Res.MonthlyStorageServerVersion != nil {
164+
s.D.Set("monthly_storage_server_version", *s.Res.MonthlyStorageServerVersion)
165+
}
166+
155167
if s.Res.NextMaintenanceRunId != nil {
156168
s.D.Set("next_maintenance_run_id", *s.Res.NextMaintenanceRunId)
157169
}
@@ -166,6 +178,10 @@ func (s *DatabaseCloudExadataInfrastructureDataSourceCrud) SetData() error {
166178
s.D.Set("storage_count", *s.Res.StorageCount)
167179
}
168180

181+
if s.Res.StorageServerVersion != nil {
182+
s.D.Set("storage_server_version", *s.Res.StorageServerVersion)
183+
}
184+
169185
if s.Res.TimeCreated != nil {
170186
s.D.Set("time_created", s.Res.TimeCreated.String())
171187
}

internal/service/database/database_cloud_exadata_infrastructure_resource.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ func DatabaseCloudExadataInfrastructureResource() *schema.Resource {
224224
Type: schema.TypeInt,
225225
Computed: true,
226226
},
227+
"db_server_version": {
228+
Type: schema.TypeString,
229+
Computed: true,
230+
},
227231
"last_maintenance_run_id": {
228232
Type: schema.TypeString,
229233
Computed: true,
@@ -252,6 +256,14 @@ func DatabaseCloudExadataInfrastructureResource() *schema.Resource {
252256
Type: schema.TypeInt,
253257
Computed: true,
254258
},
259+
"monthly_db_server_version": {
260+
Type: schema.TypeString,
261+
Computed: true,
262+
},
263+
"monthly_storage_server_version": {
264+
Type: schema.TypeString,
265+
Computed: true,
266+
},
255267
"next_maintenance_run_id": {
256268
Type: schema.TypeString,
257269
Computed: true,
@@ -260,6 +272,10 @@ func DatabaseCloudExadataInfrastructureResource() *schema.Resource {
260272
Type: schema.TypeString,
261273
Computed: true,
262274
},
275+
"storage_server_version": {
276+
Type: schema.TypeString,
277+
Computed: true,
278+
},
263279
"time_created": {
264280
Type: schema.TypeString,
265281
Computed: true,
@@ -621,6 +637,10 @@ func (s *DatabaseCloudExadataInfrastructureResourceCrud) SetData() error {
621637
s.D.Set("db_node_storage_size_in_gbs", *s.Res.DbNodeStorageSizeInGBs)
622638
}
623639

640+
if s.Res.DbServerVersion != nil {
641+
s.D.Set("db_server_version", *s.Res.DbServerVersion)
642+
}
643+
624644
if s.Res.DefinedTags != nil {
625645
s.D.Set("defined_tags", tfresource.DefinedTagsToMap(s.Res.DefinedTags))
626646
}
@@ -665,6 +685,14 @@ func (s *DatabaseCloudExadataInfrastructureResourceCrud) SetData() error {
665685
s.D.Set("memory_size_in_gbs", *s.Res.MemorySizeInGBs)
666686
}
667687

688+
if s.Res.MonthlyDbServerVersion != nil {
689+
s.D.Set("monthly_db_server_version", *s.Res.MonthlyDbServerVersion)
690+
}
691+
692+
if s.Res.MonthlyStorageServerVersion != nil {
693+
s.D.Set("monthly_storage_server_version", *s.Res.MonthlyStorageServerVersion)
694+
}
695+
668696
if s.Res.NextMaintenanceRunId != nil {
669697
s.D.Set("next_maintenance_run_id", *s.Res.NextMaintenanceRunId)
670698
}
@@ -679,6 +707,10 @@ func (s *DatabaseCloudExadataInfrastructureResourceCrud) SetData() error {
679707
s.D.Set("storage_count", *s.Res.StorageCount)
680708
}
681709

710+
if s.Res.StorageServerVersion != nil {
711+
s.D.Set("storage_server_version", *s.Res.StorageServerVersion)
712+
}
713+
682714
if s.Res.TimeCreated != nil {
683715
s.D.Set("time_created", s.Res.TimeCreated.String())
684716
}

internal/service/database/database_cloud_exadata_infrastructures_data_source.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ func (s *DatabaseCloudExadataInfrastructuresDataSourceCrud) SetData() error {
148148
cloudExadataInfrastructure["db_node_storage_size_in_gbs"] = *r.DbNodeStorageSizeInGBs
149149
}
150150

151+
if r.DbServerVersion != nil {
152+
cloudExadataInfrastructure["db_server_version"] = *r.DbServerVersion
153+
}
154+
151155
if r.DefinedTags != nil {
152156
cloudExadataInfrastructure["defined_tags"] = tfresource.DefinedTagsToMap(r.DefinedTags)
153157
}
@@ -196,6 +200,14 @@ func (s *DatabaseCloudExadataInfrastructuresDataSourceCrud) SetData() error {
196200
cloudExadataInfrastructure["memory_size_in_gbs"] = *r.MemorySizeInGBs
197201
}
198202

203+
if r.MonthlyDbServerVersion != nil {
204+
cloudExadataInfrastructure["monthly_db_server_version"] = *r.MonthlyDbServerVersion
205+
}
206+
207+
if r.MonthlyStorageServerVersion != nil {
208+
cloudExadataInfrastructure["monthly_storage_server_version"] = *r.MonthlyStorageServerVersion
209+
}
210+
199211
if r.NextMaintenanceRunId != nil {
200212
cloudExadataInfrastructure["next_maintenance_run_id"] = *r.NextMaintenanceRunId
201213
}
@@ -210,6 +222,10 @@ func (s *DatabaseCloudExadataInfrastructuresDataSourceCrud) SetData() error {
210222
cloudExadataInfrastructure["storage_count"] = *r.StorageCount
211223
}
212224

225+
if r.StorageServerVersion != nil {
226+
cloudExadataInfrastructure["storage_server_version"] = *r.StorageServerVersion
227+
}
228+
213229
if r.TimeCreated != nil {
214230
cloudExadataInfrastructure["time_created"] = r.TimeCreated.String()
215231
}

website/docs/d/database_cloud_exadata_infrastructure.html.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The following attributes are exported:
4444
* `email` - The email address used by Oracle to send notifications regarding databases and infrastructure.
4545
* `data_storage_size_in_tbs` - Size, in terabytes, of the DATA disk group.
4646
* `db_node_storage_size_in_gbs` - The local node storage allocated in GBs.
47+
* `db_server_version` - The software version of the database servers (dom0) in the cloud Exadata infrastructure. Example: 20.1.15
4748
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
4849
* `display_name` - The user-friendly name for the cloud Exadata infrastructure resource. The name does not need to be unique.
4950
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
@@ -71,10 +72,13 @@ The following attributes are exported:
7172
* `max_db_node_storage_in_gbs` - The total local node storage available in GBs.
7273
* `max_memory_in_gbs` - The total memory available in GBs.
7374
* `memory_size_in_gbs` - The memory allocated in GBs.
75+
* `monthly_db_server_version` - The monthly software version of the database servers (dom0) in the cloud Exadata infrastructure. Example: 20.1.15
76+
* `monthly_storage_server_version` - The monthly software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15
7477
* `next_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
7578
* `shape` - The model name of the cloud Exadata infrastructure resource.
7679
* `state` - The current lifecycle state of the cloud Exadata infrastructure resource.
7780
* `storage_count` - The number of storage servers for the cloud Exadata infrastructure.
81+
* `storage_server_version` - The software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15
7882
* `time_created` - The date and time the cloud Exadata infrastructure resource was created.
7983
* `total_storage_size_in_gbs` - The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).
8084

website/docs/d/database_cloud_exadata_infrastructures.html.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ The following attributes are exported:
5656
* `email` - The email address used by Oracle to send notifications regarding databases and infrastructure.
5757
* `data_storage_size_in_tbs` - Size, in terabytes, of the DATA disk group.
5858
* `db_node_storage_size_in_gbs` - The local node storage allocated in GBs.
59+
* `db_server_version` - The software version of the database servers (dom0) in the cloud Exadata infrastructure. Example: 20.1.15
5960
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
6061
* `display_name` - The user-friendly name for the cloud Exadata infrastructure resource. The name does not need to be unique.
6162
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
@@ -83,10 +84,13 @@ The following attributes are exported:
8384
* `max_db_node_storage_in_gbs` - The total local node storage available in GBs.
8485
* `max_memory_in_gbs` - The total memory available in GBs.
8586
* `memory_size_in_gbs` - The memory allocated in GBs.
87+
* `monthly_db_server_version` - The monthly software version of the database servers (dom0) in the cloud Exadata infrastructure. Example: 20.1.15
88+
* `monthly_storage_server_version` - The monthly software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15
8689
* `next_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
8790
* `shape` - The model name of the cloud Exadata infrastructure resource.
8891
* `state` - The current lifecycle state of the cloud Exadata infrastructure resource.
8992
* `storage_count` - The number of storage servers for the cloud Exadata infrastructure.
93+
* `storage_server_version` - The software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15
9094
* `time_created` - The date and time the cloud Exadata infrastructure resource was created.
9195
* `total_storage_size_in_gbs` - The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).
9296

website/docs/r/database_cloud_exadata_infrastructure.html.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ The following attributes are exported:
106106
* `email` - The email address used by Oracle to send notifications regarding databases and infrastructure.
107107
* `data_storage_size_in_tbs` - Size, in terabytes, of the DATA disk group.
108108
* `db_node_storage_size_in_gbs` - The local node storage allocated in GBs.
109+
* `db_server_version` - The software version of the database servers (dom0) in the cloud Exadata infrastructure. Example: 20.1.15
109110
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
110111
* `display_name` - The user-friendly name for the cloud Exadata infrastructure resource. The name does not need to be unique.
111112
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
@@ -133,10 +134,13 @@ The following attributes are exported:
133134
* `max_db_node_storage_in_gbs` - The total local node storage available in GBs.
134135
* `max_memory_in_gbs` - The total memory available in GBs.
135136
* `memory_size_in_gbs` - The memory allocated in GBs.
137+
* `monthly_db_server_version` - The monthly software version of the database servers (dom0) in the cloud Exadata infrastructure. Example: 20.1.15
138+
* `monthly_storage_server_version` - The monthly software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15
136139
* `next_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
137140
* `shape` - The model name of the cloud Exadata infrastructure resource.
138141
* `state` - The current lifecycle state of the cloud Exadata infrastructure resource.
139142
* `storage_count` - The number of storage servers for the cloud Exadata infrastructure.
143+
* `storage_server_version` - The software version of the storage servers (cells) in the cloud Exadata infrastructure. Example: 20.1.15
140144
* `time_created` - The date and time the cloud Exadata infrastructure resource was created.
141145
* `total_storage_size_in_gbs` - The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).
142146

0 commit comments

Comments
 (0)