This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DATALAB-2321
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/DATALAB-2321 by this push:
new 8fdb34d [DATALAB-2321]: added rule removal
8fdb34d is described below
commit 8fdb34dc48823119b88e5c6069ebcd4b8aad559a
Author: leonidfrolov <[email protected]>
AuthorDate: Tue May 18 10:13:25 2021 +0300
[DATALAB-2321]: added rule removal
---
.../src/general/scripts/azure/ssn_terminate.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/infrastructure-provisioning/src/general/scripts/azure/ssn_terminate.py
b/infrastructure-provisioning/src/general/scripts/azure/ssn_terminate.py
index 5b930c8..682059b 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/ssn_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_terminate.py
@@ -133,11 +133,11 @@ def terminate_ssn_node(resource_group_name,
service_base_name, vpc_name, region)
print(str(AzureMeta.list_security_group_rules(resource_group_name,
os.environ['azure_edge_security_group_name'])))
for rule in
AzureMeta.list_security_group_rules(resource_group_name,
os.environ['azure_edge_security_group_name']):
print('=======')
- print(rule['name'])
- #rule_name = str(rule)[str(rule).find("'name': '") + 9 :
str(rule).find("', 'etag':")]
- #print(rule_name)
-
#AzureActions.remove_security_rules(os.environ['azure_edge_security_group_name'],
- #resource_group_name, rule_name)
+ rule_name = str(rule)[str(rule).find("'name': '") + 9 :
str(rule).find("', 'etag':")]
+ print(rule_name)
+ if service_base_name in rule_name:
+
AzureActions.remove_security_rules(os.environ['azure_edge_security_group_name'],
+ resource_group_name, rule_name)
except Exception as err:
datalab.fab.append_result("Failed to remove rules in predefined edge
security group", str(err))
sys.exit(1)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]