Module Libvirt.Network


module Network: sig .. end
Module dealing with networks. Network.t is the network object.

type 'a t 
Network handle. Read-only handles have type ro Network.t and read-write handles have type rw Network.t.
val lookup_by_name : 'a Libvirt.Connect.t -> string -> 'a t
Lookup a network by name.
val lookup_by_uuid : 'a Libvirt.Connect.t -> Libvirt.uuid -> 'a t
Lookup a network by (packed) UUID.
val lookup_by_uuid_string : 'a Libvirt.Connect.t -> string -> 'a t
Lookup a network by UUID string.
val create_xml : [> `W ] Libvirt.Connect.t -> Libvirt.xml -> Libvirt.rw t
Create a network.
val define_xml : [> `W ] Libvirt.Connect.t -> Libvirt.xml -> Libvirt.rw t
Define but don't activate a network.
val undefine : [> `W ] t -> unit
Undefine configuration of a network.
val create : [> `W ] t -> unit
Start up a defined (inactive) network.
val destroy : [> `W ] t -> unit
Destroy a network.
val free : [> `R ] t -> unit
free network frees the network object in memory.

The network object is automatically freed if it is garbage collected. This function just forces it to be freed right away.

val get_name : [> `R ] t -> string
Get network name.
val get_uuid : [> `R ] t -> Libvirt.uuid
Get network packed UUID.
val get_uuid_string : [> `R ] t -> string
Get network UUID as a printable string.
val get_xml_desc : [> `R ] t -> Libvirt.xml
Get XML description of a network.
val get_bridge_name : [> `R ] t -> string
Get bridge device name of a network.
val get_autostart : [> `R ] t -> bool
Get the autostart flag for a network.
val set_autostart : [> `W ] t -> bool -> unit
Set the autostart flag for a network.
val const : [> `R ] t -> Libvirt.ro t
const network turns a read/write network handle into a read-only network handle. Note that the opposite operation is impossible.