EMMA Coverage Report (generated Wed Jun 22 19:47:49 EDT 2011)
[all classes][org.jclouds.elasticstack.util]

COVERAGE SUMMARY FOR SOURCE FILE [Servers.java]

nameclass, %method, %block, %line, %
Servers.java0%   (0/1)0%   (0/2)0%   (0/46)0%   (0/2)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Servers0%   (0/1)0%   (0/2)0%   (0/46)0%   (0/2)
Servers (): void 0%   (0/1)0%   (0/3)0%   (0/1)
small (String, String, String): Server$Builder 0%   (0/1)0%   (0/43)0%   (0/1)

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 */
19package org.jclouds.elasticstack.util;
20 
21import org.jclouds.elasticstack.domain.IDEDevice;
22import org.jclouds.elasticstack.domain.Model;
23import org.jclouds.elasticstack.domain.NIC;
24import org.jclouds.elasticstack.domain.Server;
25import org.jclouds.elasticstack.domain.VNC;
26 
27import com.google.common.collect.ImmutableMap;
28import com.google.common.collect.ImmutableSet;
29 
30/**
31 * 
32 * @author Adrian Cole
33 */
34public class Servers {
35   /**
36    * Helper to create a small persistent server
37    * 
38    * @param name
39    *           what to name the server
40    * @param driveUuuid
41    *           id of the boot drive
42    * @param vncPassword
43    *           password for vnc
44    * @return a builder for a persistent 1Ghz 512m server with DHCP enabled network.
45    */
46   public static Server.Builder small(String name, String driveUuuid, String vncPassword) {
47      return new Server.Builder().name(name).cpu(1000).mem(512).persistent(true)
48            .devices(ImmutableMap.of("ide:0:0", new IDEDevice.Builder(0, 0).uuid(driveUuuid).build()))
49            .bootDeviceIds(ImmutableSet.of("ide:0:0"))
50            .nics(ImmutableSet.of(new NIC.Builder().model(Model.E1000).dhcp("auto").build()))
51            .vnc(new VNC(null, vncPassword, false));
52   }
53}

[all classes][org.jclouds.elasticstack.util]
EMMA 2.0.5312 (C) Vladimir Roubtsov