1: <?php
2: /**
3: * Copyright 2012-2014 Rackspace US, Inc.
4: *
5: * Licensed under the Apache License, Version 2.0 (the "License");
6: * you may not use this file except in compliance with the License.
7: * You may obtain a copy of the License at
8: *
9: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: namespace OpenCloud\Autoscale\Resource;
19:
20: /**
21: * This configuration specifies what to do when we want to create a new server.
22: * What image to boot, on what flavor, and which load balancer to connect it to.
23: *
24: * The Launch Configuration Contains:
25: *
26: * - Launch Configuration Type (Only type currently supported is "launch_server")
27: * - Arguments:
28: * - Server
29: * - name
30: * - flavor
31: * - imageRef (This is the ID of the Cloud Server image you will boot)
32: * - Load Balancer
33: * - loadBalancerId
34: * - port
35: *
36: * @link https://github.com/rackerlabs/otter/blob/master/doc/getting_started.rst
37: * @link http://docs.autoscale.apiary.io/
38: */
39: class LaunchConfiguration extends AbstractResource
40: {
41:
42: public $type;
43: public $args;
44:
45: protected static $json_name = 'launchConfiguration';
46: protected static $url_resource = 'launch';
47:
48: public $createKeys = array(
49: 'type',
50: 'args'
51: );
52:
53: /**
54: * {@inheritDoc}
55: */
56: public function create($params = array())
57: {
58: return $this->noCreate();
59: }
60:
61: /**
62: * {@inheritDoc}
63: */
64: public function delete()
65: {
66: return $this->noDelete();
67: }
68: }
69: