:param always_same_link: If True use always same link between two nodes
in path. If False use different link (if available)
between two nodes if one link was used before.
:param always_same_link: If True use always same link between two nodes
in path. If False use different link (if available)
between two nodes if one link was used before.
raise RuntimeError(u"Not enough nodes to compute path")
for idx in range(0, len(nodes) - 1):
topo = Topology()
node1 = nodes[idx]
raise RuntimeError(u"Not enough nodes to compute path")
for idx in range(0, len(nodes) - 1):
topo = Topology()
node1 = nodes[idx]
links = topo.get_active_connecting_links(
node1, node2, filter_list_node1=n1_list,
filter_list_node2=n2_list
links = topo.get_active_connecting_links(
node1, node2, filter_list_node1=n1_list,
filter_list_node2=n2_list
self._path.append((interface1, node1))
self._path.append((interface2, node2))
self._path.append((interface1, node1))
self._path.append((interface2, node2))
return self._path[-2]
def compute_circular_topology(self, nodes, filter_list=None, nic_pfs=1,
return self._path[-2]
def compute_circular_topology(self, nodes, filter_list=None, nic_pfs=1,
between two nodes if one link was used before.
:param topo_has_tg: If True, the topology has a TG node. If False,
the topology consists entirely of DUT nodes.
between two nodes if one link was used before.
:param topo_has_tg: If True, the topology has a TG node. If False,
the topology consists entirely of DUT nodes.
:returns: Topology information dictionary.
:rtype: dict
:raises RuntimeError: If unsupported combination of parameters.
"""
t_dict = dict()
:returns: Topology information dictionary.
:rtype: dict
:raises RuntimeError: If unsupported combination of parameters.
"""
t_dict = dict()
for _ in range(0, nic_pfs // 2):
if topo_has_tg:
self.append_node(nodes[u"TG"])
for _ in range(0, nic_pfs // 2):
if topo_has_tg:
self.append_node(nodes[u"TG"])
# Each node has 2 interfaces, starting with 1
# Calculate prefixes appropriately for current
# path topology nomenclature:
# Each node has 2 interfaces, starting with 1
# Calculate prefixes appropriately for current
# path topology nomenclature: