定制 octey/opencloud-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

octey/opencloud-bundle

Composer 安装命令:

composer require octey/opencloud-bundle

包简介

Symfony2 Bundle for php-opencloud

README 文档

README

Build status... SensioLabsInsight Latest Stable Version Latest Unstable Version

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

php-opencloud-zf2

License

This bundle is released under the MIT License. See the bundled LICENSE file for details.

统计信息

  • 总下载量: 305
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: 未知许可证
  • 更新时间: 2015-01-16