> + public CreateServerWithKeyPair(String username, String apiKey) {
> + Iterable<Module> modules = ImmutableSet.<Module> of(new
> SshjSshClientModule());
> +
> + // These properties control how often jclouds polls for a status update
> + Properties overrides = new Properties();
> + overrides.setProperty(POLL_INITIAL_PERIOD, POLL_PERIOD_TWENTY_SECONDS);
> + overrides.setProperty(POLL_MAX_PERIOD, POLL_PERIOD_TWENTY_SECONDS);
> +
> + ComputeServiceContext context = ContextBuilder.newBuilder(PROVIDER)
> + .credentials(username, apiKey)
> + .overrides(overrides)
> + .modules(modules)
> + .buildView(ComputeServiceContext.class);
> +
> + computeService = context.getComputeService();
> + nova = computeService.getContext().unwrap();
Correct.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/30/files#r8831629