

def stop_app(self, app_id):
    if (app_id == 'kube-system'):
        return
    try:
        self._remove_proxy_route(app_id)
        stop_cmd = ['kubectl.sh', 'stop', 'pods,services,replicationControllers', '--all', '--namespace={}'.format(app_id)]
        cleanup_cmd = ['kubectl.sh', 'delete', 'namespace', app_id]
        subprocess.check_call(stop_cmd)
        subprocess.check_call(cleanup_cmd)
        info_log(self.TAG, 'Stopped app {}'.format(app_id))
    except subprocess.CalledProcessError as e:
        error_log(self.TAG, 'Could not stop app {}'.format(app_id))

dataset/ETHPy150Open binder-project/binder/binder/cluster.py KubernetesManager.stop_app/original