octey/opencloud-bundle
Composer 安装命令:
composer require octey/opencloud-bundle
包简介
Symfony2 Bundle for php-opencloud
README 文档
README
A bundle to use php-opencloud inside your Symfony2 application.
Installation
The recommended way to install this bundle is through
Composer. Require the octey/opencloud-bundle
package into your composer.json file:
{
"require": {
"octey/opencloud-bundle": "@stable"
}
}
Protip: you should browse the
octey/opencloud-bundle
page to choose a stable version to use, avoid the @stable meta constraint.
Update app/AppKernel.php:
public function registerBundles()
{
$bundles = array(
// ...
new Octey\OpenCloudBundle\OcteyOpenCloudBundle(),
);
return $bundles;
}
Configuration reference
Rackspace :
octey_opencloud:
provider: rackspace
credentials:
username: %rackspace_username%
apiKey: %rackspace_username_apiKey%
OpenStack :
octey_opencloud:
provider: openstack
endpoint: %openstack_endpoint%
credentials:
username: %openstack_username%
password: "%openstack_password%"
# tenantName or tenantId
tenantName: %openstack_tenantName%
#tenantId: %openstack_tenantId%
Usage
public function indexAction()
{
// get opencloud client
$client = $this->get('opencloud');
// Rackspace
$compute = $client->computeService('cloudServersOpenStack', 'ORD');
// OpenStack
$compute = $client->computeService('nova', 'RegionOne');
}
Once this client object is available, you have full access to the php-opencloud SDK.
Inspiration
License
This bundle is released under the MIT License. See the bundled LICENSE file for details.
统计信息
- 总下载量: 305
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: 未知许可证
- 更新时间: 2015-01-16