@@ -735,7 +735,7 @@ module Bridge = struct
735735 * device name or not on the requested bridge is bad. *)
736736 if parent' = parent && vlan' = vlan &&
737737 (device <> vlan_name || not (List. mem device bridge_interfaces)) then
738- raise (Vlan_in_use (parent, vlan))
738+ raise (Network_error ( Vlan_in_use (parent, vlan) ))
739739 ) (Proc. get_vlans () );
740740 (* Robustness enhancement: ensure there are no other VLANs in the bridge *)
741741 let current_interfaces = List. filter (fun n ->
@@ -817,7 +817,7 @@ module Bridge = struct
817817 Debug. with_thread_associated dbg (fun () ->
818818 match ! backend_kind with
819819 | Openvswitch -> Ovs. bridge_to_ports name
820- | Bridge -> raise Not_implemented
820+ | Bridge -> raise ( Network_error Not_implemented )
821821 ) ()
822822
823823 let get_all_ports dbg from_cache =
@@ -828,14 +828,14 @@ module Bridge = struct
828828 else
829829 match ! backend_kind with
830830 | Openvswitch -> List. concat (List. map Ovs. bridge_to_ports (Ovs. list_bridges () ))
831- | Bridge -> raise Not_implemented
831+ | Bridge -> raise ( Network_error Not_implemented )
832832 ) ()
833833
834834 let get_bonds _ dbg ~name =
835835 Debug. with_thread_associated dbg (fun () ->
836836 match ! backend_kind with
837837 | Openvswitch -> Ovs. bridge_to_ports name
838- | Bridge -> raise Not_implemented
838+ | Bridge -> raise ( Network_error Not_implemented )
839839 ) ()
840840
841841 let get_all_bonds dbg from_cache =
@@ -847,7 +847,7 @@ module Bridge = struct
847847 else
848848 match ! backend_kind with
849849 | Openvswitch -> List. concat (List. map Ovs. bridge_to_ports (Ovs. list_bridges () ))
850- | Bridge -> raise Not_implemented
850+ | Bridge -> raise ( Network_error Not_implemented )
851851 ) ()
852852
853853 type bond_link_info = {
@@ -892,7 +892,7 @@ module Bridge = struct
892892 Debug. with_thread_associated dbg (fun () ->
893893 match ! backend_kind with
894894 | Openvswitch -> Ovs. bridge_to_vlan name
895- | Bridge -> raise Not_implemented
895+ | Bridge -> raise ( Network_error Not_implemented )
896896 ) ()
897897
898898 let add_default_flows _ dbg bridge mac interfaces =
@@ -962,7 +962,7 @@ module Bridge = struct
962962 Ovs. mod_port real_bridge name " no-flood" ;
963963 Interface. bring_up () dbg ~name
964964 | Bridge ->
965- raise Not_implemented
965+ raise ( Network_error Not_implemented )
966966
967967 let add_port dbg bond_mac bridge name interfaces bond_properties kind =
968968 Debug. with_thread_associated dbg (fun () ->
@@ -1052,7 +1052,7 @@ module Bridge = struct
10521052 | "secure" -> Some Secure
10531053 | _ -> None
10541054 end
1055- | Bridge -> raise Not_implemented
1055+ | Bridge -> raise ( Network_error Not_implemented )
10561056 ) ()
10571057
10581058 let is_persistent _ dbg ~name =
@@ -1121,7 +1121,7 @@ module PVS_proxy = struct
11211121 Jsonrpc_client. with_rpc ~path: ! path ~call ()
11221122 with e ->
11231123 error " Error when calling PVS proxy: %s" (Printexc. to_string e);
1124- raise PVS_proxy_connection_error
1124+ raise ( Network_error PVS_proxy_connection_error )
11251125
11261126 let configure_site dbg config =
11271127 debug " Configuring PVS proxy for site %s" config.site_uuid;
0 commit comments