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

feat: add vrack data source #854

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mantasak
Copy link

@mantasak mantasak commented Feb 21, 2025

Description

Adding single vRack retrieval data source support

There is currently no raised issue that needs this functionality, however I have noticed it is missing and I need it for a project.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Simple unit test like implemented for VPS retrieval.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran succesfully go mod vendor if I added or modify go.mod file

@mantasak mantasak requested a review from a team as a code owner February 21, 2025 11:49
Copy link
Contributor

@amstuta amstuta left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @mantasak !

Apart from the comments I left, can you also add a documentation page in website/docs/d/ ?

err := config.OVHClient.Get(
fmt.Sprintf(
"/vrack/%s",
serviceName,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
serviceName,
url.PathEscape(serviceName),

})
}

const testAccVrackDatasourceConfig_Basic = `
Copy link
Contributor

Choose a reason for hiding this comment

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

could you move this definition in the test func itself to avoid the global variable ?

@@ -396,6 +396,11 @@ func testAccPreCheckOkmsCredential(t *testing.T) {
checkEnvOrSkip(t, "OVH_OKMS_CREDENTIAL")
}

func testAccPreCheckVrack(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can be removed, there is already the testAccPreCheckVRack func that does the same thing

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

Successfully merging this pull request may close these issues.

3 participants