You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/03/19 14:12:05 UTC

[incubator-dlab] 01/02: [DLAB-1642]: added removal of project specific image during project termination

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-1642
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 3639d241de0543c1868ea1accf4414902ada5cc8
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Mar 19 12:07:46 2020 +0200

    [DLAB-1642]: added removal of project specific image during project termination
---
 .../src/general/scripts/gcp/project_terminate.py               | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py b/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
index 0f5b5bf..4fb855e 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
@@ -87,6 +87,16 @@ def terminate_edge_node(endpoint_name, project_name, service_base_name, region,
         dlab.fab.append_result("Failed to remove storage buckets", str(err))
         sys.exit(1)
 
+    print("Removing project specific images")
+    try:
+        images = GCPMeta().get_list_images(args.service_base_name)
+        if 'items' in images:
+            for i in images['items']:
+                GCPActions().remove_image(i['name'])
+    except Exception as err:
+        print('Error: {0}'.format(err))
+        sys.exit(1)
+
     print("Removing firewalls")
     try:
         firewalls = GCPMeta.get_list_firewalls(base)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org