Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Identity
      • Log
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Resource
    • LoadBalancer
      • Resource
    • ObjectStore
      • Constants
      • Exception
      • Resource
      • Upload
    • Orchestration
    • Queues
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • Flavor
  • Image
  • KeyPair
  • Network
  • Server
  • ServerMetadata
  • 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\Resource\ServerMetadata
Namespace: OpenCloud\Compute\Resource
Located at OpenCloud/Compute/Resource/ServerMetadata.php
Methods summary
public
# __construct( OpenCloud\Compute\Resource\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
# getParent( )
public
# setParent( mixed $parent )
public string
# getUrl( string $path = null, array $query = array() )

Returns the URL of the metadata (key or block)

Returns the URL of the metadata (key or block)

Parameters

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

Returns

string

Throws

ServerUrlerror

Overrides

OpenCloud\Common\Base::getUrl()
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
# __set( string $key, string $value )

This setter overrides the base one, since the metadata key can be anything

This setter overrides the base one, since the metadata key can be anything

Parameters

$key
string
$key
$value
string
$value

Overrides

OpenCloud\Common\Metadata::__set()
Methods inherited from OpenCloud\Common\Metadata
__get(), __isset(), count(), getProperty(), keylist(), propertyExists(), setArray(), setProperty(), toArray()
Methods inherited from OpenCloud\Common\Base
__call(), checkJsonError(), generateUuid(), getLogger(), makeResourceIteratorOptions(), populate(), setLogger(), stripNamespace(), toCamel(), toUnderscores()
Properties summary
protected mixed $key
#
Properties inherited from OpenCloud\Common\Metadata
$metadata
PHP OpenCloud API API documentation generated by ApiGen 2.8.0