You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Andrea Turli <no...@github.com> on 2015/03/31 13:58:43 UTC
[jclouds-examples] bump jclouds version to 1.9.0 (#72)
removed virtualbox references
You can view, comment on, or merge this pull request online at:
https://github.com/jclouds/jclouds-examples/pull/72
-- Commit Summary --
* bump jclouds version to 1.9.0
-- File Changes --
M blobstore-basics/pom.xml (2)
M blobstore-basics/src/main/java/org/jclouds/examples/blobstore/basics/MainApp.java (12)
M blobstore-largeblob/pom.xml (2)
M blobstore-uploader/dependency-reduced-pom.xml (18)
M blobstore-uploader/pom.xml (18)
M chef-basics/pom.xml (7)
M compute-basics/README.md (5)
M compute-basics/pom.xml (9)
M compute-basics/src/main/java/org/jclouds/examples/compute/basics/MainApp.java (20)
M google/pom.xml (2)
M openstack/pom.xml (7)
M pom.xml (4)
-- Patch Links --
https://github.com/jclouds/jclouds-examples/pull/72.patch
https://github.com/jclouds/jclouds-examples/pull/72.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrea Turli <no...@github.com>.
> @@ -137,6 +135,9 @@ public static void main(String[] args) {
>
> ComputeService compute = initComputeService(provider, identity, credential);
>
> + for (Location location : compute.listAssignableLocations()) {
> + System.out.println(location);
> + }
ops, it shouldn't be part of this PR, sorry
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72/files#r27518600
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrew Phillips <no...@github.com>.
> } else if (apiMetadata instanceof AzureBlobApiMetadata) {
> - RestContext<AzureBlobClient, ?> providerContext = context.unwrap();
> - object = providerContext.getApi().getBlobProperties(containerName, blobName);
> + AzureBlobClient api = context.unwrapApi(AzureBlobClient.class);
> + object = api.getBlobProperties(containerName, blobName);
Thanks, @andreaturli!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72/files#r27539315
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrea Turli <no...@github.com>.
@demobox could we merge that now? thanks!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72#issuecomment-90407180
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrew Phillips <no...@github.com>.
> @@ -146,9 +146,9 @@ public static void main(String[] args) {
> // that tested to work with java, which tends to be Ubuntu or CentOS
> TemplateBuilder templateBuilder = compute.templateBuilder();
>
> - if (providerIsGCE)
> - templateBuilder.osFamily(OsFamily.CENTOS);
> -
> + if (providerIsGCE) {
> + templateBuilder.osFamily(OsFamily.CENTOS);
[minor] Indent?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72/files#r27539327
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrew Phillips <no...@github.com>.
> @@ -160,12 +160,18 @@ public static void main(String[] args) {
> Statement bootInstructions = AdminAccess.standard();
>
> // to run commands as root, we use the runScript option in the template.
> - if(provider.equalsIgnoreCase("virtualbox"))
> - templateBuilder.options(overrideLoginUser(loginUser).runScript(bootInstructions));
> - else
> - templateBuilder.options(runScript(bootInstructions));
> -
> - NodeMetadata node = getOnlyElement(compute.createNodesInGroup(groupName, 1, templateBuilder.build()));
> + templateBuilder.options(runScript(bootInstructions));
> +
> + Template template = templateBuilder.build();
> +
> + if (providerIsGCE) {
> + GoogleComputeEngineTemplateOptions templateOptions = template.getOptions().as(GoogleComputeEngineTemplateOptions.class);
> + templateOptions.overrideLoginUser("andrea");
> + templateOptions.authorizePublicKey("ssh-rsa " +
> + "AAAAB3NzaC1yc2EAAAADAQABAAABAQDNnvPZ25wZK19grrbal6R5JP1hLRBUuNh86KxZVMAFkGd5ouVSgO9dFajHZ45Q4mbaTkdOiqf7otMLDzkaztEa7oLK7Jso0Y0LOi+nT4gf38rvbEF5mq069G9b9XqlNleaGnpLuTN54iEK8c4TWZxIJqgelHEHhjp7V1asmilBbpZDmwA5cTt9vGJIhqA/BptKH3folZKeAQjRa1ZRSwSQUnk9rBKn4PKSRDojVa9A9jKt4qboJh5q7ZjtE8z+665F/4TgLzElTXUA8+uUFGpuynMSmQEt301e18dXAl+vBr8fMiThcoVVbdVdqdjXsw75fMXPAgqhjrw8k3+0/4P9 andrea@bigmac.local");
[minor] Indent?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72/files#r27539339
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrew Phillips <no...@github.com>.
> could we merge that now? thanks!
Yes, looks good to me! Please squash'n'merge...
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72#issuecomment-90586951
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrew Phillips <no...@github.com>.
> @@ -116,11 +113,8 @@ public static void main(String[] args) throws IOException {
> S3Client api = context.unwrapApi(S3Client.class);
> object = api.headObject(containerName, blobName);
> } else if (apiMetadata instanceof SwiftApiMetadata) {
> - SwiftClient api = context.unwrapApi(SwiftClient.class);
> - object = api.getObjectInfo(containerName, blobName);
> - } else if (apiMetadata instanceof AzureBlobApiMetadata) {
> - RestContext<AzureBlobClient, ?> providerContext = context.unwrap();
> - object = providerContext.getApi().getBlobProperties(containerName, blobName);
> + SwiftApi api = context.unwrapApi(SwiftApi.class);
> + object = api.getObjectApi(containerName, blobName);
Could you add Azure back? I.e.
```
} else if (apiMetadata instanceof AzureBlobApiMetadata) {
AzureBlobClient api = context.unwrapApi(AzureBlobClient.class);
object = api.getBlobProperties(containerName, blobName);
} else if (apiMetadata instanceof SwiftApiMetadata) {
...
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72/files#r27516709
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrea Turli <no...@github.com>.
Merged at [549fba2cfc0ef3afef749e5231cf58dfe17b1498](https://git-wip-us.apache.org/repos/asf?p=jclouds-examples.git;a=commit;h=549fba2cfc0ef3afef749e5231cf58dfe17b1498)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72#issuecomment-90601483
Re: [jclouds-examples] bump jclouds version to 1.9.0 (#72)
Posted by Andrew Phillips <no...@github.com>.
> @@ -137,6 +135,9 @@ public static void main(String[] args) {
>
> ComputeService compute = initComputeService(provider, identity, credential);
>
> + for (Location location : compute.listAssignableLocations()) {
> + System.out.println(location);
> + }
[minor] Indenting?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/72/files#r27516778