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

Add storage_profile_id to vcd_catalog and introduce datasource vcd_storage_profile #602

Merged
merged 17 commits into from
Dec 9, 2020

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Dec 1, 2020

Fixes #598 ,
This PR adds storage_profile_id attribute to vcd_catalog resource and datasource (for create and update)
Additionally it introduces vcd_storage_profile datasource for storage profile ID lookup.

It also allows to change description field for vcd_catalog

Note. Acceptance tests passed on at least one version (also VCD_TEST_ORG_USER=1 go test -timeout 30m -v -tags "org catalog")

@Didainius Didainius self-assigned this Dec 2, 2020
@Didainius Didainius marked this pull request as ready for review December 2, 2020 10:24
Copy link
Collaborator

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

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

LGTM

@Didainius Didainius removed the request for review from vbauzys December 8, 2020 09:41
if storageProfileId != "" {
storageProfileReference, err := adminOrg.GetStorageProfileReferenceById(storageProfileId, false)
if err != nil {
return fmt.Errorf("couuld not proces storage profile '%s': %s", storageProfileId, err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return fmt.Errorf("couuld not proces storage profile '%s': %s", storageProfileId, err)
return fmt.Errorf("could not process Storage Profile '%s': %s", storageProfileId, err)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

website/docs/d/storage_profile.html.markdown Outdated Show resolved Hide resolved
vcd/resource_vcd_catalog.go Show resolved Hide resolved
.changes/v3.1.0/602-improvements.md Outdated Show resolved Hide resolved
vcd/datasource_vcd_storage_profile_test.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_storage_profile.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

LGTM now, thanks!

@Didainius Didainius merged commit 59e79ea into vmware:master Dec 9, 2020
@Didainius Didainius deleted the catalog_storage_profiles2 branch December 9, 2020 10:46
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.

resource vcd_catalog should support picking storage policies
4 participants