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

Adding File Resource for vSphere provider #6401

Merged
merged 2 commits into from
May 2, 2016
Merged

Conversation

dagnello
Copy link
Contributor

@dagnello dagnello commented Apr 28, 2016

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.

return &schema.Resource{
Create: resourceVSphereFileCreate,
Read: resourceVSphereFileRead,
Update: resourceVSphereFileUpdate,
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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 :)

Copy link
Contributor Author

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.
@dagnello
Copy link
Contributor Author

@stack72 updated

log.Printf("[DEBUG] creating file: %#v", d)
client := meta.(*govmomi.Client)

f := file{
Copy link
Contributor

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

Copy link
Contributor Author

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.

@stack72
Copy link
Contributor

stack72 commented Apr 29, 2016

@dagnello apologies for not picking this last point up. Once fixed I believe we are good to merge

@dagnello
Copy link
Contributor Author

dagnello commented Apr 29, 2016

@stack72 np, just updated!

@chrislovecnm
Copy link
Contributor

@stack72 / @jen20 does this look good to go?

@stack72
Copy link
Contributor

stack72 commented May 2, 2016

This LGTM!

@ghost
Copy link

ghost commented Apr 26, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants