-
Notifications
You must be signed in to change notification settings - Fork 112
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 metadata support for Orgs and Disk resources/datasources #797
Add metadata support for Orgs and Disk resources/datasources #797
Conversation
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are the documentation additions for the new fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as @lvirbalas mentioned - I am missing documentation of these fields in docs.
Code looks and worked great, as I tested with tags org
and disk
as well as manually while observing statefile
. I am good to approve in general, just a few minor comments in code and I have an ask for tests - could add a few additional steps (for future insurance):
- Adding more than one
key
in the metadata block (I saw it is there for Org, but also could be for independent disk) - Where we have test with multiple steps, you could use the opportunity to set metadata in one step and remove it in the next (with additional check that it is not set after that). That way we could have coverage if we ever screw up metadata cleanup.
Signed-off-by: abarreiro <[email protected]>
Added documentation updates for disk and org resources, and org datasource. Disk datasource didn't need to be changed, as it only references the resource. |
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Added a new step to update metadata for Disks and Orgs. For Orgs I need to check further as I'm getting an error, so PR can't be merged as it's now. |
Ok. We can sync up on that or I'll be waiting for a heads up. |
Signed-off-by: abarreiro <[email protected]>
Fixed in the last commit. |
Signed-off-by: abarreiro <[email protected]>
I'm requesting a new review @Didainius @vbauzysvmware, as I merged code from main with #789 which was a quite big change. So far, disks tests pass, so it should be OK, but just in case you have new suggestions or things to improve. |
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now LGTM. Thank you
Signed-off-by: abarreiro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Approved!
@adambarreiro, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@adambarreiro, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
…ider-vcd into add-metadata-org-disk-vapptempl Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
ce9d788
to
5c5911e
Compare
Test pass, ready to merge once all conversations are solved. |
Signed-off-by: abarreiro [email protected]
Depends on: vmware/go-vcloud-director#438
Description
This PR adds support for metadata maps in the vcd_org and vcd_independent_disk resources&datasources.
Extra
Refactored datasource_vcd_independent_disk, resource_vcd_independent_disk, datasource_vcd_org, resource_vcd_org to not use deprecated schema.Resource fields for create/update/delete/import, now it uses CreateContext, UpdateContext, ReadContext, DeleteContext.
Also in the above three items, functions return the diag.Diagnostics struct instead of plain Go errors, to adjust their signature to the new CreateContext, UpdateContext, ReadContext, DeleteContext fields.