-
Notifications
You must be signed in to change notification settings - Fork 76
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
support OVF file upload besides ova #323
Conversation
@guo1017138, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction. |
@guo1017138, VMware has approved your signed contributor license agreement. |
Thank you for your improvements. To fully review it and accept we require new functionality to have tests. |
I will add test case ASAP. Thanks. |
@vbauzysvmware , I've add test case for OVF file (contents from untar ova), please help to review again and give comments if any |
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.
Overall looks good, test passed.
One issue is that after test run, test resources files are missing:
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: ../test-resources/test_vapp_template_ovf/descriptor.ovf
deleted: ../test-resources/test_vapp_template_ovf/vm-20b41fa7-3212-4faf-9295-045d0bc49783-disk-0.vmdk
After these is fixed, I all for other to review/approve.
7752a7a
to
7605725
Compare
Add logic check, if this is origin OVF folder directly, won't delete. If it is not OVF folder(means extracted folder from OVA), keep old logic to delete |
Thank you. Only changelog input is needed now and from my side everything is good. @dataclouder @lvirbalas @Didainius - please review also. |
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,
Please add a detailed message to CHANGELOG.md :)
Thank you all for the review. change log is added in my latest commit. |
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.
Small suggestion in-line.
BTW, please commit changes in a separate commit. We are squashing them before merging the PR either way, and it's only possible to understand what was changed after a discussion when separate commits are used.
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.
@vbauzysvmware confirmed that pulling in this go-vcloud-director build Terraform provider is able to upload OVFs without changes. Thanks for contribution! Waiting for review from @Didainius and @dataclouder next.
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.
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.
Overall, it looks good.
There is an error in the test that needs to be fixed.
Apart from that, I would like to know the provenance of the test OVF (for future reference)
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 am waiting for the info on the testing OVF provenance.
Another thing that worries me is that some tests are failing, such as
Running: TestVCD.Test_UploadOvf_ShowUploadProgress_works
catalog_test.go:230:
check.Assert(string(result), Matches, ".*Upload progress 100.00%")
... value string = "Waiting...\rUpload progress 0.00%\rUpload progress 100.00%\n"
... regex string = ".*Upload progress 100.00%"
FAIL: catalog_test.go:202: TestVCD.Test_UploadOvf_ShowUploadProgress_works
I wasn't able to find the root cause. However, using the repository from July 15 the failing tests succeed, and fails with the current HEAD.
Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Support upload ovf which has ovf:size specified for each dependency file ShowUploadProgress can exit whenever task stop, such like cancel on GUI Return status directly for reponse code 400 and 416 due to no body Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
ovaPath is a variable now instead of a hardcode checking Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Signed-off-by: Guo, Larry (NSB - CN/Qingdao) <[email protected]>
Rebase done to resolve conflict. |
@guo1017138 , |
close #322
The added logic will check the file is ovf or not. if it is OVF, will skip unpack step and will check if it depend disk exists or not.
Signed-off-by: Guo, Larry (NSB - CN/Qingdao) [email protected]
IMPORTANT
To help us process your pull request efficiently, please follow the
guidelines shown below.
A Pull Request should be associated with an Issue
We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
and potentially we'll be able to point development in a particular direction.
We accept PRs without associated issues provided the change is sufficiently evident
from the commit message. If you have typos or simple bug fixes go for it.
Description
Related issue: (
<URL or #NUMBER of your Issue>
)(Required) Short description of changes in the PR subject
(Required) Detailed description of changes include tests and
documentation. If the pull request contains multiple commits with
detailed messages, refer to those instead
(Optional) Names of reviewers using @ sign + name