-
Notifications
You must be signed in to change notification settings - Fork 35
add tags in resources vpc, instance, ipadress, template and vpc #16
add tags in resources vpc, instance, ipadress, template and vpc #16
Conversation
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.
I have a few small comments, but looks good overall.
Guess you didn't test this with all resource you changed right (as the disk resource doesn't seem to have tags in it's schema now)? Without it being properly tested I cannot merge this PR. So please test all resources your changed.
Additionally I will see if I can run the acceptance tests once you have updated and tested. Thanks!
// Put tags if necessary | ||
err = setTags(cs, d, "Volume") | ||
if err != nil { | ||
return fmt.Errorf("Error setting tags on the new instance %s: %s", name, err) |
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.
Should be on the new disk
I guess
// Update tags if they have changed | ||
err := updateTags(cs, d, "Volume") | ||
if err != nil { | ||
return fmt.Errorf("Error setting tags on the disk %s: %s", name, err) |
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.
Should be Error updating tags
// Update tags if they have changed | ||
err := updateTags(cs, d, "userVm") | ||
if err != nil { | ||
return fmt.Errorf("Error setting tags on the instance %s: %s", name, err) |
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.
Should be Error updating tags
@@ -116,6 +116,13 @@ func resourceCloudStackDiskCreate(d *schema.ResourceData, meta interface{}) erro | |||
|
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.
I think you forgot to add "tags": tagsSchema()
to the disk schema?
Thank you @svanharmelen for the review and sorry for the long delay. |
Thanks @ArthurHlt! LGTM! |
User could tags only network, I've added tags parameter to more cloudstack resource.
Actually we can tags everything except security group but api docs about tags ask for
resourceType
and their is no simple way to know what can be this values.I've found some of them and added the tags parameter.
There is a refactoring to test tags in resource.
Finally, I couldn't run acceptance tests only because I'm not sure what should inside env vars and how it could affect my cloudstack.
Maybe just some comments could help