noc.core.topology.constraint.base

Module Contents

class noc.core.topology.constraint.base.BaseConstraint

Bases: object

is_valid_neighbor(self, current, neighbor)

Check if neighbor is valid neighbor for the path

Parameters:
  • current – Current Managed Object
  • neighbor – Neighbor Managed Object
Returns:

True if path can be continued via neighbors

Check if link is valid on the path :param link: Link instance :return:

is_valid_interface(self, interface)

Check if interface is valid interface on the path

Parameters:interface
Returns:
is_valid_egress(self, interface)

Check if egress interface is valid interface on the path

Parameters:interface – Interface instance
Returns:True if path can be continued across the interface
is_valid_ingress(self, interface)

Check if ingress interface is valid interface on the path

Parameters:interface – Interface instance
Returns:True if path can be continued across the interface
__neg__(self)
__and__(self, other)
__or__(self, other)
class noc.core.topology.constraint.base.AndConstraint(left, right)

Bases: noc.core.topology.constraint.base.BaseConstraint

is_valid_neighbor(self, current, neighbor)
is_valid_interface(self, interface)
is_valid_ingress(self, interface)
is_valid_egress(self, interface)
class noc.core.topology.constraint.base.OrConstraint(left, right)

Bases: noc.core.topology.constraint.base.BaseConstraint

is_valid_neighbor(self, current, neighbor)
is_valid_interface(self, interface)
is_valid_ingress(self, interface)
is_valid_egress(self, interface)
class noc.core.topology.constraint.base.NotConstraint(constraint)

Bases: noc.core.topology.constraint.base.BaseConstraint

is_valid_neighbor(self, current, neighbor)
is_valid_interface(self, interface)
is_valid_ingress(self, interface)
is_valid_egress(self, interface)