1 /**
2 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. 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,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.jclouds.savvis.vpdc.features;
20
21 import java.net.URI;
22 import java.util.concurrent.TimeUnit;
23
24 import org.jclouds.javax.annotation.Nullable;
25
26 import org.jclouds.concurrent.Timeout;
27 import org.jclouds.savvis.vpdc.domain.FirewallService;
28 import org.jclouds.savvis.vpdc.domain.Network;
29 import org.jclouds.savvis.vpdc.domain.Org;
30 import org.jclouds.savvis.vpdc.domain.Task;
31 import org.jclouds.savvis.vpdc.domain.VDC;
32 import org.jclouds.savvis.vpdc.domain.VM;
33 import org.jclouds.savvis.vpdc.options.GetVMOptions;
34
35 /**
36 * Provides access to Symphony VPDC resources via their REST API.
37 * <p/>
38 *
39 * @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/" />
40 * @author Adrian Cole
41 */
42 @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS)
43 public interface BrowsingClient {
44 /**
45 * Get an organization, which can contain list of vDC entities
46 *
47 * @param billingSiteId
48 * billing site Id, or null for default
49 * @return organization, or null if not present
50 */
51 Org getOrg(@Nullable String billingSiteId);
52
53 /**
54 * VDC is a virtual data center ,the API returns a list of VAPPs own by given bill site Id.
55 *
56 * @param billingSiteId
57 * billing site Id, or null for default
58 * @param vpdcId
59 * vpdc Id
60 * @return a list of resource entity and VM configurations, or null if not present
61 */
62 VDC getVDCInOrg(@Nullable String billingSiteId, String vpdcId);
63
64 /**
65 * Get Network API returns network detail
66 *
67 * @param billingSiteId
68 * billing site Id, or null for default
69 * @param vpdcId
70 * vpdc Id
71 * @param networkTierName
72 * network tier name
73 *
74 * @return network detail if it used any one deployed VM and NetworkConfigSection defines various
75 * network features such NAT Public IP, Gateway and Netmask, or null if not present
76 */
77 Network getNetworkInVDC(String billingSiteId, String vpdcId, String networkTierName);
78
79 /**
80 * VAPP is a software solution, the API returns details of virtual machine configuration such as
81 * CPU,RAM Memory and hard drive. The VM State is from the MW Database.
82 *
83 * @param billingSiteId
84 * billing site Id, or null for default
85 * @param vpdcId
86 * vpdc Id
87 * @param vAppId
88 * vApp ID
89 * @param options
90 * control whether or not to get real time state
91 *
92 * @return A virtual application (vApp) is a software solution comprising one or more virtual
93 * machines, all of which are deployed, managed, and maintained as a unit, or null if not
94 * present
95 */
96 VM getVMInVDC(String billingSiteId, String vpdcId, String vAppId, GetVMOptions... options);
97
98 VM getVM(URI vm, GetVMOptions... options);
99
100 /**
101 * Gets an existing task.
102 *
103 * @param taskId
104 * task id
105 * @return If the request is successful, caller could get the VM/VMDK details as specified in the
106 * result element and if the request is not successful, caller would get empty VAPP/VMDK
107 * URL and respective validation (error) message.
108 */
109 Task getTask(String taskId);
110
111 /**
112 * Gets Firewall Rules
113 *
114 * @param billingSiteId
115 * billing site Id, or null for default
116 * @param vpdcId
117 * vpdc Id
118 *
119 * @return If the request is successful, caller could get the firewall rules as specified in the
120 * result element and if the request is not successful, caller would get empty rules list
121 * and respective validation (error) message.
122 */
123 FirewallService listFirewallRules(String billingSiteId, String vpdcId);
124
125 }