vmware / vcloud-sdk-patched
VMware vCloud SDK for PHP - patched version
Installs: 33 028
Dependents: 3
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 5
Open Issues: 5
Requires
- php: >=5.3.2
Requires (Dev)
- pear-pear/http_request2: 2.1.*
- sami/sami: 1.3.0
- vmware/vcloud-sdk: 5.5.0
Suggests
- pear-pear/HTTP_Request2: Requires HTTP_Request2 from pear's repository http://pear.php.net if it is not installed system-wise
README
VMware vCloud SDK for PHP (patched version) - Repository for importing with Composer
This project is a fork from the original VMWare SDK for PHP, with the exception of the following additions and changes:
✔ Split VMware/VCloud/API.php
(5 MB), and a few other files into individual class files
✔ Normalized class paths (VMware/VCloud/SDK/**/*.php
and VMware/VCloud/API/**/*.php
)
✔ Compatible with Composer's autoloading
✔ Fixed #2: Allow retrieving the currently logged user's username and token
✔ Fixed #3: Remove unnecessary require_once
✔ Fixed #5: Edge gateway modification doesn't work
✔ Fixed #6: Uploading big OVF files doesn't work
✔ Fixed #7: Uploading OVF files doesn't work on Windows/Cygwin
✔ Fixed #8: Set image type in VMWare_VCloud_SDK_Vdc::uploadMedia (credits to @brianium)
✔ Fixed #9: Add support for storageKB field on VMware_VCloud_API_QueryResultVAppTemp (credits to @brianium)
✔ Fixed #12: VMware_VCloud_SDK_Vdc::sendUploadVAppTemplateRequest should uses $vdcStorageProfileRef (credits to @brianium)
✔ Fixed #16: OperatingSytemSection and VirtualHardwareSection should have the "ovf" namespace (credits to @brianium)
✔ Fixed #17: Add support for details in VMware_VCloud_API_QueryResultTaskRecordType (credits to @brianium)
✔ Fixed #18: Add vmPendingQuestion to SDK_Constants (credits to @brianium)
✔ Fixed #19: PHP Warning: Illegal string offset on multiple API_QueryResult* classes
✔ Fixed #20: Added onProgress function for http-client upload method and vdc uploads (credits to @yconan)
✔ Fixed #21: Set all private fields and functions to protected
Installation
vmware/vcloud-sdk-patched is available through Composer.
"repositories": [ { "type": "pear", "url": "http://pear.php.net" } ], "require": { "vmware/vcloud-sdk-patched": "550.5.0", "pear-pear/HTTP_Request2": "*" }
php composer.phar update
If you are not familiar with Composer, please read the full installation intructions.
Usage
See API documentation or official VMware documentation
Include Composer autoloaded
// On top of your script require_once 'path/to/.../vendor/autoload.php';
Login
// $hostname = ... // $username = ... // $organization = ... // $password = ... // $apiVersion = ... try { $service = \VMware_VCloud_SDK_Service::getService(); $service->login( $hostname, array( 'username' => $username . '@' . $organization, 'password' => $password, ), array( 'proxy_host' => null, 'proxy_port' => null, 'proxy_user' => null, 'proxy_password' => null, 'ssl_verify_peer' => false, 'ssl_verify_host' => false, 'ssl_cafile' => null, ), $apiVersion ); } catch (\VMware_VCloud_SDK_Exception $e) { throw new \Exception('Login failed'); }
Versioning
Using Semver as a base for versioning, this project also
follow additional guidelines for version numbering. each version is in the
format vwx.y.z
where:
vwx
is the concatenation of the vCloud SDK that this SDK is based upon (eg. "512" for 5.1.2)- Each modification of
y
introduces a new patch - Modifications of
y
are simply corrections of existing patches
Licensing
This project is released under Creative Commons - Attribution 3.0 Unported license. If this license does not fit your requirement for whatever reason, but you would be interested in using the work (as defined below) under another license, please contact authors.
Contributing
Contributions (issues ♥, pull requests ♥♥♥) are more than welcome! Feel free to clone, fork, modify, extend, etc, as long as you respect the license terms.
See contributing intructions for details.