Esempio n. 1
0
 @Override
 public void copyTo(TemplateOptions to) {
   super.copyTo(to);
   if (to instanceof DockerTemplateOptions) {
     DockerTemplateOptions eTo = DockerTemplateOptions.class.cast(to);
     if (!volumes.isEmpty()) {
       eTo.volumes(volumes);
     }
     eTo.hostname(hostname);
     if (!dns.isEmpty()) {
       eTo.dns(dns);
     }
     eTo.memory(memory);
     eTo.cpuShares(cpuShares);
     if (!commands.isEmpty()) {
       eTo.commands(commands);
     }
     if (!env.isEmpty()) {
       eTo.env(env);
     }
     if (!portBindings.isEmpty()) {
       eTo.portBindings(portBindings);
     }
     eTo.networkMode(networkMode);
     if (!extraHosts.isEmpty()) {
       eTo.extraHosts(extraHosts);
     }
   }
 }
 @Override
 public void copyTo(TemplateOptions to) {
   super.copyTo(to);
   if (to instanceof CloudStackTemplateOptions) {
     CloudStackTemplateOptions eTo = CloudStackTemplateOptions.class.cast(to);
     eTo.securityGroupIds(this.securityGroupIds);
     eTo.keyPair(this.keyPair);
   }
 }
 @Override
 public void copyTo(TemplateOptions to) {
   super.copyTo(to);
   if (to instanceof VCloudTemplateOptions) {
     VCloudTemplateOptions eTo = VCloudTemplateOptions.class.cast(to);
     if (getCustomizationScript() != null) eTo.customizationScript(getCustomizationScript());
     if (getDescription() != null) eTo.description(getDescription());
     if (getIpAddressAllocationMode() != null)
       eTo.ipAddressAllocationMode(getIpAddressAllocationMode());
   }
 }
Esempio n. 4
0
 @Override
 public void copyTo(TemplateOptions to) {
   super.copyTo(to);
   if (to instanceof NovaTemplateOptions) {
     NovaTemplateOptions eTo = NovaTemplateOptions.class.cast(to);
     eTo.autoAssignFloatingIp(shouldAutoAssignFloatingIp());
     eTo.securityGroupNames(getSecurityGroupNames());
     eTo.generateKeyPair(shouldGenerateKeyPair());
     eTo.keyPairName(getKeyPairName());
     if (getUserData() != null) {
       eTo.userData(getUserData());
     }
   }
 }