EMMA Coverage Report (generated Mon Oct 17 05:41:20 EDT 2011)
[all classes][org.jclouds.savvis.vpdc.compute.config]

COVERAGE SUMMARY FOR SOURCE FILE [VPDCComputeServiceContextModule.java]

nameclass, %method, %block, %line, %
VPDCComputeServiceContextModule.java100% (7/7)89%  (8/9)94%  (98/104)91%  (10/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VPDCComputeServiceContextModule100% (1/1)67%  (2/3)91%  (62/68)91%  (10/11)
provideTemplate (Injector, TemplateBuilder): TemplateBuilder 0%   (0/1)0%   (0/6)0%   (0/1)
VPDCComputeServiceContextModule (): void 100% (1/1)100% (5/5)100% (2/2)
configure (): void 100% (1/1)100% (57/57)100% (8/8)
     
class VPDCComputeServiceContextModule$1100% (1/1)100% (1/1)100% (6/6)100% (1/1)
VPDCComputeServiceContextModule$1 (VPDCComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class VPDCComputeServiceContextModule$2100% (1/1)100% (1/1)100% (6/6)100% (1/1)
VPDCComputeServiceContextModule$2 (VPDCComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class VPDCComputeServiceContextModule$3100% (1/1)100% (1/1)100% (6/6)100% (1/1)
VPDCComputeServiceContextModule$3 (VPDCComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class VPDCComputeServiceContextModule$4100% (1/1)100% (1/1)100% (6/6)100% (1/1)
VPDCComputeServiceContextModule$4 (VPDCComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class VPDCComputeServiceContextModule$5100% (1/1)100% (1/1)100% (6/6)100% (1/1)
VPDCComputeServiceContextModule$5 (VPDCComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class VPDCComputeServiceContextModule$6100% (1/1)100% (1/1)100% (6/6)100% (1/1)
VPDCComputeServiceContextModule$6 (VPDCComputeServiceContextModule): void 100% (1/1)100% (6/6)100% (1/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.savvis.vpdc.compute.config;
20 
21import static org.jclouds.compute.domain.OsFamily.RHEL;
22 
23import org.jclouds.compute.ComputeServiceAdapter;
24import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
25import org.jclouds.compute.domain.CIMOperatingSystem;
26import org.jclouds.compute.domain.NodeMetadata;
27import org.jclouds.compute.domain.TemplateBuilder;
28import org.jclouds.domain.Location;
29import org.jclouds.savvis.vpdc.VPDCAsyncClient;
30import org.jclouds.savvis.vpdc.VPDCClient;
31import org.jclouds.savvis.vpdc.compute.functions.CIMOperatingSystemToImage;
32import org.jclouds.savvis.vpdc.compute.functions.NetworkToLocation;
33import org.jclouds.savvis.vpdc.compute.functions.VMSpecToHardware;
34import org.jclouds.savvis.vpdc.compute.functions.VMToNodeMetadata;
35import org.jclouds.savvis.vpdc.compute.strategy.VPDCComputeServiceAdapter;
36import org.jclouds.savvis.vpdc.compute.suppliers.FirstNetwork;
37import org.jclouds.savvis.vpdc.domain.Network;
38import org.jclouds.savvis.vpdc.domain.VM;
39import org.jclouds.savvis.vpdc.domain.VMSpec;
40 
41import com.google.common.base.Function;
42import com.google.common.base.Supplier;
43import com.google.inject.Injector;
44import com.google.inject.TypeLiteral;
45 
46/**
47 * 
48 * @author Adrian Cole
49 */
50public class VPDCComputeServiceContextModule extends
51         ComputeServiceAdapterContextModule<VPDCClient, VPDCAsyncClient, VM, VMSpec, CIMOperatingSystem, Network> {
52 
53   public VPDCComputeServiceContextModule() {
54      super(VPDCClient.class, VPDCAsyncClient.class);
55   }
56 
57   @Override
58   protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
59      return template.osFamily(RHEL).os64Bit(true);
60   }
61 
62   @Override
63   protected void configure() {
64      super.configure();
65      bind(new TypeLiteral<ComputeServiceAdapter<VM, VMSpec, CIMOperatingSystem, Network>>() {
66      }).to(VPDCComputeServiceAdapter.class);
67      bind(new TypeLiteral<Function<VM, NodeMetadata>>() {
68      }).to(VMToNodeMetadata.class);
69      bind(new TypeLiteral<Function<CIMOperatingSystem, org.jclouds.compute.domain.Image>>() {
70      }).to(CIMOperatingSystemToImage.class);
71      bind(new TypeLiteral<Function<VMSpec, org.jclouds.compute.domain.Hardware>>() {
72      }).to(VMSpecToHardware.class);
73      bind(new TypeLiteral<Function<Network, Location>>() {
74      }).to(NetworkToLocation.class);
75      bind(new TypeLiteral<Supplier<Location>>() {
76      }).to(FirstNetwork.class);
77   }
78}

[all classes][org.jclouds.savvis.vpdc.compute.config]
EMMA 2.0.5312 (C) Vladimir Roubtsov