@SuppressWarnings("unchecked")
  @Override
  protected void configure() {
    super.configure();

    install(new FactoryModuleBuilder().build(ProvisioningJob.Factory.class));

    bind(ImplicitLocationSupplier.class).to(OnlyLocationOrFirstZone.class).in(Scopes.SINGLETON);

    bind(CreateNodesInGroupThenAddToSet.class)
        .to(AssignDataCenterToTemplate.class)
        .in(Scopes.SINGLETON);

    bind(new TypeLiteral<
            ComputeServiceAdapter<ServerInDataCenter, Hardware, Provisionable, Location>>() {})
        .to(ProfitBricksComputeServiceAdapter.class);

    bind(TemplateBuilderImpl.class).to(ArbitraryCpuRamTemplateBuilderImpl.class);

    bind(new TypeLiteral<Function<ServerInDataCenter, NodeMetadata>>() {})
        .to(ServerInDataCenterToNodeMetadata.class);

    bind(new TypeLiteral<Function<Provisionable, Image>>() {}).to(ProvisionableToImage.class);

    bind(new TypeLiteral<Function<org.apache.jclouds.profitbricks.rest.domain.Volume, Volume>>() {})
        .to(VolumeToVolume.class);

    bind(new TypeLiteral<Function<Hardware, Hardware>>() {})
        .to(Class.class.cast(IdentityFunction.class));
  }
 @Override
 protected void configure() {
   super.configure();
   bind(new TypeLiteral<
           ComputeServiceAdapter<
               VirtualMachine,
               VirtualMachineTemplateInVirtualDatacenter,
               VirtualMachineTemplate,
               VirtualDatacenter>>() {})
       .to(AbiquoComputeServiceAdapter.class);
   bind(new TypeLiteral<Function<VirtualMachine, NodeMetadata>>() {})
       .to(VirtualMachineToNodeMetadata.class);
   bind(new TypeLiteral<Function<VirtualMachineTemplate, Image>>() {})
       .to(VirtualMachineTemplateToImage.class);
   bind(new TypeLiteral<Function<VirtualMachineTemplateInVirtualDatacenter, Hardware>>() {})
       .to(VirtualMachineTemplateInVirtualDatacenterToHardware.class);
   bind(new TypeLiteral<Function<Datacenter, Location>>() {}).to(DatacenterToLocation.class);
   bind(new TypeLiteral<Function<VirtualDatacenter, Location>>() {})
       .to(VirtualDatacenterToLocation.class);
   bind(ImplicitLocationSupplier.class).to(OnlyLocationOrFirstZone.class).in(Scopes.SINGLETON);
   bind(TemplateOptions.class).to(AbiquoTemplateOptions.class);
   install(
       new LocationsFromComputeServiceAdapterModule<
           VirtualMachine,
           VirtualMachineTemplateInVirtualDatacenter,
           VirtualMachineTemplate,
           VirtualDatacenter>() {});
 }
 @Override
 protected void configure() {
   super.configure();
   bind(new TypeLiteral<
           ComputeServiceAdapter<VirtualMachine, ServiceOffering, Template, Zone>>() {})
       .to(CloudStackComputeServiceAdapter.class);
   bind(new TypeLiteral<Function<VirtualMachine, NodeMetadata>>() {})
       .to(VirtualMachineToNodeMetadata.class);
   bind(new TypeLiteral<Function<Template, org.jclouds.compute.domain.Image>>() {})
       .to(TemplateToImage.class);
   bind(new TypeLiteral<Function<ServiceOffering, org.jclouds.compute.domain.Hardware>>() {})
       .to(ServiceOfferingToHardware.class);
   bind(new TypeLiteral<Function<Zone, Location>>() {}).to(ZoneToLocation.class);
   bind(TemplateOptions.class).to(CloudStackTemplateOptions.class);
   bind(new TypeLiteral<Function<Template, OperatingSystem>>() {})
       .to(TemplateToOperatingSystem.class);
   install(new FactoryModuleBuilder().build(StaticNATVirtualMachineInNetwork.Factory.class));
   bind(new TypeLiteral<CacheLoader<String, Set<IPForwardingRule>>>() {})
       .to(GetIPForwardingRulesByVirtualMachine.class);
   bind(new TypeLiteral<CacheLoader<String, Set<FirewallRule>>>() {})
       .to(GetFirewallRulesByVirtualMachine.class);
   bind(new TypeLiteral<CacheLoader<String, Zone>>() {}).to(ZoneIdToZone.class);
   bind(new TypeLiteral<Supplier<LoadingCache<String, Zone>>>() {}).to(ZoneIdToZoneSupplier.class);
   // to have the compute service adapter override default locations
   install(
       new LocationsFromComputeServiceAdapterModule<
           VirtualMachine, ServiceOffering, Template, Zone>() {});
 }
 @SuppressWarnings("unchecked")
 @Override
 protected void configure() {
   super.configure();
   bind(new TypeLiteral<ComputeServiceAdapter<ServerDetails, Hardware, OSTemplate, String>>() {})
       .to(GleSYSComputeServiceAdapter.class);
   bind(new TypeLiteral<Function<ServerDetails, NodeMetadata>>() {})
       .to(ServerDetailsToNodeMetadata.class);
   bind(new TypeLiteral<Function<OSTemplate, org.jclouds.compute.domain.Image>>() {})
       .to(OSTemplateToImage.class);
   bind(new TypeLiteral<Function<Hardware, Hardware>>() {})
       .to(Class.class.cast(IdentityFunction.class));
   bind(new TypeLiteral<Function<String, Location>>() {}).to(DatacenterToLocation.class);
   bind(new TypeLiteral<Function<String, OsFamilyVersion64Bit>>() {})
       .to(ParseOsFamilyVersion64BitFromImageName.class);
   bind(TemplateOptions.class).to(GleSYSTemplateOptions.class);
   install(
       new LocationsFromComputeServiceAdapterModule<
           ServerDetails, Hardware, OSTemplate, String>() {});
 }
 @SuppressWarnings({"unchecked", "rawtypes"})
 @Override
 protected void configure() {
   super.configure();
   bind(new TypeLiteral<ComputeServiceAdapter<ServerDetails, Hardware, OSTemplate, String>>() {})
       .to(GleSYSComputeServiceAdapter.class);
   bind(new TypeLiteral<Function<ServerDetails, NodeMetadata>>() {})
       .to(ServerDetailsToNodeMetadata.class);
   bind(new TypeLiteral<Function<OSTemplate, org.jclouds.compute.domain.Image>>() {})
       .to(OSTemplateToImage.class);
   bind(new TypeLiteral<Function<Hardware, Hardware>>() {}).to((Class) IdentityFunction.class);
   bind(new TypeLiteral<Function<String, Location>>() {}).to(DatacenterToLocation.class);
   bind(new TypeLiteral<Function<String, OsFamilyVersion64Bit>>() {})
       .to(ParseOsFamilyVersion64BitFromImageName.class);
   bind(TemplateOptions.class).to(GleSYSTemplateOptions.class);
   bind(String.class)
       .annotatedWith(Names.named("PASSWORD"))
       .toProvider(PasswordProvider.class)
       .in(Scopes.SINGLETON);
   // to have the compute service adapter override default locations
   install(
       new LocationsFromComputeServiceAdapterModule<
           ServerDetails, Hardware, OSTemplate, String>() {});
 }
  @SuppressWarnings("unchecked")
  @Override
  protected void configure() {
    super.configure();
    // 1.3.1
    bind(new TypeLiteral<
            ComputeServiceAdapter<
                Server, Flavor, org.gdjclouds.provider.gdnova.v100.Image, Location>>() {})
        .to(NovaComputeServiceAdapter.class);

    // 1.0.1
    bind(new TypeLiteral<ComputeServiceContext>() {})
        .to(new TypeLiteral<ComputeServiceContextImpl<GDNovaClient, GDNovaAsyncClient>>() {})
        .in(Scopes.SINGLETON);
    bind(new TypeLiteral<RestContext<GDNovaClient, GDNovaAsyncClient>>() {})
        .to(new TypeLiteral<RestContextImpl<GDNovaClient, GDNovaAsyncClient>>() {})
        .in(Scopes.SINGLETON);

    bind(new TypeLiteral<Function<org.gdjclouds.provider.gdnova.v100.Server, NodeMetadata>>() {})
        .to(GDServerToNodeMetadata.class);

    bind(new TypeLiteral<Function<org.gdjclouds.provider.gdnova.v100.Image, Image>>() {})
        .to(GDNovaImageToImage.class);
    bind(new TypeLiteral<Function<org.gdjclouds.provider.gdnova.v100.Image, OperatingSystem>>() {})
        .to(GDNovaImageToOperatingSystem.class);

    bind(new TypeLiteral<Function<Flavor, Hardware>>() {}).to(FlavorToHardware.class);

    // we aren't converting location from a provider-specific type
    bind(new TypeLiteral<Function<Location, Location>>() {}).to((Class) IdentityFunction.class);

    // there are no locations except the provider
    bind(new TypeLiteral<Supplier<Location>>() {}).to(OnlyLocationOrFirstZone.class);

    bind(new TypeLiteral<TemplateOptions>() {}).toProvider(new SuperTempateOptionsProvider());
  }