Skip to content

Commit 2f905f3

Browse files
huangtianhuakiwik
authored andcommitted
Clean up secgroup_2 for fusioncloud job (apache#417)
Sometimes secgroup_2 is residue after fusioncloud job running, clean up it. And also clean up port resource. Closes: theopenlab/openlab#170
1 parent 6b837ad commit 2f905f3

File tree

1 file changed

+2
-2
lines changed
  • playbooks/terraform-provider-huaweicloud-acceptance-test-fusioncloud

1 file changed

+2
-2
lines changed

playbooks/terraform-provider-huaweicloud-acceptance-test-fusioncloud/post.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
openstack server delete `openstack server list -f value -c ID -c Name |grep instance_1 |awk '{ print $1 }'` || true
1616
openstack volume delete `openstack volume list -f value -c ID -c Name |grep -E 'volume_1|vol_1' |awk '{ print $1 }'` || true
1717
neutron lbaas-loadbalancer-delete `neutron lbaas-loadbalancer-list -f value -c ID -c Name |grep loadbalancer_1 |awk '{ print $1 }'` || true
18-
openstack port delete `openstack port list -f value -c ID -c Name |grep port_1 |awk '{ print $1 }'` || true
18+
openstack port delete `openstack port list -f value -c ID -c Name |grep -E 'port_1|port_2' |awk '{ print $1 }'` || true
1919
openstack subnet delete `openstack subnet list -f value -c ID -c Name |grep -E 'tf_test_subnet|subnet_1|huaweicloud_subnet' |awk '{ print $1 }'` || true
2020
openstack network delete `openstack network list -f value -c ID -c Name |grep -E 'tf_test_network|network_1' |awk '{ print $1 }'` || true
2121
openstack router delete `openstack router list -f value -c ID -c Name |grep -E 'test_vpc|vpc_test|vpc_test1|router_1|router_2|terraform_provider_test|terraform_provider_test1|terraform-testacc-vpc-data-source' |awk '{ print $1 }'` || true
2222
openstack image delete `openstack image list -f value -c ID -c Name |grep -E 'CirrOS-tf|Rancher TerraformAccTest' |awk '{ print $1 }'` || true
2323
openstack keypair delete `openstack keypair list -f value -c Name |grep -E 'hth_key|kp_1'` || true
24-
openstack security group delete `openstack security group list -f value -c ID -c Name |grep -E 'sg_|secgroup_1' |awk '{ print $1 }'` || true
24+
openstack security group delete `openstack security group list -f value -c ID -c Name |grep -E 'sg_|secgroup_1|secgroup_2' |awk '{ print $1 }'` || true
2525
openstack floating ip delete `openstack floating ip list -f value -c ID -c Port |grep 'None' |awk '{ print $1 }'` || true
2626
executable: /bin/bash
2727
environment: '{{ global_env }}'

0 commit comments

Comments
 (0)