File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ def _clean_dl_records(self):
6868 if resp is not None :
6969 for record in resp :
7070 gateway_id = record .get ("id" )
71- if ("SDK-PY" in record .get ("name" )) and (
72- "delet" not in record .get ("operational_status" )):
71+ if ("SDK-PY-DL-PROVIDER " in record .get ("name" )) and (
72+ ( "delet" not in record .get ("operational_status" )) and ( "progress" not in record . get ( "operational_status" ) )):
7373 self .delete_provider_gateway (gateway_id = gateway_id )
7474
75- #clean up records in client account
75+ #clean up the above deleted records in client account
7676 print ("Clean dl records" )
7777 response = self .dl .list_gateways ()
7878 assert response is not None
@@ -81,9 +81,9 @@ def _clean_dl_records(self):
8181 if resp is not None :
8282 for record in resp :
8383 gateway_id = record .get ("id" )
84- if ("SDK-PY" in record .get ("name" )) and (
84+ if ("SDK-PY-DL-PROVIDER " in record .get ("name" )) and (
8585 ("delet" not in record .get ("operational_status" )) and ("progress" not in record .get ("operational_status" ))):
86- self .delete_gateway ( gateway_id = gateway_id )
86+ self .dl . create_gateway_action ( id = gateway_id , action = "delete_gateway_approve" )
8787
8888 def delete_gateway (self , gateway_id ):
8989 response = self .dl .create_gateway_action (id = gateway_id , action = "delete_gateway_approve" )
Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ def _clean_dl_records(self):
7474 self .delete_connection (gateway_id = gateway_id ,
7575 conn_id = conn_record .get ("id" ))
7676
77- if ("SDK-PY" in record .get ("name" )) and (
78- "delet" not in record .get ("operational_status" )):
77+ if ("SDK-PY" in record .get ("name" ) and "PROVIDER" not in record . get ( "name" ) ) and (
78+ ( "delet" not in record .get ("operational_status" )) and ( "progress" not in record . get ( "operational_status" ) )):
7979 self .delete_gateway (gateway_id = gateway_id )
8080
8181 def delete_gateway (self , gateway_id ):
You can’t perform that action at this time.
0 commit comments