EMMA Coverage Report (generated Wed Jun 22 19:47:49 EDT 2011)
[all classes][org.jclouds.aws.ec2.compute.config]

COVERAGE SUMMARY FOR SOURCE FILE [AWSEC2ComputeServiceContextModule.java]

nameclass, %method, %block, %line, %
AWSEC2ComputeServiceContextModule.java100% (1/1)75%  (3/4)93%  (78/84)94%  (16/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AWSEC2ComputeServiceContextModule100% (1/1)75%  (3/4)93%  (78/84)94%  (16/17)
provideTemplate (Injector, TemplateBuilder): TemplateBuilder 0%   (0/1)0%   (0/6)0%   (0/1)
AWSEC2ComputeServiceContextModule (): void 100% (1/1)100% (3/3)100% (1/1)
configure (): void 100% (1/1)100% (69/69)100% (13/13)
installDependencies (): void 100% (1/1)100% (6/6)100% (2/2)

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.aws.ec2.compute.config;
20 
21import static org.jclouds.compute.domain.OsFamily.AMZN_LINUX;
22 
23import org.jclouds.aws.ec2.compute.AWSEC2TemplateBuilderImpl;
24import org.jclouds.aws.ec2.compute.functions.AWSRunningInstanceToNodeMetadata;
25import org.jclouds.aws.ec2.compute.predicates.AWSEC2InstancePresent;
26import org.jclouds.aws.ec2.compute.strategy.AWSEC2CreateNodesInGroupThenAddToSet;
27import org.jclouds.aws.ec2.compute.strategy.AWSEC2DestroyNodeStrategy;
28import org.jclouds.aws.ec2.compute.strategy.AWSEC2GetNodeMetadataStrategy;
29import org.jclouds.aws.ec2.compute.strategy.AWSEC2ListNodesStrategy;
30import org.jclouds.aws.ec2.compute.strategy.AWSEC2ReviseParsedImage;
31import org.jclouds.aws.ec2.compute.strategy.CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions;
32import org.jclouds.aws.ec2.compute.suppliers.AWSEC2HardwareSupplier;
33import org.jclouds.aws.ec2.compute.suppliers.AWSRegionAndNameToImageSupplier;
34import org.jclouds.compute.domain.TemplateBuilder;
35import org.jclouds.ec2.compute.config.EC2ComputeServiceContextModule;
36import org.jclouds.ec2.compute.functions.RunningInstanceToNodeMetadata;
37import org.jclouds.ec2.compute.internal.EC2TemplateBuilderImpl;
38import org.jclouds.ec2.compute.predicates.InstancePresent;
39import org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions;
40import org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet;
41import org.jclouds.ec2.compute.strategy.EC2DestroyNodeStrategy;
42import org.jclouds.ec2.compute.strategy.EC2GetNodeMetadataStrategy;
43import org.jclouds.ec2.compute.strategy.EC2ListNodesStrategy;
44import org.jclouds.ec2.compute.strategy.ReviseParsedImage;
45import org.jclouds.ec2.compute.suppliers.EC2HardwareSupplier;
46import org.jclouds.ec2.compute.suppliers.RegionAndNameToImageSupplier;
47 
48import com.google.inject.Injector;
49 
50/**
51 * 
52 * @author Adrian Cole
53 */
54public class AWSEC2ComputeServiceContextModule extends EC2ComputeServiceContextModule {
55 
56   @Override
57   protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
58      return template.osFamily(AMZN_LINUX).os64Bit(true);
59   }
60 
61   @Override
62   protected void configure() {
63      super.configure();
64      bind(ReviseParsedImage.class).to(AWSEC2ReviseParsedImage.class);
65      bind(CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions.class).to(
66               CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.class);
67      bind(EC2HardwareSupplier.class).to(AWSEC2HardwareSupplier.class);
68      bind(RegionAndNameToImageSupplier.class).to(AWSRegionAndNameToImageSupplier.class);
69      bind(EC2TemplateBuilderImpl.class).to(AWSEC2TemplateBuilderImpl.class);
70      bind(EC2GetNodeMetadataStrategy.class).to(AWSEC2GetNodeMetadataStrategy.class);
71      bind(EC2ListNodesStrategy.class).to(AWSEC2ListNodesStrategy.class);
72      bind(EC2DestroyNodeStrategy.class).to(AWSEC2DestroyNodeStrategy.class);
73      bind(InstancePresent.class).to(AWSEC2InstancePresent.class);
74      bind(EC2CreateNodesInGroupThenAddToSet.class).to(AWSEC2CreateNodesInGroupThenAddToSet.class);
75      bind(RunningInstanceToNodeMetadata.class).to(AWSRunningInstanceToNodeMetadata.class);
76   }
77 
78   @Override
79   protected void installDependencies() {
80      install(new AWSEC2ComputeServiceDependenciesModule());
81   }
82 
83}

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