Ask Your Question

Create container in OpenStack using PHPOpenCloud

asked 2014-05-02 11:19:31 -0500

mani619cash gravatar image

I want to create a container using PHPOpenCLoud. I have deployed (OpenStack) using DevStack on single machine.

I have this code: -

require 'vendor/autoload.php';

use OpenCloud\OpenStack;

$client = new OpenStack('', array(
    'username' => 'admin',
    'password' => 'devstack'

$service = $client->objectStoreService('swift', 'nova');

I am getting this error.

Fatal error: Uncaught exception 'OpenCloud\Common\Exceptions\EndpointError'
with message 'No endpoints for service type [object-store], name [swift], 
region [nova] ....

Can some one tell me how do make use of OpenStack services through (PHPOpenCloud)

edit retag flag offensive close merge delete


Is your target environment actually running swift?

larsks gravatar imagelarsks ( 2014-05-02 12:10:44 -0500 )edit

Yes! I already have some containers and objects in them.

mani619cash gravatar imagemani619cash ( 2014-05-02 12:36:33 -0500 )edit

Make sure your devstack installation runs properly, check the logs of your openstack cloud, too

smaffulli gravatar imagesmaffulli ( 2014-05-02 15:04:09 -0500 )edit

That works properly as I told you I can upload objects to container via CLI. That means it works!

mani619cash gravatar imagemani619cash ( 2014-05-02 23:34:45 -0500 )edit

Were you ever able to solve this? I just tried to do the same thing and got the same error...

I asked on the rackspace forums and they provided an answer, so if you need it look here: (

loatu gravatar imageloatu ( 2014-07-16 12:37:39 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-08-12 03:25:29 -0500

Hamzoz gravatar image
<?php                                                                                                 require 'vendor/autoload.php';                                                                        $openstack = new OpenStack\OpenStack([
'authUrl' => '{authUrl}',
'region'  => '{region}',
'user'    => [
    'id'       => '{userId}',
    'password' => '{password}'
'scope'   => ['project' => ['id' => '{projectId}']]                                                   ]);                                                                                                     $service = $client->objectStoreService('{catalogName}', '{region}', '{urlType}'); ?>

try this !

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-05-02 11:19:31 -0500

Seen: 477 times

Last updated: Aug 12 '16