FTS2Graph

mod:FTSGraph

synopsis:FTS graph

nodes are FTS sites sites and edges are routes between them

class DIRAC.DataManagementSystem.private.FTS2.FTS2Graph.FTS2Graph(name, ftsHistoryViews=None, accFailureRate=None, accFailedFiles=None, schedulingType=None, maxActiveJobs=None)

Bases: DIRAC.Core.Utilities.Graph.Graph

class FTSGraph

graph holding FTS transfers (edges) and sites (nodes)

POSTORDER

POSTORDER getter

PREORDER

PREORDER getter

__init__(name, ftsHistoryViews=None, accFailureRate=None, accFailedFiles=None, schedulingType=None, maxActiveJobs=None)

c’tor

Parameters:
  • name (str) – graph name
  • ftsHistoryViews (list) – list with FTSHistoryViews
  • accFailureRate (float) – acceptable failure rate
  • accFailedFiles (int) – acceptable failed files
  • schedulingType (str) – scheduling type
addEdge(edge)

Add edge :edge: to the graph

addNode(node)

Add Node :node: to graph

bfs(preVisit=None, postVisit=None)

bfs walk

connect(fromNode, toNode, rwAttrs=None, roAttrs=None)

Connect :fromNode: to :toNode: with edge of attributes

dfs(preVisit=None, postVisit=None)

dfs recursive walk

dfsIter(preVisit=None, postVisit=None)

Iterative dfs - no recursion

edges()

Get edges dict

explore(node, preVisit=None, postVisit=None)

Explore node

findRoute(fromSE, toSE)

find route between :fromSE: and :toSE:

ftsSites()

get fts site list

getEdge(edgeName)

Get edge :edgeName:

getNode(nodeName)

Get node :nodeName:

initialize(ftsHistoryViews=None)

initialize FTSGraph given FTSSites and FTSHistoryViews

Parameters:
  • ftsSites (list) – list with FTSSites instances
  • ftsHistoryViews (list) – list with FTSHistoryViews instances
makeProperty(name, value, readOnly=False)

Add property :name: to class

This also creates a private :_name: attribute If you want to make read only property, set :readOnly: flag to True :warn: could raise AttributeError if :name: of :_name: is already defined as an attribute

nodes()

Get nodes dict

reset()

Set visited for all nodes to False

rssClient()

RSS client getter

updateRWAccess()

get RSS R/W for :seList:

Parameters:seList (list) – SE list
walkAll(nodeFcn=None, edgeFcn=None, res=None)

Wall all nodes excuting :nodeFcn: on each node and :edgeFcn: on each edge result is a dict { Node.name : result from :nodeFcn:, Edge.name : result from edgeFcn }

walkNode(node, nodeFcn=None, edgeFcn=None, res=None)

Walk through the graph calling nodeFcn on nodes and edgeFcn on edges

class DIRAC.DataManagementSystem.private.FTS2.FTS2Graph.Route(fromNode, toNode, rwAttrs=None, roAttrs=None)

Bases: DIRAC.Core.Utilities.Graph.Edge

class Route

class representing transfers between sites

__init__(fromNode, toNode, rwAttrs=None, roAttrs=None)

c’tor

isActive

check activity of this channel

makeProperty(name, value, readOnly=False)

Add property :name: to class

This also creates a private :_name: attribute If you want to make read only property, set :readOnly: flag to True :warn: could raise AttributeError if :name: of :_name: is already defined as an attribute

timeToStart

get time to start for this channel

class DIRAC.DataManagementSystem.private.FTS2.FTS2Graph.Site(name, rwAttrs=None, roAttrs=None)

Bases: DIRAC.Core.Utilities.Graph.Node

class Site

not too much here, inherited to change the name

__init__(name, rwAttrs=None, roAttrs=None)

c’tor

addEdge(edge)

Add edge to the node

connect(other, rwAttrs=None, roAttrs=None)

Connect self to Node :other: with edge attibutes rw :rwAttrs: and ro :roAttrs:

edges()

get edges

makeProperty(name, value, readOnly=False)

Add property :name: to class

This also creates a private :_name: attribute If you want to make read only property, set :readOnly: flag to True :warn: could raise AttributeError if :name: of :_name: is already defined as an attribute