Skip to content

Commit 83876bc

Browse files
committed
fix the remainign_bw assignment in partially groomed demands
1 parent 0741a61 commit 83876bc

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

fusion/core/sdn_controller.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,7 @@ def _handle_congestion_with_grooming(self, remaining_bw: int) -> None:
496496
self.sdn_props.was_partially_routed = False
497497

498498
if getattr(self.sdn_props, "was_partially_groomed", False):
499-
# Type ignore: remaining_bw can be list or int depending on context
500-
self.sdn_props.remaining_bw = (
501-
self.sdn_props.lightpath_bandwidth_list # type: ignore[assignment]
502-
)
499+
self.sdn_props.remaining_bw = int(self.sdn_props.bandwidth) - sum(map(int, self.sdn_props.bandwidth_list))
503500
else:
504501
if self.sdn_props.bandwidth is not None:
505502
self.sdn_props.remaining_bw = int(self.sdn_props.bandwidth)

0 commit comments

Comments
 (0)