frapposelli / vagrant-vcloud

Vagrant provider for VMware vCloud Director®
MIT License
67 stars 38 forks source link

Can't upload new image to catalog (404) #113

Closed zubairov closed 9 years ago

zubairov commented 9 years ago

When I'm trying to upload new VApp into the catalog I'm getting HTTP 404 error. In debug log:

"[Mon Apr 27 20:58:03 2015] -> SEND POST https://vcloud.t-systems.de:443/api/vdc//action/uploadVAppTemplate"
"SEND HEADERS"
{
     "accept" => "application/*+xml;version=5.1",
              "Content-Type" => "application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml",
    "x-vcloud-authorization" => "skipped"
}
"SEND BODY"
<?xml version="1.0"?>
<UploadVAppTemplateParams xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" manifestRequired="true" name="gosddc/precise32">
  <Description>Vagrant Box</Description>
</UploadVAppTemplateParams>

Apparently there is a missing id in URL - https://vcloud.t-systems.de:443/api/vdc//action/uploadVAppTemplate

zubairov commented 9 years ago

I figured it out, it's a bug on my side - a typo in the vdc_name however such typo lead to unexpected error in the unexpected place. Reason for that is here:

https://github.com/frapposelli/vagrant-vcloud/blob/master/lib/vagrant-vcloud/driver/version_5_1.rb#L319

This guy doesn't controll if vdc_id is not null, but it's a mandatory parameter.

@frapposelli I would contributed a pull request fixing it but I don't speak ruby