EMMA Coverage Report (generated Mon Oct 17 05:41:20 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 * 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 */
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