예제 #1
0
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
/** @var bool $exists */
$exists = $openstack->objectStoreV1()->getContainer('{containerName}')->objectExists('{objectName}');
예제 #2
0
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
$openstack->objectStoreV1()->getContainer('{containerName}')->delete();
예제 #3
0
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
$service = $openstack->objectStoreV1();
$account = $service->getAccount();
$account->resetMetadata(['{key_1}' => '{val_1}', '{key_2}' => '{val_2}']);
예제 #4
0
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
$openstack->objectStoreV1()->getContainer('{containerName}')->getObject('{objectName}')->mergeMetadata(['{key_1}' => '{val_1}', '{key_2}' => '{val_2}']);
예제 #5
0
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
$options = ['name' => '{objectName}', 'content' => '{objectContent}'];
/** @var \OpenStack\ObjectStore\v1\Models\Object $object */
$object = $openstack->objectStoreV1()->getContainer('{containerName}')->createObject($options);
예제 #6
0
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
/** @var \GuzzleHttp\Stream\Stream $stream */
$stream = $openstack->objectStoreV1()->getContainer('{containerName}')->getObject('{objectName}')->download();
예제 #7
0
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
/** @var array $metadata */
$metadata = $openstack->objectStoreV1()->getContainer('{containerName}')->getMetadata();
예제 #8
0
파일: get.php 프로젝트: karnajani/openstack
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
$container = $openstack->objectStoreV1()->getContainer('{containerName}');
예제 #9
0
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
$openstack->objectStoreV1()->getContainer('{containerName}')->getObject('{objectName}')->copy(['destination' => '{newContainerName}/{newObjectName}']);
<?php

require 'vendor/autoload.php';
use Guzzle\Stream\Stream;
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
$options = ['name' => 'object_name.txt', 'stream' => new Stream(fopen('/path/to/large_object.mov', 'r'))];
// optional: specify the size of each segment in bytes
$options['segmentSize'] = 1073741824;
// optional: specify the container where the segments live. This does not necessarily have to be the
// same as the container which holds the manifest file
$options['segmentContainer'] = 'test_segments';
/** @var \OpenStack\ObjectStore\v1\Models\Object $object */
$object = $openstack->objectStoreV1()->getContainer('test')->createLargeObject($options);
예제 #11
0
파일: get.php 프로젝트: karnajani/openstack
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
$account = $openstack->objectStoreV1()->getAccount();
예제 #12
0
파일: get.php 프로젝트: karnajani/openstack
<?php

require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack(['authUrl' => '{authUrl}', 'region' => '{region}', 'user' => ['id' => '{userId}', 'password' => '{password}'], 'scope' => ['project' => ['id' => '{projectId}']]]);
/** @var \OpenStack\ObjectStore\v1\Models\Object $object */
$object = $openstack->objectStoreV1()->getContainer('{containerName}')->getObject('{objectName}');