The segments belong to a single network only. You can use this field to execute or not the scheduling:
for network_id in network_ids:
for segment in (s for s in segments if s['network_id'] == network_id): self._schedule_network( payload.context, network_id, dhcp_notifier, candidate_hosts=segment['hosts'])
In each "network_id" loop, only those segments belonging to this network will be scheduled; each segment will be scheduled only once.
Hello Sahid:
Good catch.
The segments belong to a single network only. You can use this field to execute or not the scheduling:
for network_id in network_ids:
self. _schedule_ network(
payload. context, network_id, dhcp_notifier,
candidate _hosts= segment[ 'hosts' ])
for segment in (s for s in segments if s['network_id'] == network_id):
In each "network_id" loop, only those segments belonging to this network will be scheduled; each segment will be scheduled only once.
Thanks again for the bug report.
Regards.