Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce OracleDatabase ExaData Infrastructure Resource & Data #27177

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

eelhomsi
Copy link

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

PRE-REVIEW - PLEASE DO NOT MERGE

Introduce OracleDatabase ExaData Infrastructure Resource & Data
Most relevant changes in:
internal/services/oracledatabase/

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

ExadataInfraDataSource test:
Screenshot 2024-08-09 at 11 18 53

ExadataInfraResource tests:
Screenshot 2024-08-09 at 11 10 32

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • FEATURES - Introduced new ExadataInfraDataSource and ExadataInfraResource

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@eelhomsi eelhomsi changed the title [DONOTMERGE] Introduce OracleDatabase ExaData Infrastructure Resource & Data Introduce OracleDatabase ExaData Infrastructure Resource & Data Sep 24, 2024
// WebsiteCategories returns a list of categories which can be used for the sidebar
func (r Registration) WebsiteCategories() []string {
return []string{
"App Service",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!


// Name is the name of this Service
func (r Registration) Name() string {
return "App Service"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here?

Comment on lines 315 to 328
var output ExadataInfraResourceModel

output.CustomerContacts = FlattenCustomerContacts(result.Model.Properties.CustomerContacts)
output.Name = pointer.ToString(result.Model.Name)
output.Location = result.Model.Location
output.Zones = result.Model.Zones
output.ResourceGroupName = id.ResourceGroupName
output.Tags = utils.FlattenPtrMapStringString(result.Model.Tags)
prop := result.Model.Properties
output.ComputeCount = pointer.From(prop.ComputeCount)
output.DisplayName = prop.DisplayName
output.StorageCount = pointer.From(prop.StorageCount)
output.Shape = prop.Shape
output.MaintenanceWindow = FlattenMaintenanceWindow(prop.MaintenanceWindow)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor issue but to match other resources we should inline this/do an assingment

output := ExadataInfraResourceModel {
CustomerContacts: FlattenCustomerContacts(result.Model.Properties.CustomerContacts)
Name: pointer.ToString(result.Model.Name)
...

and such vs going outout.x

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, I've updated the code.

Optional: true,
Computed: true,
Elem: &pluginsdk.Schema{
Type: pluginsdk.TypeInt,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be validated between 1-5?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally we want 1-4, I've updated to validate that, thank you.

"preference": {
Type: pluginsdk.TypeString,
Optional: true,
Computed: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be validated?

Optional: true,
Computed: true,
Elem: &pluginsdk.Schema{
Type: pluginsdk.TypeString,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here?

please validate all properties

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment on lines 497 to 502
output.Name = id.CloudExadataInfrastructureName
output.ResourceGroupName = id.ResourceGroupName
output.Type = pointer.From(model.Type)
output.Tags = utils.FlattenPtrMapStringString(model.Tags)
output.Location = model.Location
output.Zones = model.Zones
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these seperate and not included above?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved them up with the test.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this now looks good provided CI passes, please show confirmation of passing tests and we can get this merged

@eelhomsi
Copy link
Author

eelhomsi commented Oct 4, 2024

I think this now looks good provided CI passes, please show confirmation of passing tests and we can get this merged

I've added testing evidence here:
Screenshot 2024-10-04 at 01 08 57
Screenshot 2024-10-04 at 01 01 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants