Update ObjectStorage documentation
ObjectStorage::newFromServiceCatalog() needs three parameters but $region was missing in the documentation. Change-Id: Id6d3ebd25e0f925b5416d866f3fb251052967e39
This commit is contained in:
@@ -11,13 +11,14 @@ $username = $ini['username'];
|
|||||||
$password = $ini['password'];
|
$password = $ini['password'];
|
||||||
$tenantId = $ini['tenantId'];
|
$tenantId = $ini['tenantId'];
|
||||||
$endpoint = $ini['url'];
|
$endpoint = $ini['url'];
|
||||||
|
$region = $ini['region'];
|
||||||
|
|
||||||
$idService = new IdentityService($endpoint);
|
$idService = new IdentityService($endpoint);
|
||||||
$token = $idService->authenticateAsUser($username, $password, $tenantId);
|
$token = $idService->authenticateAsUser($username, $password, $tenantId);
|
||||||
|
|
||||||
$catalog = $idService->serviceCatalog();
|
$catalog = $idService->serviceCatalog();
|
||||||
|
|
||||||
$store = ObjectStorage::newFromServiceCatalog($catalog, $token);
|
$store = ObjectStorage::newFromServiceCatalog($catalog, $token, $region);
|
||||||
|
|
||||||
$store->createContainer('Example');
|
$store->createContainer('Example');
|
||||||
$container = $store->container('Example');
|
$container = $store->container('Example');
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ authenticating.
|
|||||||
$password = 'ADD PASSWORD HERE';
|
$password = 'ADD PASSWORD HERE';
|
||||||
$tenantId = 'ADD TENANT ID HERE';
|
$tenantId = 'ADD TENANT ID HERE';
|
||||||
$endpoint = 'ADD ENDPOINT URL HERE';
|
$endpoint = 'ADD ENDPOINT URL HERE';
|
||||||
|
$region = 'ADD REGION NAME HERE';
|
||||||
|
|
||||||
$idService = new \OpenStack\Identity\v2\IdentityService($endpoint);
|
$idService = new \OpenStack\Identity\v2\IdentityService($endpoint);
|
||||||
$token = $idService->authenticateAsUser($username, $password, $tenantId);
|
$token = $idService->authenticateAsUser($username, $password, $tenantId);
|
||||||
@@ -241,7 +242,7 @@ Now we can get a new `\OpenStack\ObjectStore\v1\ObjectStorage` instance:
|
|||||||
<?php
|
<?php
|
||||||
$catalog = $idService->serviceCatalog();
|
$catalog = $idService->serviceCatalog();
|
||||||
|
|
||||||
$store = ObjectStorage::newFromServiceCatalog($catalog, $token);
|
$store = ObjectStorage::newFromServiceCatalog($catalog, $token, $region);
|
||||||
|
|
||||||
// UPDATE: As of Beta 6, you can use newFromIdentity():
|
// UPDATE: As of Beta 6, you can use newFromIdentity():
|
||||||
// $store = ObjectStorage::newFromIdentity($idService);
|
// $store = ObjectStorage::newFromIdentity($idService);
|
||||||
|
|||||||
Reference in New Issue
Block a user