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 public $type;
42 public $args;
43
44 protected static $json_name = 'launchConfiguration';
45 protected static $url_resource = 'launch';
46
47 public $createKeys = array(
48 'type',
49 'args'
50 );
51
52 /**
53 * {@inheritDoc}
54 */
55 public function create($params = array())
56 {
57 return $this->noCreate();
58 }
59
60 /**
61 * {@inheritDoc}
62 */
63 public function delete()
64 {
65 return $this->noDelete();
66 }
67 }
68