You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/04/08 14:58:37 UTC

[incubator-dlab] branch DLAB-594 updated: [DLAB-594]: Fixed issue second VPC

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

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


The following commit(s) were added to refs/heads/DLAB-594 by this push:
     new 74788b1  [DLAB-594]: Fixed issue second VPC
74788b1 is described below

commit 74788b1b50cf0694ca0e340b2d2778d2a1012aa3
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Mon Apr 8 17:58:29 2019 +0300

    [DLAB-594]: Fixed issue second VPC
---
 .../src/general/scripts/aws/ssn_configure.py       | 24 +++++++++++++
 .../src/general/scripts/aws/ssn_prepare.py         | 40 ++++++++++++++++++++++
 2 files changed, 64 insertions(+)

diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py
index a8983f2..6bd253d 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py
@@ -164,6 +164,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -200,6 +204,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -241,6 +249,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -290,6 +302,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -394,6 +410,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -475,6 +495,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
index 3b91746..b4ec9d7 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
@@ -165,6 +165,10 @@ if __name__ == "__main__":
                         print("Subnet hasn't been created.")
                     remove_vpc(os.environ['aws_vpc_id'])
                 if pre_defined_vpc2:
+                    try:
+                        remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+                    except:
+                        print("There are no VPC Endpoints")
                     remove_route_tables(tag2_name, True)
                     remove_vpc(os.environ['aws_vpc2_id'])
                 sys.exit(1)
@@ -193,6 +197,10 @@ if __name__ == "__main__":
                     remove_vpc(os.environ['aws_vpc_id'])
                 if pre_defined_vpc2:
                     remove_peering('*')
+                    try:
+                        remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+                    except:
+                        print("There are no VPC Endpoints")
                     remove_route_tables(tag2_name, True)
                     remove_vpc(os.environ['aws_vpc2_id'])
                 sys.exit(1)
@@ -267,6 +275,10 @@ if __name__ == "__main__":
                     remove_vpc(os.environ['aws_vpc_id'])
                 if pre_defined_vpc2:
                     remove_peering('*')
+                    try:
+                        remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+                    except:
+                        print("There are no VPC Endpoints")
                     remove_route_tables(tag2_name, True)
                     remove_vpc(os.environ['aws_vpc2_id'])
                 sys.exit(1)
@@ -294,6 +306,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -322,6 +338,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -351,6 +371,10 @@ if __name__ == "__main__":
                 remove_vpc(os.environ['aws_vpc_id'])
             if pre_defined_vpc2:
                 remove_peering('*')
+                try:
+                    remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+                except:
+                    print("There are no VPC Endpoints")
                 remove_route_tables(tag2_name, True)
                 remove_vpc(os.environ['aws_vpc2_id'])
             sys.exit(1)
@@ -389,6 +413,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -423,6 +451,10 @@ if __name__ == "__main__":
             remove_vpc(os.environ['aws_vpc_id'])
         if pre_defined_vpc2:
             remove_peering('*')
+            try:
+                remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+            except:
+                print("There are no VPC Endpoints")
             remove_route_tables(tag2_name, True)
             remove_vpc(os.environ['aws_vpc2_id'])
         sys.exit(1)
@@ -460,6 +492,10 @@ if __name__ == "__main__":
                 remove_vpc(os.environ['aws_vpc_id'])
             if pre_defined_vpc2:
                 remove_peering('*')
+                try:
+                    remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+                except:
+                    print("There are no VPC Endpoints")
                 remove_route_tables(tag2_name, True)
                 remove_vpc(os.environ['aws_vpc2_id'])
             sys.exit(1)
@@ -497,6 +533,10 @@ if __name__ == "__main__":
                 remove_vpc(os.environ['aws_vpc_id'])
             if pre_defined_vpc2:
                 remove_peering('*')
+                try:
+                    remove_vpc_endpoints(os.environ['aws_vpc2_id'])
+                except:
+                    print("There are no VPC Endpoints")
                 remove_route_tables(tag2_name, True)
                 remove_vpc(os.environ['aws_vpc2_id'])
             sys.exit(1)


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