Overview

Namespaces

  • None
  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Exceptions
      • Log
      • Request
        • Response
    • Compute
    • Database
    • DNS
    • LoadBalancer
      • Resources
    • ObjectStore
      • Resource
    • Orchestration
    • Volume
  • PHP

Classes

  • Flavor
  • Image
  • Network
  • Server
  • ServerMetadata
  • Service
  • VolumeAttachment
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class ServerMetadata

This class handles specialized metadata for OpenStack Server objects (metadata items can be managed individually or in aggregate).

Server 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.

OpenCloud\Common\Base
Extended by OpenCloud\Common\Metadata
Extended by OpenCloud\Compute\ServerMetadata
Namespace: OpenCloud\Compute
Author: Glen Campbell <glen.campbell@rackspace.com>
Located at OpenCloud/Compute/ServerMetadata.php
Methods summary
public
# __construct( OpenCloud\Compute\Server $parent, string $key = null )

Contructs a Metadata object associated with a Server or Image object

Contructs a Metadata object associated with a Server or Image object

Parameters

$parent
object
$parent either a Server or an Image object
$key
string
$key the (optional) key for the metadata item

Throws

MetadataError
public string
# url( string $subresource = '' )

Returns the URL of the metadata (key or block)

Returns the URL of the metadata (key or block)

Parameters

$subresource
string
$subresource not used; required for strict compatibility

Returns

string

Throws

ServerUrlerror

Overrides

OpenCloud\Common\Base::url()
public
# create( )

Sets a new metadata value or block

Sets a new metadata value or block

Note that, if you're setting a block, the block specified will entirely replace the existing block.

Throws

MetadataCreateError

Api

public
# update( )

Updates a metadata key or block

Updates a metadata key or block

Throws

MetadataUpdateError

Api

public
# delete( )

Deletes a metadata key or block

Deletes a metadata key or block

Throws

MetadataDeleteError

Api

public OpenCloud\Compute\Server
# parent( )

Returns the parent Server object

Returns the parent Server object

Returns

OpenCloud\Compute\Server
public
# __set( string $key, string $value )

Overrides the base setter method, since the metadata key can be anything (no name-checking is required)

Overrides the base setter method, since the metadata key can be anything (no name-checking is required)

Parameters

$key
string
$key
$value
string
$value

Throws

MetadataKeyError

Overrides

OpenCloud\Common\Metadata::__set()
Methods inherited from OpenCloud\Common\Metadata
Keylist(), setArray()
Methods inherited from OpenCloud\Common\Base
checkJsonError(), getHttpRequestObject(), getLogger(), makeQueryString(), populate(), setLogger(), setProperty()
PHP OpenCloud API API documentation generated by ApiGen 2.8.0