OpenCloud/Compute/ServerMetadata.php
Properties
Description
Specialized metadata for OpenStack Server objects (metadata items can be managed individually or in aggregate)Classes
ServerMetadata
Description
This class handles server metadataServer metadata is a weird beast in that it has resource representations and HTTP calls to set the entire server metadata as well as individual items.
Methods
Create, Delete, GetMetadataJson, Parent, Update, Url, __construct, __set,Create( ) : void
Description
Sets a new metadata value or blockNote that, if you're setting a block, the block specified will *entirely replace* the existing block.
Return value
Type | Description |
---|---|
void |
Tags
Name | Description |
---|---|
api | |
throws |
Delete( ) : void
Description
Deletes a metadata key or blockReturn value
Type | Description |
---|---|
void |
Tags
Name | Description |
---|---|
api | |
throws |
GetMetadataJson( ) : string
Description
Builds a metadata JSON stringReturn value
Type | Description |
---|---|
string |
Tags
Name | Description |
---|---|
throws |
Parent( ) : \OpenCloud\Compute\Server
Description
Returns the parent Server objectReturn value
Type | Description |
---|---|
\OpenCloud\Compute\Server |
Update( ) : void
Description
Updates a metadata key or blockReturn value
Type | Description |
---|---|
void |
Tags
Name | Description |
---|---|
api | |
throws |
Url( string $subresource = '', ) : string
Description
Returns the URL of the metadata (key or block)Arguments
Name | Type | Description | Default |
---|---|---|---|
$subresource | string | not used; required for strict compatibility |
'' |
Return value
Type | Description |
---|---|
string |
Tags
Name | Description |
---|---|
throws |
__construct( object $parent, string $key = NULL, ) : n/a
Description
Contructs a Metadata object associated with a Server or Image objectArguments
Name | Type | Description | Default |
---|---|---|---|
$parent | object | either a Server or an Image object |
|
$key | string | the (optional) key for the metadata item |
NULL |
Return value
Type | Description |
---|---|
n/a | n/a |
Tags
Name | Description |
---|---|
throws |