octey/opencloud-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Symfony2 Bundle for php-opencloud

Maintainers

Details

github.com/Octey/OpenCloudBundle

Installs: 305

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 6

Type:symfony-bundle

This package has no released version yet, and little information is available.


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.