Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
Squashed and pushed to [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/550ca7d5) and [2.0.x](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/e4e42454). Thanks @danielestevez! -- 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/360#issuecomment-280646572
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
Closed #360. -- 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/360#event-966854389
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
danielestevez commented on this pull request. > @@ -123,8 +123,7 @@ public Image call() throws Exception { Image image = resourceDefinitionToImage.create(cloneTemplate.getSourceNodeId(), cloneTemplate.getName()) .apply(definitions.get(0)); -checkState(image != null, "Image %s was not created for the requested node", - cloneTemplate.getSourceNodeId()); +checkState(image != null, "Image for node %s was not be created", cloneTemplate.getSourceNodeId()); oops, sorry -- 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/360#discussion_r101752563
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
@danielestevez pushed 1 commit. fe3a13b Fixes log message again -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/360/files/fee81c55eff009ed917785036decd884ca105b50..fe3a13bd07d2927ab4f69c8e1ce8ee451c048857
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
nacx requested changes on this pull request. > @@ -123,8 +123,7 @@ public Image call() throws Exception { Image image = resourceDefinitionToImage.create(cloneTemplate.getSourceNodeId(), cloneTemplate.getName()) .apply(definitions.get(0)); -checkState(image != null, "Image %s was not created for the requested node", - cloneTemplate.getSourceNodeId()); +checkState(image != null, "Image for node %s was not be created", cloneTemplate.getSourceNodeId()); "was not **be** created?" :) -- 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/360#pullrequestreview-22490923
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
@danielestevez pushed 1 commit. fee81c5 Fixes missing log message -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/360/files/c24e690f26b4e3fae5b3663f129f8e4bdcfa20b7..fee81c55eff009ed917785036decd884ca105b50
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
@danielestevez pushed 1 commit. c24e690 Changes log message -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/360/files/a79e560de96d32abaf8bf52a2b093bc39523687a..c24e690f26b4e3fae5b3663f129f8e4bdcfa20b7
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
@danielestevez pushed 1 commit. 92d3336 Overrides tests -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/360/files/a79e560de96d32abaf8bf52a2b093bc39523687a..92d3336bc6fb3b2ff61b17c1a64ba1d5030dd7c2
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
nacx commented on this pull request. > @@ -123,6 +123,8 @@ public Image call() throws Exception { Image image = resourceDefinitionToImage.create(cloneTemplate.getSourceNodeId(), cloneTemplate.getName()) .apply(definitions.get(0)); +checkState(image != null, "Image %s was not created for the requested node", + cloneTemplate.getSourceNodeId()); The log parameter is the id of the node. Better use a message like "Image *for node %s*..." -- 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/360#pullrequestreview-21192416
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
nacx commented on this pull request. > @@ -123,6 +123,9 @@ ResourceGroup resourceGroup = resourceGroupMap.getUnchecked(regionAndId.region()); VirtualMachine vm = api.getVirtualMachineApi(resourceGroup.name()).get(regionAndId.id()); I'd say it is ok as-is? taht check would throw a NPE, but in this case an IAE makes more sense? -- 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/360
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
@danielestevez pushed 1 commit. a79e560 Returns null image if node not found -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/360/files/7791b58e5791835f920b7c83cfc630821d1be402..a79e560de96d32abaf8bf52a2b093bc39523687a
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
andreaturli commented on this pull request. > @@ -123,6 +123,9 @@ ResourceGroup resourceGroup = resourceGroupMap.getUnchecked(regionAndId.region()); VirtualMachine vm = api.getVirtualMachineApi(resourceGroup.name()).get(regionAndId.id()); Can you use checkNotNull, maybe? > @@ -68,6 +68,9 @@ public Image apply(ResourceDefinition input) { ResourceGroup resourceGroup = resourceGroupMap.getUnchecked(regionAndId.region()); VirtualMachine vm = api.getVirtualMachineApi(resourceGroup.name()).get(regionAndId.id()); + if (vm == null) { Same as above -- 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/360#pullrequestreview-21102418
[jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-labs/pull/360 -- Commit Summary -- * Checks existence of node before getting SecurityGroups and Images -- File Changes -- M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java (3) M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/ResourceDefinitionToCustomImage.java (3) -- Patch Links -- https://github.com/jclouds/jclouds-labs/pull/360.patch https://github.com/jclouds/jclouds-labs/pull/360.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-labs/pull/360