jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] CloudSigma2 ComputeService and SecurityGroupExtension (#70)
Date Wed, 01 Oct 2014 07:54:42 GMT
> +public class TemplateOptionsToStatementWithoutPublicKey extends TemplateOptionsToStatement
{
> +
> +   @Override
> +   public Statement apply(TemplateOptions options) {
> +      ImmutableList.Builder<Statement> builder = ImmutableList.builder();
> +      if (options.getRunScript() != null) {
> +         builder.add(options.getRunScript());
> +      }
> +      if (options.getPrivateKey() != null) {
> +         builder.add(new InstallRSAPrivateKey(options.getPrivateKey()));
> +      }
> +
> +      ImmutableList<Statement> bootstrap = builder.build();
> +      if (!bootstrap.isEmpty()) {
> +         if (options.getTaskName() == null && !(options.getRunScript() instanceof
InitScript)) {
> +            options.nameTask("bootstrap");

Yes, it is intentional. The taskname is the name of the script that will be created in the
target node, so it is being set if the user has not explicitly set one. The code in this method,
is just a copy of the code in the parent class but removing the authorize public key statement,
as we're using the provider key pair features.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/70/files#r18265167
Mime
View raw message