-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Adding File Resource for vSphere provider #6401
Conversation
return &schema.Resource{ | ||
Create: resourceVSphereFileCreate, | ||
Read: resourceVSphereFileRead, | ||
Update: resourceVSphereFileUpdate, |
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.
As all pieces of the schema are ForceNew: true
will this ever be called?
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.
hello @stack72 it will be called when "destination_file" is changed. ForceNew: false is false for that one
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.
got it - in that case you can exclude ForceNew: false
from that parameter - that is the default :)
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.
ok, will remove it
Allows for file upload to vSphere at specified location. This also includes update for moving or renaming of file resources.
@stack72 updated |
log.Printf("[DEBUG] creating file: %#v", d) | ||
client := meta.(*govmomi.Client) | ||
|
||
f := file{ |
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.
What will happen if any of these are omitted? Will vsphere handle empty/null values?
I think this will need to be handled in the same way as datacenter
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.
that's right these are mandatory, will update to error out if they are not provided.
@dagnello apologies for not picking this last point up. Once fixed I believe we are good to merge |
@stack72 np, just updated! |
This LGTM! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Allows for file upload to vSphere at specified location. This also
includes update for moving or renaming of file resources (in vSphere).
Ref issue #6366.