1: <?php
2: /**
3: * The OpenStack Orchestration (Heat) service
4: *
5: * @copyright 2012-2013 Rackspace Hosting, Inc.
6: * See COPYING for licensing information
7: *
8: * @package phpOpenCloud
9: * @version 1.0
10: * @author Glen Campbell <glen.campbell@rackspace.com>
11: * @author Stephen Sugden <openstack@stephensugden.com>
12: */
13:
14: namespace OpenCloud\Orchestration;
15:
16: use OpenCloud\Common\Service as AbstractService;
17: use OpenCloud\Base\Lang;
18: use OpenCloud\OpenStack;
19:
20: /**
21: * The Orchestration class represents the OpenStack Heat service.
22: *
23: * Heat is a service to orchestrate multiple composite cloud applications using
24: * the AWS CloudFormation template format, through both an OpenStack-native ReST
25: * API and a CloudFormation-compatible Query API.
26: *
27: * @codeCoverageIgnore
28: */
29: class Service extends AbstractService
30: {
31:
32: /**
33: * {@inheritDoc}
34: */
35: public function __construct(
36: OpenStack $conn,
37: $serviceName,
38: $serviceRegion,
39: $urltype
40: ) {
41:
42: $this->getLogger()->info('Initializing Orchestration...');
43:
44: parent::__construct(
45: $conn,
46: 'orchestration',
47: $serviceName,
48: $serviceRegion,
49: $urltype
50: );
51: }
52:
53: /**
54: * Returns a Stack object associated with this Orchestration service
55: *
56: * @api
57: * @param string $id - the stack with the ID is retrieved
58: * @returns Stack object
59: */
60: public function stack($id = null)
61: {
62: return new Stack($this, $id);
63: }
64:
65: /**
66: * Return namespaces.
67: *
68: * @return array
69: */
70: public function namespaces()
71: {
72: return array();
73: }
74: }
75: