Beispiel #1
0
 def delete_service_instance(instance_id: str = None):  # -> None:
     if instance_id:
         if ServiceInstanceAdapter.exists_in_db(instance_id):
             ServiceInstanceAdapter.delete(instance_id)
             return 'Instance Deleted', 200
         else:
             return 'Instance ID not found', 500
     else:
         LastOperationAdapter.delete_all()
         ServiceInstanceAdapter.delete_all()
         return 'Deleted all Instances', 200
 def test_adapter_delete(self):
     with self.assertRaises(Exception):
         Adapter.delete(id_name='')