1 /**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19 package org.jclouds.vcloud.compute;
20
21 import java.net.URI;
22
23 import javax.annotation.Nullable;
24
25 import org.jclouds.vcloud.compute.internal.VCloudExpressComputeClientImpl;
26 import org.jclouds.vcloud.domain.VCloudExpressVApp;
27 import org.jclouds.vcloud.options.InstantiateVAppTemplateOptions;
28
29 import com.google.inject.ImplementedBy;
30
31 /**
32 *
33 * @author Adrian Cole
34 */
35 @ImplementedBy(VCloudExpressComputeClientImpl.class)
36 public interface VCloudExpressComputeClient extends CommonVCloudComputeClient {
37 /**
38 * Runs through all commands necessary to startup a vApp, opening at least one ip address to the
39 * public network. These are the steps:
40 * <p/>
41 * instantiate -> deploy -> powerOn
42 * <p/>
43 * This command blocks until the vApp is in state {@code VAppStatus#ON}
44 *
45 * @param VDC
46 * id of the virtual datacenter {@code VCloudClient#getDefaultVDC}
47 * @param templateId
48 * id of the vAppTemplate you wish to instantiate
49 * @param name
50 * name of the vApp
51 * @param cores
52 * amount of virtual cpu cores
53 * @param megs
54 * amount of ram in megabytes
55 * @param options
56 * options for instantiating the vApp; null is ok
57 * @param portsToOpen
58 * opens the following ports on the public ip address
59 * @return map contains at least the following properties
60 * <ol>
61 * <li>id - vApp id</li> <li>username - console login user</li> <li> password - console
62 * login password</li>
63 * </ol>
64 */
65 VCloudExpressVApp start(@Nullable URI VDC, URI templateId, String name, InstantiateVAppTemplateOptions options,
66 int... portsToOpen);
67
68 }