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

tags: Support tagging in datastore resources #176

Merged
merged 2 commits into from
Sep 25, 2017
Merged

Conversation

vancluever
Copy link
Contributor

This update supports tagging in the vsphere_nas_datastore and
vsphere_vmfs_datastore resources. Using the same workflows applied to
the virtual machine resource.

In addition to the tests supplied for the datastore resources, I've
re-enabled the import test for vsphere_vmfs_datastore now that we have
ImportStateIdFunc to help generate the ID.

@vancluever vancluever added the enhancement Type: Enhancement label Sep 24, 2017
This update supports tagging in the vsphere_nas_datastore and
vsphere_vmfs_datastore resources. Using the same workflows applied to
the virtual machine resource.

In addition to the tests supplied for the datastore resources, I've
re-enabled the import test for vsphere_vmfs_datastore now that we have
ImportStateIdFunc to help generate the ID.
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Two minor things but looks good!

@@ -113,11 +131,26 @@ func resourceVSphereNasDatastoreRead(d *schema.ResourceData, meta interface{}) e
return err
}

// Read tags if we have the ability to do so
if tagsClient, _ := meta.(*VSphereClient).TagsClient(); tagsClient != nil {
if err := readTagsForResoruce(tagsClient, ds, d); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Minor typo

@@ -197,11 +216,26 @@ func resourceVSphereVmfsDatastoreRead(d *schema.ResourceData, meta interface{})
return err
}

// Read tags if we have the ability to do so
if tagsClient, _ := meta.(*VSphereClient).TagsClient(); tagsClient != nil {
if err := readTagsForResoruce(tagsClient, ds, d); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Misspelling here too

@vancluever
Copy link
Contributor Author

Thanks @mbfrahry! Merging now

@vancluever vancluever merged commit 90a69b9 into master Sep 25, 2017
@vancluever vancluever deleted the f-tag-datastores branch September 25, 2017 22:25
@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants