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

  • Service
  • 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\Autoscale;
12: 
13: use OpenCloud\OpenStack;
14: use OpenCloud\Common\Service\AbstractService;
15: 
16: /**
17:  * The Autoscale class represents the OpenStack Otter service.
18:  */
19: class Service extends AbstractService
20: {
21:     const DEFAULT_TYPE = 'rax:autoscale';
22:     const DEFAULT_NAME = 'autoscale';
23:     
24:     /**
25:      * Autoscale resources.
26:      * 
27:      * @var    array
28:      * @access private
29:      */
30:     public $resources = array(
31:         'Group',
32:         'GroupConfiguration',
33:         'LaunchConfiguration',
34:         'ScalingPolicy'
35:     );
36:     
37:     /**
38:      * Convenience method for getting an autoscale group.
39:      * 
40:      * @param  mixed $info
41:      * @return AbstractResource
42:      */
43:     public function group($info = null)
44:     {
45:         return $this->resource('Group', $info);
46:     }
47:     
48:     /**
49:      * Convenience method for getting a list of autoscale groups.
50:      * 
51:      * @return OpenCloud\Common\Collection
52:      */
53:     public function groupList()
54:     {
55:         return $this->resourceList('Group');
56:     }
57: 
58: }
59: 
PHP OpenCloud API API documentation generated by ApiGen 2.8.0