Services¶
Add service¶
Show auth code<?php
require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack([
'authUrl' => '{authUrl}',
'region' => '{region}',
'user' => [
'id' => '{userId}',
'password' => '{password}'
],
'scope' => [
'project' => [
'id' => '{projectId}'
]
]
]);
$identity = $openstack->identityV3(['region' => '{region}']);
$service = $identity->createService([
'name' => '{serviceName}',
'type' => '{serviceType}',
]);
To see all the required and optional parameters for this operation, along with their types and descriptions, view the reference documentation.
List services¶
Show auth code<?php
require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack([
'authUrl' => '{authUrl}',
'region' => '{region}',
'user' => [
'id' => '{userId}',
'password' => '{password}'
],
'scope' => [
'project' => [
'id' => '{projectId}'
]
]
]);
$identity = $openstack->identityV3(['region' => '{region}']);
foreach ($identity->listServices() as $service) {
}
To see all the required and optional parameters for this operation, along with their types and descriptions, view the reference documentation.
Show service details¶
Show auth code<?php
require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack([
'authUrl' => '{authUrl}',
'region' => '{region}',
'user' => [
'id' => '{userId}',
'password' => '{password}'
],
'scope' => [
'project' => [
'id' => '{projectId}'
]
]
]);
$identity = $openstack->identityV3(['region' => '{region}']);
$service = $identity->getService('{serviceId}');
To see all the required and optional parameters for this operation, along with their types and descriptions, view the reference documentation.
Delete service¶
Show auth code<?php
require 'vendor/autoload.php';
$openstack = new OpenStack\OpenStack([
'authUrl' => '{authUrl}',
'region' => '{region}',
'user' => [
'id' => '{userId}',
'password' => '{password}'
],
'scope' => [
'project' => [
'id' => '{projectId}'
]
]
]);
$identity = $openstack->identityV3(['region' => '{region}']);
$service = $identity->getService('{serviceId}');
$service->delete();
To see all the required and optional parameters for this operation, along with their types and descriptions, view the reference documentation.