Update ObjectStorage documentation

ObjectStorage::newFromServiceCatalog() needs three parameters
but $region was missing in the documentation.

Change-Id: Id6d3ebd25e0f925b5416d866f3fb251052967e39
This commit is contained in:
alexandre-butynski
2015-01-16 10:17:33 +01:00
parent 4536bbc166
commit a65650cc81
2 changed files with 4 additions and 2 deletions

View File

@@ -11,13 +11,14 @@ $username = $ini['username'];
$password = $ini['password'];
$tenantId = $ini['tenantId'];
$endpoint = $ini['url'];
$region = $ini['region'];
$idService = new IdentityService($endpoint);
$token = $idService->authenticateAsUser($username, $password, $tenantId);
$catalog = $idService->serviceCatalog();
$store = ObjectStorage::newFromServiceCatalog($catalog, $token);
$store = ObjectStorage::newFromServiceCatalog($catalog, $token, $region);
$store->createContainer('Example');
$container = $store->container('Example');

View File

@@ -167,6 +167,7 @@ authenticating.
$password = 'ADD PASSWORD HERE';
$tenantId = 'ADD TENANT ID HERE';
$endpoint = 'ADD ENDPOINT URL HERE';
$region = 'ADD REGION NAME HERE';
$idService = new \OpenStack\Identity\v2\IdentityService($endpoint);
$token = $idService->authenticateAsUser($username, $password, $tenantId);
@@ -241,7 +242,7 @@ Now we can get a new `\OpenStack\ObjectStore\v1\ObjectStorage` instance:
<?php
$catalog = $idService->serviceCatalog();
$store = ObjectStorage::newFromServiceCatalog($catalog, $token);
$store = ObjectStorage::newFromServiceCatalog($catalog, $token, $region);
// UPDATE: As of Beta 6, you can use newFromIdentity():
// $store = ObjectStorage::newFromIdentity($idService);