FIX: ovs-ofctl missing flow table issue
This commit is contained in:
+13
-1
@@ -43,10 +43,13 @@ class PlannedNode:
|
||||
Args:
|
||||
name: Logical node name used by Mininet.
|
||||
type: Concrete semantic node type to create.
|
||||
switch_fail_mode: Optional Open vSwitch fail mode selected by the
|
||||
planner for switch nodes. Non-switch nodes leave this unset.
|
||||
"""
|
||||
|
||||
name: str
|
||||
type: NodeType
|
||||
switch_fail_mode: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -275,7 +278,13 @@ def _plan_nodes(topology: Topology) -> Tuple[PlannedNode, ...]:
|
||||
"""
|
||||
|
||||
return tuple(
|
||||
PlannedNode(name=node.name, type=node.type)
|
||||
PlannedNode(
|
||||
name=node.name,
|
||||
type=node.type,
|
||||
switch_fail_mode=(
|
||||
"standalone" if node.type is NodeType.SWITCH else None
|
||||
),
|
||||
)
|
||||
for node in topology.nodes
|
||||
)
|
||||
|
||||
@@ -797,6 +806,9 @@ def _self_test() -> None:
|
||||
|
||||
assert len(execution_plan.nodes) == 3
|
||||
assert len(execution_plan.links) == 2
|
||||
assert next(
|
||||
node for node in execution_plan.nodes if node.name == "s1"
|
||||
).switch_fail_mode == "standalone"
|
||||
assert execution_plan.links[0].endpoints[1].logical_interface == "client"
|
||||
assert execution_plan.links[0].endpoints[0].interface_name == "h1-eth0"
|
||||
assert execution_plan.links[1].endpoints[0].interface_name == "r0-eth0"
|
||||
|
||||
Reference in New Issue
Block a user