Skip to content

Commit 8283b5a

Browse files
committed
Invoke ordering temporarily
This is an example of the usage on the new Network_device_order module. It will be removed or updated in upcoming pull requests. Signed-off-by: Ming Lu <[email protected]>
1 parent 305fc11 commit 8283b5a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ocaml/networkd/bin/network_server.ml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,22 @@ let on_startup () =
15611561
try
15621562
(* the following is best-effort *)
15631563
read_config () ;
1564+
let _new_order =
1565+
let last_order =
1566+
match !config.interface_order with
1567+
| None ->
1568+
(* Support backwards compatibility *)
1569+
Some []
1570+
| Some [] ->
1571+
(* Reset network by removing networkd db *)
1572+
Some []
1573+
| last_order ->
1574+
(* The order generated last time *)
1575+
last_order
1576+
in
1577+
Network_device_order.generate last_order
1578+
in
1579+
(*TODO: upadte config with the [_new_order] *)
15641580
remove_centos_config () ;
15651581
if !backend_kind = Openvswitch then
15661582
Ovs.set_max_idle 5000 ;

0 commit comments

Comments
 (0)