noc.core.topology.goal.base

Module Contents

class noc.core.topology.goal.base.BaseGoal

Bases: object

DEFAULT_COST = 1
DROP_COST = 16777215
cost_estimate(self, neighbor, current=None)

Heuristic cost estimate for A* algorithm. Cost of going to the goal across this path from current to neighbor node

Parameters:
  • neighbor – Neighbor ManagedObject instance
  • current – optional Current ManagedObject instance
Returns:

Cost estimate

is_goal(self, obj)

Check object is valid goal (end of path)

Parameters:obj – ManagedObject
Returns:True, if obj is the end of path
__neg__(self)
__and__(self, other)
__or__(self, other)
class noc.core.topology.goal.base.AndGoal(left, right)

Bases: noc.core.topology.goal.base.BaseGoal

cost_estimate(self, neighbor, current=None)
is_goal(self, obj)
class noc.core.topology.goal.base.OrGoal(left, right)

Bases: noc.core.topology.goal.base.BaseGoal

cost_estimate(self, neighbor, current=None)
is_goal(self, obj)
class noc.core.topology.goal.base.NotGoal(goal)

Bases: noc.core.topology.goal.base.BaseGoal

is_goal(self, obj)