grr/test_lib/flow_test_lib.py
def FinishAllFlowsOnClient(client_id, **kwargs):
  """Finishes all running flows on a client (AFF4/REL_DB compatible)."""
  if isinstance(client_id, rdfvalue.RDFURN):
    client_id = client_id.Basename()

  if data_store.RelationalDBFlowsEnabled():
    for cur_flow in data_store.REL_DB.ReadAllFlowObjects(client_id=client_id):
      RunFlow(client_id, cur_flow.flow_id, **kwargs)
  else:
    fd = aff4.FACTORY.Open(rdfvalue.RDFURN(client_id).Add("flows"))
    flows = list(fd.OpenChildren())
    for flow_fd in flows:
      TestFlowHelper(
          flow_fd.urn,
          client_id=client_id,
          token=access_control.ACLToken(username=flow_fd.creator),
          **kwargs)
Finishes all running flows on a client (AFF4/REL_DB compatible).
Finishes all running flows on a client (AFF4/REL_DB compatible).
Finishes all running flows on a client ( AFF4 / REL_DB compatible ) .
def FinishAllFlowsOnClient(client_id, **kwargs):
  if isinstance(client_id, rdfvalue.RDFURN):
    client_id = client_id.Basename()
  if data_store.RelationalDBFlowsEnabled():
    for cur_flow in data_store.REL_DB.ReadAllFlowObjects(client_id=client_id):
      RunFlow(client_id, cur_flow.flow_id, **kwargs)
  else:
    fd = aff4.FACTORY.Open(rdfvalue.RDFURN(client_id).Add("flows"))
    flows = list(fd.OpenChildren())
    for flow_fd in flows:
      TestFlowHelper(
          flow_fd.urn,
          client_id=client_id,
          token=access_control.ACLToken(username=flow_fd.creator),
          **kwargs)
def FinishAllFlowsOnClient ( client_id , ** kwargs ) : if isinstance ( client_id , rdfvalue . RDFURN ) : client_id = client_id . Basename ( ) if data_store . RelationalDBFlowsEnabled ( ) : for cur_flow in data_store . REL_DB . ReadAllFlowObjects ( client_id = client_id ) : RunFlow ( client_id , cur_flow . flow_id , ** kwargs ) else : fd = aff4 . FACTORY . Open ( rdfvalue . RDFURN ( client_id ) . Add ( "flows" ) ) flows = list ( fd . OpenChildren ( ) ) for flow_fd in flows : TestFlowHelper ( flow_fd . urn , client_id = client_id , token = access_control . ACLToken ( username = flow_fd . creator ) , ** kwargs )
Finishes all running flows on a client (AFF4/REL_DB compatible).
Finishes all running flows on a client ( AFF4 / REL_DB compatible ) .
"""Finishes all running flows on a client (AFF4/REL_DB compatible)."""
client_id