def user_unreg_fs(request):
    profile = UserProfile.get_or_create_profile(request.user)
    if (profile.is_net_admin):
        return HttpResponseRedirect("/dashboard")
    
    error_msg = []
    if (request.method == "POST"):
        fs_changed = False
        for key in request.POST:
            verified = re.match(r"verif_(?P<id>\d+)",key)
            pending = re.match(r"pend_(?P<id>\d+)",key)
            try:
                status = 0
                if (verified):
                    key_id = verified.group("id")
                    status = 1
                elif (pending):
                    key_id =pending.group("id")
                    status = 2
            except:
                continue
            if (status == 1):
                fs_changed = True
                try:
                    UserFlowSpace.objects.get(id=int(key_id)).delete()
                except:
                    error_msg.append("Invalid id(%s) found in the request.POST for user flowspace."%key_id)
            elif (status == 2):
                try:
                    RequestedUserFlowSpace.objects.get(id=int(key_id)).delete()
                except:
                    error_msg.append("Invalid id(%s) found in the request.POST for user pending flowspace."%key_id)

        if fs_changed:
            [fv_args, match_list] = update_user_opts(request.user)
            try:
                fv = FVServerProxy.objects.all()[0]
                try:
                    if len(fv_args) > 0:
                        returned_ids = fv.proxy.api.changeFlowSpace(fv_args)
                    for i in range(len(match_list)):
                        match_list[i].fv_id = returned_ids[i]
                        match_list[i].save()
                except Exception,e:
                    import traceback
                    traceback.print_exc()
                    transaction.rollback()
                    error_msg.append("Couldn't update user opts after deleting the flowspace: %s"%str(e))
            except Exception,e:
                import traceback
                traceback.print_exc()
                transaction.rollback()
                error_msg.append("Flowvisor not set: %s"%str(e))
            
        
            
    userfs = UserFlowSpace.objects.filter(user=request.user)
    reqfs = RequestedUserFlowSpace.objects.filter(user=request.user)
    return simple.direct_to_template(request, 
            template = "openflow/optin_manager/admin_manager/user_unreg_fs.html",
            extra_context = {
                    'reqfs': reqfs,
                    'userfs': userfs,
                    'user':request.user,
                    'error_msg':error_msg,
               },
        )
Case search action should be added to case list
dataset/ETHPy150Open fp7-ofelia/ocf/optin_manager/src/python/openflow/optin_manager/admin_manager/views.py/user_unreg_fs--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/tests/test_suite_sync_request.py/SyncRequestSuiteTest.test_case_search_action