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

  • Snapshot
  • Volume
  • VolumeType
  • Overview
  • Namespace
  • Class
  • Tree
  • Download
 1: <?php
 2: /**
 3:  * PHP OpenCloud library.
 4:  * 
 5:  * @copyright 2013 Rackspace Hosting, Inc. See LICENSE for information.
 6:  * @license   https://www.apache.org/licenses/LICENSE-2.0
 7:  * @author    Glen Campbell <glen.campbell@rackspace.com>
 8:  * @author    Jamie Hannaford <jamie.hannaford@rackspace.com>
 9:  */
10: 
11: namespace OpenCloud\Volume\Resource;
12: 
13: use OpenCloud\Common\PersistentObject;
14: use OpenCloud\Common\Lang;
15: use OpenCloud\Common\Exceptions;
16: 
17: /**
18:  * The VolumeType class represents a single block storage volume type
19:  */
20: class VolumeType extends PersistentObject 
21: {
22: 
23:     public $id;
24:     public $name;
25:     public $extra_specs;
26: 
27:     protected static $json_name = 'volume_type';
28:     protected static $url_resource = 'types';
29: 
30:     /**
31:      * Creates are not permitted
32:      *
33:      * @throws OpenCloud\CreateError always
34:      */
35:     public function Create($params = array()) 
36:     {
37:         throw new Exceptions\CreateError(
38:             Lang::translate('VolumeType cannot be created')
39:         );
40:     }
41: 
42:     /**
43:      * updates are not permitted
44:      *
45:      * @throws OpenCloud\UpdateError always
46:      */
47:     public function Update($params = array()) 
48:     {
49:         throw new Exceptions\UpdateError(
50:             Lang::translate('VolumeType cannot be updated')
51:         );
52:     }
53: 
54:     /**
55:      * deletes are not permitted
56:      *
57:      * @throws OpenCloud\DeleteError
58:      */
59:     public function Delete() 
60:     {
61:         throw new Exceptions\DeleteError(
62:             Lang::translate('VolumeType cannot be deleted')
63:         );
64:     }
65: 
66: }
67: 
PHP OpenCloud API API documentation generated by ApiGen 2.8.0