nacx commented on a change in pull request #30: Checks provisioning state in
Rule resource instead of Group
URL: https://github.com/apache/jclouds/pull/30#discussion_r284597178
##########
File path:
providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/extensions/AzureComputeSecurityGroupExtension.java
##########
@@ -294,10 +294,11 @@ public boolean apply(NetworkSecurityRule input) {
for (NetworkSecurityRule matchingRule : rules) {
logger.debug(">> deleting network security rule %s from %s...",
matchingRule.name(), group.getName());
- ruleApi.delete(matchingRule.name());
- checkState(
-
securityGroupAvailable.create(resourceGroupAndName.resourceGroup()).apply(networkSecurityGroup.name()),
- "Security group was not updated in the configured timeout");
+ URI uri = ruleApi.delete(matchingRule.name());
+ if (uri != null) {
+ checkState(resourceDeleted.apply(uri), "Rule %s could not be
deleted", matchingRule.id());
Review comment:
You are just waiting for a certain period, so you don't actually know if the
rule is gonna be deleted in the end
```suggestion
checkState(resourceDeleted.apply(uri), "Rule %s was not be
deleted in the configured timeout", matchingRule.id());
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services