Skip to content

Commit d374a74

Browse files
committed
Add support for Handling the VM (hypervisor) reboots info shared with the customer
1 parent 16d8cea commit d374a74

18 files changed

+111
-28
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.67.0 (March 18, 2020)
2+
3+
### Added
4+
- Support for Handling the VM (hypervisor) reboots info shared with the customer
5+
16
## 3.66.0 (March 11, 2020)
27

38
### Added

oci/database_db_node_data_source.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ func DatabaseDbNodeDataSource() *schema.Resource {
1818
Required: true,
1919
},
2020
// Computed
21+
"additional_details": {
22+
Type: schema.TypeString,
23+
Computed: true,
24+
},
2125
"backup_vnic_id": {
2226
Type: schema.TypeString,
2327
Computed: true,
@@ -34,6 +38,10 @@ func DatabaseDbNodeDataSource() *schema.Resource {
3438
Type: schema.TypeString,
3539
Computed: true,
3640
},
41+
"maintenance_type": {
42+
Type: schema.TypeString,
43+
Computed: true,
44+
},
3745
"software_storage_size_in_gb": {
3846
Type: schema.TypeInt,
3947
Computed: true,
@@ -46,6 +54,14 @@ func DatabaseDbNodeDataSource() *schema.Resource {
4654
Type: schema.TypeString,
4755
Computed: true,
4856
},
57+
"time_maintenance_window_end": {
58+
Type: schema.TypeString,
59+
Computed: true,
60+
},
61+
"time_maintenance_window_start": {
62+
Type: schema.TypeString,
63+
Computed: true,
64+
},
4965
"vnic_id": {
5066
Type: schema.TypeString,
5167
Computed: true,
@@ -98,6 +114,10 @@ func (s *DatabaseDbNodeDataSourceCrud) SetData() error {
98114

99115
s.D.SetId(*s.Res.Id)
100116

117+
if s.Res.AdditionalDetails != nil {
118+
s.D.Set("additional_details", *s.Res.AdditionalDetails)
119+
}
120+
101121
if s.Res.BackupVnicId != nil {
102122
s.D.Set("backup_vnic_id", *s.Res.BackupVnicId)
103123
}
@@ -114,6 +134,8 @@ func (s *DatabaseDbNodeDataSourceCrud) SetData() error {
114134
s.D.Set("hostname", *s.Res.Hostname)
115135
}
116136

137+
s.D.Set("maintenance_type", s.Res.MaintenanceType)
138+
117139
if s.Res.SoftwareStorageSizeInGB != nil {
118140
s.D.Set("software_storage_size_in_gb", *s.Res.SoftwareStorageSizeInGB)
119141
}
@@ -124,6 +146,14 @@ func (s *DatabaseDbNodeDataSourceCrud) SetData() error {
124146
s.D.Set("time_created", s.Res.TimeCreated.String())
125147
}
126148

149+
if s.Res.TimeMaintenanceWindowEnd != nil {
150+
s.D.Set("time_maintenance_window_end", s.Res.TimeMaintenanceWindowEnd.String())
151+
}
152+
153+
if s.Res.TimeMaintenanceWindowStart != nil {
154+
s.D.Set("time_maintenance_window_start", s.Res.TimeMaintenanceWindowStart.String())
155+
}
156+
127157
if s.Res.VnicId != nil {
128158
s.D.Set("vnic_id", *s.Res.VnicId)
129159
}

oci/database_db_nodes_data_source.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ func (s *DatabaseDbNodesDataSourceCrud) SetData() error {
115115
"db_system_id": *r.DbSystemId,
116116
}
117117

118+
if r.AdditionalDetails != nil {
119+
dbNode["additional_details"] = *r.AdditionalDetails
120+
}
121+
118122
if r.BackupVnicId != nil {
119123
dbNode["backup_vnic_id"] = *r.BackupVnicId
120124
}
@@ -132,6 +136,8 @@ func (s *DatabaseDbNodesDataSourceCrud) SetData() error {
132136
dbNode["db_node_id"] = *r.Id // maintain legacy vanity id
133137
}
134138

139+
dbNode["maintenance_type"] = r.MaintenanceType
140+
135141
if r.SoftwareStorageSizeInGB != nil {
136142
dbNode["software_storage_size_in_gb"] = *r.SoftwareStorageSizeInGB
137143
}
@@ -142,6 +148,14 @@ func (s *DatabaseDbNodesDataSourceCrud) SetData() error {
142148
dbNode["time_created"] = r.TimeCreated.String()
143149
}
144150

151+
if r.TimeMaintenanceWindowEnd != nil {
152+
dbNode["time_maintenance_window_end"] = r.TimeMaintenanceWindowEnd.String()
153+
}
154+
155+
if r.TimeMaintenanceWindowStart != nil {
156+
dbNode["time_maintenance_window_start"] = r.TimeMaintenanceWindowStart.String()
157+
}
158+
145159
if r.VnicId != nil {
146160
dbNode["vnic_id"] = *r.VnicId
147161
}

website/docs/d/database_autonomous_database.html.markdown

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ The following attributes are exported:
5050
* `data_storage_size_in_tbs` - The quantity of data in the database, in terabytes.
5151
* `db_name` - The database name.
5252
* `db_version` - A valid Oracle Database version for Autonomous Database.
53-
* `db_workload` - The Autonomous Database workload type. OLTP indicates an Autonomous Transaction Processing database and DW indicates an Autonomous Data Warehouse database.
53+
* `db_workload` - The Autonomous Database workload type. The following values are valid:
54+
* OLTP - indicates an Autonomous Transaction Processing database
55+
* DW - indicates an Autonomous Data Warehouse database
5456
* `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).
5557
* `display_name` - The user-friendly name for the Autonomous Database. The name does not have to be unique.
5658
* `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"}`
@@ -61,7 +63,8 @@ The following attributes are exported:
6163
* `is_preview` - Indicates if the Autonomous Database version is a preview version.
6264
* `license_model` - The Oracle license model that applies to the Oracle Autonomous Database. Note that when provisioning an Autonomous Database on [dedicated Exadata infrastructure](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/adbddoverview.htm), this attribute must be null because the attribute is already set at the Autonomous Exadata Infrastructure level. When using [shared Exadata infrastructure](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/adboverview.htm#AEI), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`.
6365
* `lifecycle_details` - Information about the current lifecycle state.
64-
* `nsg_ids` - A list of the [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm).
66+
* `nsg_ids` - A list of the [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this resource belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). **NsgIds restrictions:**
67+
* Autonomous Databases with private access require at least 1 Network Security Group (NSG). The nsgIds array cannot be empty.
6568
* `private_endpoint` - The private endpoint for the resource.
6669
* `private_endpoint_label` - The private endpoint label for the resource.
6770
* `service_console_url` - The URL of the Service Console for the Autonomous Database.

website/docs/d/database_autonomous_databases.html.markdown

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ The following attributes are exported:
7070
* `data_storage_size_in_tbs` - The quantity of data in the database, in terabytes.
7171
* `db_name` - The database name.
7272
* `db_version` - A valid Oracle Database version for Autonomous Database.
73-
* `db_workload` - The Autonomous Database workload type. OLTP indicates an Autonomous Transaction Processing database and DW indicates an Autonomous Data Warehouse database.
73+
* `db_workload` - The Autonomous Database workload type. The following values are valid:
74+
* OLTP - indicates an Autonomous Transaction Processing database
75+
* DW - indicates an Autonomous Data Warehouse database
7476
* `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).
7577
* `display_name` - The user-friendly name for the Autonomous Database. The name does not have to be unique.
7678
* `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"}`
@@ -81,7 +83,8 @@ The following attributes are exported:
8183
* `is_preview` - Indicates if the Autonomous Database version is a preview version.
8284
* `license_model` - The Oracle license model that applies to the Oracle Autonomous Database. Note that when provisioning an Autonomous Database on [dedicated Exadata infrastructure](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/adbddoverview.htm), this attribute must be null because the attribute is already set at the Autonomous Exadata Infrastructure level. When using [shared Exadata infrastructure](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/adboverview.htm#AEI), if a value is not specified, the system will supply the value of `BRING_YOUR_OWN_LICENSE`.
8385
* `lifecycle_details` - Information about the current lifecycle state.
84-
* `nsg_ids` - A list of the [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm).
86+
* `nsg_ids` - A list of the [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this resource belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). **NsgIds restrictions:**
87+
* Autonomous Databases with private access require at least 1 Network Security Group (NSG). The nsgIds array cannot be empty.
8588
* `private_endpoint` - The private endpoint for the resource.
8689
* `private_endpoint_label` - The private endpoint label for the resource.
8790
* `service_console_url` - The URL of the Service Console for the Autonomous Database.

website/docs/d/database_autonomous_db_preview_versions.html.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ The following attributes are exported:
4040

4141
The following attributes are exported:
4242

43-
* `db_workload` - The Autonomous Database workload type. OLTP indicates an Autonomous Transaction Processing database and DW indicates an Autonomous Data Warehouse database.
43+
* `db_workload` - The Autonomous Database workload type. The following values are valid:
44+
* OLTP - indicates an Autonomous Transaction Processing database
45+
* DW - indicates an Autonomous Data Warehouse database
4446
* `details` - A URL that points to a detailed description of the preview version.
4547
* `time_preview_begin` - The date and time when the preview version availability begins.
4648
* `time_preview_end` - The date and time when the preview version availability ends.

website/docs/d/database_autonomous_db_versions.html.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ The following attributes are exported:
4242

4343
The following attributes are exported:
4444

45-
* `db_workload` - The Autonomous Database workload type. OLTP indicates an Autonomous Transaction Processing database and DW indicates an Autonomous Data Warehouse database.
45+
* `db_workload` - The Autonomous Database workload type. The following values are valid:
46+
* OLTP - indicates an Autonomous Transaction Processing database
47+
* DW - indicates an Autonomous Data Warehouse database
4648
* `details` - A URL that points to a detailed description of the Autonomous Database version.
4749
* `is_dedicated` - True if the database uses [dedicated Exadata infrastructure](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/adbddoverview.htm).
4850
* `version` - A valid Oracle Database version for Autonomous Database.

website/docs/d/database_autonomous_exadata_infrastructure.html.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ The following attributes are exported:
5353
* `preference` - The maintenance window scheduling preference.
5454
* `weeks_of_month` - Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed.
5555
* `next_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
56-
* `nsg_ids` - A list of the [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm).
56+
* `nsg_ids` - A list of the [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this resource belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). **NsgIds restrictions:**
57+
* Autonomous Databases with private access require at least 1 Network Security Group (NSG). The nsgIds array cannot be empty.
5758
* `shape` - The shape of the Autonomous Exadata Infrastructure. The shape determines resources to allocate to the Autonomous Exadata Infrastructure (CPU cores, memory and storage).
5859
* `state` - The current lifecycle state of the Autonomous Exadata Infrastructure.
5960
* `subnet_id` - The OCID of the subnet the Autonomous Exadata Infrastructure is associated with.

website/docs/d/database_autonomous_exadata_infrastructures.html.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ The following attributes are exported:
6868
* `preference` - The maintenance window scheduling preference.
6969
* `weeks_of_month` - Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed.
7070
* `next_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
71-
* `nsg_ids` - A list of the [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm).
71+
* `nsg_ids` - A list of the [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that this resource belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). **NsgIds restrictions:**
72+
* Autonomous Databases with private access require at least 1 Network Security Group (NSG). The nsgIds array cannot be empty.
7273
* `shape` - The shape of the Autonomous Exadata Infrastructure. The shape determines resources to allocate to the Autonomous Exadata Infrastructure (CPU cores, memory and storage).
7374
* `state` - The current lifecycle state of the Autonomous Exadata Infrastructure.
7475
* `subnet_id` - The OCID of the subnet the Autonomous Exadata Infrastructure is associated with.

website/docs/d/database_db_node.html.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@ The following arguments are supported:
3232

3333
The following attributes are exported:
3434

35+
* `additional_details` - Additional information like a message to customer about the maintenance.
3536
* `backup_vnic_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the backup VNIC.
3637
* `db_system_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the DB system.
3738
* `fault_domain` - The name of the Fault Domain the instance is contained in.
3839
* `hostname` - The host name for the database node.
3940
* `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database node.
41+
* `maintenance_type` - The type of maintenance of dbNode.
4042
* `software_storage_size_in_gb` - The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.
4143
* `state` - The current state of the database node.
4244
* `time_created` - The date and time that the database node was created.
45+
* `time_maintenance_window_end` - End date and time of maintenance window.
46+
* `time_maintenance_window_start` - Start date and time of maintenance window.
4347
* `vnic_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC.
4448

0 commit comments

Comments
 (0)