Re: [jclouds/jclouds] OAuth filter customization per request (#1160)

2017-11-28 Thread Jim Spring
LGTM. Some test failures I was seeing, wholly unrelated and will retest those 
and open issues accordingly.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1160#issuecomment-347739730

Re: [jclouds/jclouds-labs] Add Azure KeyVault support -- vault management and certificate/key/secret operations (#416)

2017-11-28 Thread Jim Spring
@nacx - added Merge tests.  Let me know when I should update PR to include 
OAuth dynamic patch.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/416#issuecomment-347728489

Re: [jclouds/jclouds-labs] Add Azure KeyVault support -- vault management and certificate/key/secret operations (#416)

2017-11-28 Thread Jim Spring
@jmspring pushed 1 commit.

3f94a99  add merge mock tests


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/416/files/d477519731ec9a9b20e68f405e42a9163313b8d3..3f94a9924e7c422f3b7afa0726afaaa4d6a4c8bb


[jclouds/jclouds] Fix an unexpected test failure in Windows path handling (#1162)

2017-11-28 Thread Andrew Phillips
See http://markmail.org/message/tahusme6svuhpew6.

>From a quick local test, it seems that this test has been failing on Windows 
>since it was added in 6452960c72a5f8, so I'm not sure if the test input was 
>incorrectly constructed at the time, or if the actual functionality has been 
>broken on Windows from the beginning.

@gaul Any light you could shed on that?
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1162

-- Commit Summary --

  * Fix an unexpected test failure in Windows path handling

-- File Changes --

M 
apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java
 (16)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1162.patch
https://github.com/jclouds/jclouds/pull/1162.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1162


Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Andrew Gaul
gaul approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#pullrequestreview-79639284

Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Trevor Flanagan
trevorflanagan commented on this pull request.



> +1. [Introduction](#intro)
+1. [Release Highlights](#highlights)
+1. [Known Issues](#knownissues)
+1. [Credits](#credits)
+1. [Test Results](#test)
+
+## Introduction
+
+Apache jclouds 2.0.3 is the third bugfix release after jclouds 2.0 and comes 
with several bugfixes and performance improvements. You can [read the official 
announcement here](https://s.apache.org/jclouds203). To get started with 
jclouds, please see the [jclouds installation guide](/start/install/).
+
+## Release Highlights
+
+Apache jclouds 2.0.3 new features include:
+
+* Fixed compilation issues in Java 1.8.
+* Completed the provider APIs in the DimensionData provider needed to support 
the Compute abstraction.

 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#pullrequestreview-79589965

Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Ignasi Barrera
nacx commented on this pull request.



> +* [JCLOUDS-1282](https://issues.apache.org/jira/browse/JCLOUDS-1282) - 
> Support custom-data in Azure ARM template options
+* [JCLOUDS-1314](https://issues.apache.org/jira/browse/JCLOUDS-1314) - B2 
native prefix and delimiter support
+* [JCLOUDS-1327](https://issues.apache.org/jira/browse/JCLOUDS-1327) - putBlob 
with zero length Inputstream is failing on google-cloud-storage
+* [JCLOUDS-1328](https://issues.apache.org/jira/browse/JCLOUDS-1328) - Update 
ProfitBricks to the latest API version
+* [JCLOUDS-1329](https://issues.apache.org/jira/browse/JCLOUDS-1329) - Azure 
ARM extraneous resources are not cleaned up on node deletion
+* [JCLOUDS-1332](https://issues.apache.org/jira/browse/JCLOUDS-1332) - 
BaseComputeService.destroyNodesMatching and BaseComputeService.destroyNode 
different behavior
+* [JCLOUDS-1342](https://issues.apache.org/jira/browse/JCLOUDS-1342) - 
Azure-ARM Virtual Machine Scale Set Support
+* [JCLOUDS-1351](https://issues.apache.org/jira/browse/JCLOUDS-1351) - AWS 
CentOS marketplace AMI misdetecting OS type
+* [JCLOUDS-1353](https://issues.apache.org/jira/browse/JCLOUDS-1353) - AWS EC2 
add support for Accelerated computing instance type
+* [JCLOUDS-1358](https://issues.apache.org/jira/browse/JCLOUDS-1358) - putBlob 
with zero length InputSteam is failing for aws s3
+
+The complete list of fixed issues and improvements can be found 
[here](https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12341063=Html=12314430).
+
+##  Known Issues
+
+TODO

Lgtm

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#discussion_r153544750

Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Andrea Turli
andreaturli commented on this pull request.



> +* [JCLOUDS-1282](https://issues.apache.org/jira/browse/JCLOUDS-1282) - 
> Support custom-data in Azure ARM template options
+* [JCLOUDS-1314](https://issues.apache.org/jira/browse/JCLOUDS-1314) - B2 
native prefix and delimiter support
+* [JCLOUDS-1327](https://issues.apache.org/jira/browse/JCLOUDS-1327) - putBlob 
with zero length Inputstream is failing on google-cloud-storage
+* [JCLOUDS-1328](https://issues.apache.org/jira/browse/JCLOUDS-1328) - Update 
ProfitBricks to the latest API version
+* [JCLOUDS-1329](https://issues.apache.org/jira/browse/JCLOUDS-1329) - Azure 
ARM extraneous resources are not cleaned up on node deletion
+* [JCLOUDS-1332](https://issues.apache.org/jira/browse/JCLOUDS-1332) - 
BaseComputeService.destroyNodesMatching and BaseComputeService.destroyNode 
different behavior
+* [JCLOUDS-1342](https://issues.apache.org/jira/browse/JCLOUDS-1342) - 
Azure-ARM Virtual Machine Scale Set Support
+* [JCLOUDS-1351](https://issues.apache.org/jira/browse/JCLOUDS-1351) - AWS 
CentOS marketplace AMI misdetecting OS type
+* [JCLOUDS-1353](https://issues.apache.org/jira/browse/JCLOUDS-1353) - AWS EC2 
add support for Accelerated computing instance type
+* [JCLOUDS-1358](https://issues.apache.org/jira/browse/JCLOUDS-1358) - putBlob 
with zero length InputSteam is failing for aws s3
+
+The complete list of fixed issues and improvements can be found 
[here](https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12341063=Html=12314430).
+
+##  Known Issues
+
+TODO

I'd add something like:
```
There are a number of jira issues related to Openstack that are around a better 
versioning support, namely
JCLOUDS-1197
JCLOUDS-773
JCLOUDS-114

Particularly,  jclouds doesn't support OpenStack Keystone v3 API, currently, 
but the community is actively working on that -- see 
https://lists.apache.org/thread.html/0e2df0f9f8168e607d273f3a875576f3c14cf93cf740d8ada1d4e2ef@
```
Sounds ok?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#discussion_r153540430

Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Ignasi Barrera
nacx commented on this pull request.



> +* [JCLOUDS-1282](https://issues.apache.org/jira/browse/JCLOUDS-1282) - 
> Support custom-data in Azure ARM template options
+* [JCLOUDS-1314](https://issues.apache.org/jira/browse/JCLOUDS-1314) - B2 
native prefix and delimiter support
+* [JCLOUDS-1327](https://issues.apache.org/jira/browse/JCLOUDS-1327) - putBlob 
with zero length Inputstream is failing on google-cloud-storage
+* [JCLOUDS-1328](https://issues.apache.org/jira/browse/JCLOUDS-1328) - Update 
ProfitBricks to the latest API version
+* [JCLOUDS-1329](https://issues.apache.org/jira/browse/JCLOUDS-1329) - Azure 
ARM extraneous resources are not cleaned up on node deletion
+* [JCLOUDS-1332](https://issues.apache.org/jira/browse/JCLOUDS-1332) - 
BaseComputeService.destroyNodesMatching and BaseComputeService.destroyNode 
different behavior
+* [JCLOUDS-1342](https://issues.apache.org/jira/browse/JCLOUDS-1342) - 
Azure-ARM Virtual Machine Scale Set Support
+* [JCLOUDS-1351](https://issues.apache.org/jira/browse/JCLOUDS-1351) - AWS 
CentOS marketplace AMI misdetecting OS type
+* [JCLOUDS-1353](https://issues.apache.org/jira/browse/JCLOUDS-1353) - AWS EC2 
add support for Accelerated computing instance type
+* [JCLOUDS-1358](https://issues.apache.org/jira/browse/JCLOUDS-1358) - putBlob 
with zero length InputSteam is failing for aws s3
+
+The complete list of fixed issues and improvements can be found 
[here](https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12341063=Html=12314430).
+
+##  Known Issues
+
+TODO

Sure, it is just the initial version. As I said in the PR description, this is 
a collaborative work. Please, feel free to directly push the fixes for what you 
see wrong and add whatever you consider it should be added :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#discussion_r153531516

Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Ignasi Barrera
nacx commented on this pull request.



> +* [JCLOUDS-1342](https://issues.apache.org/jira/browse/JCLOUDS-1342) - 
> Azure-ARM Virtual Machine Scale Set Support
+* [JCLOUDS-1351](https://issues.apache.org/jira/browse/JCLOUDS-1351) - AWS 
CentOS marketplace AMI misdetecting OS type
+* [JCLOUDS-1353](https://issues.apache.org/jira/browse/JCLOUDS-1353) - AWS EC2 
add support for Accelerated computing instance type
+* [JCLOUDS-1358](https://issues.apache.org/jira/browse/JCLOUDS-1358) - putBlob 
with zero length InputSteam is failing for aws s3
+
+The complete list of fixed issues and improvements can be found 
[here](https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12341063=Html=12314430).
+
+##  Known Issues
+
+TODO
+
+## Credits
+
+jclouds would like to thank everyone who contributed time and effort in order 
to make this release happen:
+
+* [Jim Spring](https://twitter.com/jmspring) for his contributions to the 
Azure ARM provider.

Because I have its twitter handle :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#discussion_r153531269

Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread jclouds-commentator
  Go to 
http://4b8af3c78c161be93cdd-1aa02beba65cf3974f0cf68e0482f76a.r42.cf5.rackcdn.com/
 to review your changes.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#issuecomment-347564782

Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Andrea Turli
andreaturli commented on this pull request.



> +1. [Release Highlights](#highlights)
+1. [Known Issues](#knownissues)
+1. [Credits](#credits)
+1. [Test Results](#test)
+
+## Introduction
+
+Apache jclouds 2.0.3 is the third bugfix release after jclouds 2.0 and comes 
with several bugfixes and performance improvements. You can [read the official 
announcement here](https://s.apache.org/jclouds203). To get started with 
jclouds, please see the [jclouds installation guide](/start/install/).
+
+## Release Highlights
+
+Apache jclouds 2.0.3 new features include:
+
+* Fixed compilation issues in Java 1.8.
+* Completed the provider APIs in the DimensionData provider needed to support 
the Compute abstraction.
+* Added the Amazon Chine Beijing region.

China?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#pullrequestreview-79548864

Re: [jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Ignasi Barrera
rebuild please

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202#issuecomment-347562275

[jclouds/jclouds-site] Release notes for jclouds 2.0.3 (#202)

2017-11-28 Thread Ignasi Barrera
@demobox @gaul @andreaturli Please review and push your fixes directly to the 
branch! :smile: 
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-site/pull/202

-- Commit Summary --

  * Release notes for jclouds 2.0.3

-- File Changes --

M _config.yml (4)
M _includes/navbar.html (1)
M doap_jclouds.rdf (7)
A releasenotes/2.0.3.md (68)
M releasenotes/index.md (2)

-- Patch Links --

https://github.com/jclouds/jclouds-site/pull/202.patch
https://github.com/jclouds/jclouds-site/pull/202.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-site/pull/202


Re: [jclouds/jclouds] OAuth filter customization per request (#1160)

2017-11-28 Thread Jim Spring
I’ll update my code this morning if there are any changes and can run the ARM 
tests and get back in a bit.

Sent from my iThingy

> On Nov 28, 2017, at 06:06, Andrea Turli  wrote:
> 
> from slack conversation, I understand @nacx already tested this with GCE, so 
> lgtm!
> 
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.
> 


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1160#issuecomment-347534063

Re: [jclouds/jclouds] OAuth filter customization per request (#1160)

2017-11-28 Thread Andrea Turli
from slack conversation, I understand @nacx already tested this with GCE, so 
lgtm!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1160#issuecomment-347533273

Re: [jclouds/jclouds] OAuth filter customization per request (#1160)

2017-11-28 Thread Andrea Turli
thanks @nacx !


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1160#issuecomment-347533302

Re: [jclouds/jclouds] Fix DigitalOcean DropletApiLiveTest (#1161)

2017-11-28 Thread Ignasi Barrera
The build seems to fail due to 
https://github.com/jenkinsci/ghprb-plugin/issues/579. I'll try to update the 
Jenkins plugins later today.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1161#issuecomment-347501775

Re: [jclouds/jclouds-labs] Jclouds 46 network and image tests (#401)

2017-11-28 Thread Boris Trishkin
@btrishkin pushed 2 commits.

84aabdb  Merge branch 'master' into jclouds-46-network-and-image-tests
def3271  JCLOUD-46 / JCLOUD-47 - Add missing mock / live tests for Network API


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/401/files/a003ad70b5862ca3b4379dfb412371936f2bebb7..def3271d745e3d16a9041fd66d284874dfc16a3a


Re: [jclouds/jclouds] Fix DigitalOcean DropletApiLiveTest (#1161)

2017-11-28 Thread Ignasi Barrera
rebuild please

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1161#issuecomment-347495276

[jclouds/jclouds] Fix DigitalOcean DropletApiLiveTest (#1161)

2017-11-28 Thread Ignasi Barrera

You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1161

-- Commit Summary --

  * Fix DigitalOcean DropletApiLiveTest

-- File Changes --

M providers/digitalocean2/pom.xml (2)
M 
providers/digitalocean2/src/main/java/org/jclouds/digitalocean2/DigitalOcean2ApiMetadata.java
 (2)
M 
providers/digitalocean2/src/main/java/org/jclouds/digitalocean2/domain/Image.java
 (10)
M 
providers/digitalocean2/src/test/java/org/jclouds/digitalocean2/compute/DigitalOcean2TemplateBuilderLiveTest.java
 (2)
M 
providers/digitalocean2/src/test/java/org/jclouds/digitalocean2/compute/functions/DropletToNodeMetadataTest.java
 (4)
M 
providers/digitalocean2/src/test/java/org/jclouds/digitalocean2/compute/functions/ImageInRegionToImageTest.java
 (2)
M 
providers/digitalocean2/src/test/java/org/jclouds/digitalocean2/features/DropletApiLiveTest.java
 (2)
M 
providers/digitalocean2/src/test/java/org/jclouds/digitalocean2/internal/BaseDigitalOcean2ApiLiveTest.java
 (4)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1161.patch
https://github.com/jclouds/jclouds/pull/1161.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1161


Re: [jclouds/jclouds] OAuth filter customization per request (#1160)

2017-11-28 Thread Andrea Turli
I'd like to test this with arm and gce as well. I'll report on this thread asap

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1160#issuecomment-347476809

[jclouds/jclouds] OAuth filter customization per request (#1160)

2017-11-28 Thread Ignasi Barrera
This pull request enables a per-request customization of the OAuth properties, 
such as the audience and resource. This is useful for providers that have APIs 
that authorize different resources, such as Azure ARM and the KeyVault API.

The changes in this PR are backward-compatible and by default preserve the 
current behavior.

/cc @jmspring 
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1160

-- Commit Summary --

  * OAuth filter customization per request

-- File Changes --

A 
apis/oauth/src/main/java/org/jclouds/oauth/v2/config/OAuthConfigFactory.java 
(79)
M 
apis/oauth/src/main/java/org/jclouds/oauth/v2/filters/ClientCredentialsJWTBearerTokenFlow.java
 (29)
M 
apis/oauth/src/main/java/org/jclouds/oauth/v2/filters/ClientCredentialsSecretFlow.java
 (45)
M 
apis/oauth/src/main/java/org/jclouds/oauth/v2/filters/JWTBearerTokenFlow.java 
(17)
M 
apis/oauth/src/test/java/org/jclouds/oauth/v2/filters/TestJWTBearerTokenFlow.java
 (7)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1160.patch
https://github.com/jclouds/jclouds/pull/1160.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1160


Re: [jclouds/jclouds-labs] Implement OsImageToImage Function (#421)

2017-11-28 Thread Ignasi Barrera
nacx commented on this pull request.



> +   OsImageToImage(@Memoized final Supplier locations,
+ Function imageDescriptionToOsFamily) {
+  this.locations = locations;
+  this.imageDescriptionToOsFamily = imageDescriptionToOsFamily;
+   }
+
+   @Override
+   public Image apply(OsImage input) {
+
+  OsFamily osFamily = 
imageDescriptionToOsFamily.apply(input.description());
+  String osVersion = parseVersion(input.description());
+
+  OperatingSystem os = 
OperatingSystem.builder().name(input.name()).description(input.description())
+
.family(osFamily).version(osVersion).is64Bit(is64bit(input)).build();
+
+  return new 
ImageBuilder().id(input.id()).name(input.name()).description(input.description())

Perfect! Thanks for clarifying. Then, mind just changing the code to 
`ImageBuilder().ids(input.id())` (note the plural there)? This will set both 
the id and providerId fields.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/421#discussion_r153420444

Re: [jclouds/jclouds-labs] Implement OsImageToImage Function (#421)

2017-11-28 Thread Trevor Flanagan
trevorflanagan commented on this pull request.



> +   OsImageToImage(@Memoized final Supplier locations,
+ Function imageDescriptionToOsFamily) {
+  this.locations = locations;
+  this.imageDescriptionToOsFamily = imageDescriptionToOsFamily;
+   }
+
+   @Override
+   public Image apply(OsImage input) {
+
+  OsFamily osFamily = 
imageDescriptionToOsFamily.apply(input.description());
+  String osVersion = parseVersion(input.description());
+
+  OperatingSystem os = 
OperatingSystem.builder().name(input.name()).description(input.description())
+
.family(osFamily).version(osVersion).is64Bit(is64bit(input)).build();
+
+  return new 
ImageBuilder().id(input.id()).name(input.name()).description(input.description())

We use UUID for generating ID values and are satisfied that although a clash 
between regions is possible, the chances are very small.
Also in our API a getImages call will return images from a single region only 
and will contain images across all zones in the region.

So to answer your questions a getImage call with the ID will be enough to 
uniquely identify that Image within the region.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/421#discussion_r153419189

Re: [jclouds/jclouds-labs] Implement OsImageToImage Function (#421)

2017-11-28 Thread Ignasi Barrera
nacx commented on this pull request.



> +   OsImageToImage(@Memoized final Supplier locations,
+ Function imageDescriptionToOsFamily) {
+  this.locations = locations;
+  this.imageDescriptionToOsFamily = imageDescriptionToOsFamily;
+   }
+
+   @Override
+   public Image apply(OsImage input) {
+
+  OsFamily osFamily = 
imageDescriptionToOsFamily.apply(input.description());
+  String osVersion = parseVersion(input.description());
+
+  OperatingSystem os = 
OperatingSystem.builder().name(input.name()).description(input.description())
+
.family(osFamily).version(osVersion).is64Bit(is64bit(input)).build();
+
+  return new 
ImageBuilder().id(input.id()).name(input.name()).description(input.description())

I mean, you should think about it this way: calling 
`ComputeService.getImage(id)` with this ID will succeed? Or should the ID 
carry/encode additional info?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/421#discussion_r153417324

Re: [jclouds/jclouds-labs] Implement OsImageToImage Function (#421)

2017-11-28 Thread Ignasi Barrera
nacx commented on this pull request.



> +   OsImageToImage(@Memoized final Supplier locations,
+ Function imageDescriptionToOsFamily) {
+  this.locations = locations;
+  this.imageDescriptionToOsFamily = imageDescriptionToOsFamily;
+   }
+
+   @Override
+   public Image apply(OsImage input) {
+
+  OsFamily osFamily = 
imageDescriptionToOsFamily.apply(input.description());
+  String osVersion = parseVersion(input.description());
+
+  OperatingSystem os = 
OperatingSystem.builder().name(input.name()).description(input.description())
+
.family(osFamily).version(osVersion).is64Bit(is64bit(input)).build();
+
+  return new 
ImageBuilder().id(input.id()).name(input.name()).description(input.description())

Is it possible that that unique ID within that region collisions with a unique 
id within another region?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/421#discussion_r153417063

Re: [jclouds/jclouds-labs] Implement OsImageToImage Function (#421)

2017-11-28 Thread Trevor Flanagan
trevorflanagan commented on this pull request.



> +  this.locations = locations;
+  this.imageDescriptionToOsFamily = imageDescriptionToOsFamily;
+   }
+
+   @Override
+   public Image apply(OsImage input) {
+
+  OsFamily osFamily = 
imageDescriptionToOsFamily.apply(input.description());
+  String osVersion = parseVersion(input.description());
+
+  OperatingSystem os = 
OperatingSystem.builder().name(input.name()).description(input.description())
+
.family(osFamily).version(osVersion).is64Bit(is64bit(input)).build();
+
+  return new 
ImageBuilder().id(input.id()).name(input.name()).description(input.description())
+.status(Image.Status.AVAILABLE).operatingSystem(os).location(
+  
FluentIterable.from(locations.get()).firstMatch(LocationPredicates.idEquals(input.datacenterId()))

Image is only available in certain locations, so what I have here is valid.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/421#discussion_r153416969

Re: [jclouds/jclouds-labs] Implement OsImageToImage Function (#421)

2017-11-28 Thread Trevor Flanagan
trevorflanagan commented on this pull request.



> +   OsImageToImage(@Memoized final Supplier locations,
+ Function imageDescriptionToOsFamily) {
+  this.locations = locations;
+  this.imageDescriptionToOsFamily = imageDescriptionToOsFamily;
+   }
+
+   @Override
+   public Image apply(OsImage input) {
+
+  OsFamily osFamily = 
imageDescriptionToOsFamily.apply(input.description());
+  String osVersion = parseVersion(input.description());
+
+  OperatingSystem os = 
OperatingSystem.builder().name(input.name()).description(input.description())
+
.family(osFamily).version(osVersion).is64Bit(is64bit(input)).build();
+
+  return new 
ImageBuilder().id(input.id()).name(input.name()).description(input.description())

@nacx thanks for the background information. In DimensionData each image is 
associated with a single datacenter (zone) and will the ID will be unique 
within a Region. Therefore I will keep the `input.id()` as is.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/421#discussion_r153416810