Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

VMware_VCloud_SDK_Exception PUT edgeGateway failed, error code: 202

$
0
0

Hello,

 

I'm using the following version of vmware products :

- vCloud Director 5.1.1.868405

- vCloudApi SDk PHP 1.5.0-472492

- vCloudApi SDK PHP 5.1.0-819742

 

I want to reconfigure an edgeGateway. I used the modify function of VMware_VCloud_SDK_EdgeGateway class. And I've recept that message :

 

VMware_VCloud_SDK_Exception: PUT https://vcd-demo.ecocenter.fr/api/admin/edgeGateway/30e126f7-2e05-4a73-a925-8ea35747f868 failed, error code: 202, error: <?xml version="1.0" encoding="UTF-8"?>

 

the SDK send me a error but the reconfiguration of the edgeGateway has been done correctly.

 

So I studied the modify function :

 

public function modify($params)

    {

        $type = VMware_VCloud_SDK_Constants::EDGE_GATEWAYS_CONTENT_TYPE;

        return $this->svc->put($this->url, 200, $type, $params);

   }

 

It seems that the function wait for a 200 HTTP code and the API send a 202 (which is for an asynchroneous task and logical in our case). I changed the 200 by 202 and the function now works without problem.

 

Is it the good way to resolve the problems ?

 

Regards,

 

Yann CONAN


Viewing all articles
Browse latest Browse all 2039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>