Skip to content

Commit e9d08c8

Browse files
author
earthmant
committed
delete networks bug
1 parent f479e0b commit e9d08c8

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

cloudify_vcd/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ def get_last_task(task):
397397
def vcd_busy_exception(exc):
398398
if 'is busy, cannot proceed with the operation' in str(exc):
399399
return True
400+
elif 'cannot be deleted, because it is in use' in str(exc):
401+
return True
400402
return False
401403

402404

test.yaml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -136,29 +136,29 @@ node_templates:
136136
# - type: cloudify.relationships.depends_on
137137
# target: routed_network2
138138
#
139-
# firewall_rules:
140-
# type: cloudify.nodes.vcloud.FirewallRules
141-
# properties:
142-
# client_config: *client_config
143-
# resource_id: firewall_rules
144-
# resource_config:
145-
# test_rule1:
146-
# source_values:
147-
# - 'VLAN-102:gatewayinterface'
148-
# - { concat: [ { get_property: [ routed_network, resource_id ] }, ':network']}
149-
# - '192.170.1.0:ip'
150-
# destination_values:
151-
# - 'VLAN-102:gatewayinterface'
152-
# - { concat: [ { get_property: [ routed_network2, resource_id ] }, ':network']}
153-
# - '192.170.1.0:ip'
154-
# services: [{'tcp': {'any': 'any'}}]
155-
# relationships:
156-
# - type: cloudify.relationships.vcloud.firewall_rules_contained_in_gateway
157-
# target: gateway
158-
# - type: cloudify.relationships.depends_on
159-
# target: routed_network
160-
# - type: cloudify.relationships.depends_on
161-
# target: routed_network2
139+
firewall_rules:
140+
type: cloudify.nodes.vcloud.FirewallRules
141+
properties:
142+
client_config: *client_config
143+
resource_id: firewall_rules
144+
resource_config:
145+
test_rule1:
146+
source_values:
147+
- 'VLAN-102:gatewayinterface'
148+
- { concat: [ { get_property: [ routed_network, resource_id ] }, ':network']}
149+
- '192.170.1.0:ip'
150+
destination_values:
151+
- 'VLAN-102:gatewayinterface'
152+
- { concat: [ { get_property: [ routed_network2, resource_id ] }, ':network']}
153+
- '192.170.1.0:ip'
154+
services: [{'tcp': {'any': 'any'}}]
155+
relationships:
156+
- type: cloudify.relationships.vcloud.firewall_rules_contained_in_gateway
157+
target: gateway
158+
- type: cloudify.relationships.depends_on
159+
target: routed_network
160+
- type: cloudify.relationships.depends_on
161+
target: routed_network2
162162

163163
# isolated_network:
164164
# type: cloudify.nodes.vcloud.IsolatedVDCNetwork

0 commit comments

Comments
 (0)