Overview

Namespaces

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

Classes

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

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 implements Countable
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 )

Constructs a Metadata object associated with a Server or Image object

Constructs a Metadata object associated with a Server or Image object

Parameters

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

Throws

MetadataError
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
$subresource not used; required for strict compatibility
$query

Returns

string
string

Throws

ServerUrlerror
ServerUrlerror
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
MetadataCreateError

Api

public
# update( )

Updates a metadata key or block

Updates a metadata key or block

Throws

MetadataUpdateError
MetadataUpdateError

Api

public
# delete( )

Deletes a metadata key or block

Deletes a metadata key or block

Throws

MetadataDeleteError
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
$property
$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(), getInstance(), getJsonHeader(), getLogger(), getPatchHeaders(), hasLogger(), makeResourceIteratorOptions(), populate(), setLogger(), stripNamespace(), toCamel(), toUnderscores()
Constants inherited from OpenCloud\Common\Base
PATCH_CONTENT_TYPE
Properties summary
protected mixed $key
#
Properties inherited from OpenCloud\Common\Metadata
$metadata
Properties inherited from OpenCloud\Common\Base
$aliases
API documentation generated by ApiGen 2.8.0