class Libvirt::Network
Attributes
Public Instance Methods
Call
virNetworkIsActive[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkIsActive]
to determine if this network is currently active.
static VALUE libvirt_netw_active_p(VALUE s) { gen_call_truefalse(virNetworkIsActive, conn(s), network_get(s)); }
Call
virNetworkGetAutostart[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkGetAutostart]
to determine if this network will be autostarted when libvirtd starts.
static VALUE libvirt_netw_autostart(VALUE s){
Call
virNetworkSetAutostart[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkSetAutostart]
to set this network to be autostarted when libvirtd starts.
static VALUE libvirt_netw_autostart_set(VALUE s, VALUE autostart) { if (autostart != Qtrue && autostart != Qfalse) rb_raise(rb_eTypeError, "wrong argument type (expected TrueClass or FalseClass)"); gen_call_void(virNetworkSetAutostart, conn(s), network_get(s), RTEST(autostart) ? 1 : 0); }
Call
virNetworkGetAutostart[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkGetAutostart]
to determine if this network will be autostarted when libvirtd starts.
static VALUE libvirt_netw_autostart(VALUE s){
Call
virNetworkGetBridgeName[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkGetBridgeName]
to retrieve the bridge name for this network.
static VALUE libvirt_netw_bridge_name(VALUE s) { gen_call_string(virNetworkGetBridgeName, conn(s), 1, network_get(s)); }
Call
virNetworkCreate[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkCreate]
to start this network.
static VALUE libvirt_netw_create(VALUE s) { gen_call_void(virNetworkCreate, conn(s), network_get(s)); }
Call
virNetworkDestroy[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkDestroy]
to shutdown this network.
static VALUE libvirt_netw_destroy(VALUE s) { gen_call_void(virNetworkDestroy, conn(s), network_get(s)); }
Call
virNetworkFree[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkFree]
to free this network. The object will no longer be valid after this call.
static VALUE libvirt_netw_free(VALUE s) { gen_call_free(Network, s); }
Call
virNetworkGetName[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkGetName]
to retrieve the name of this network.
static VALUE libvirt_netw_name(VALUE s) { gen_call_string(virNetworkGetName, conn(s), 0, network_get(s)); }
Call
virNetworkIsPersistent[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkIsPersistent]
to determine if this network is persistent.
static VALUE libvirt_netw_persistent_p(VALUE s) { gen_call_truefalse(virNetworkIsPersistent, conn(s), network_get(s)); }
Call
virNetworkUndefine[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkUndefine]
to undefine this network.
static VALUE libvirt_netw_undefine(VALUE s) { gen_call_void(virNetworkUndefine, conn(s), network_get(s)); }
Call
virNetworkGetUUIDString[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkGetUUIDString]
to retrieve the UUID of this network.
static VALUE libvirt_netw_uuid(VALUE s) { virNetworkPtr netw = network_get(s); char uuid[VIR_UUID_STRING_BUFLEN]; int r; r = virNetworkGetUUIDString(netw, uuid); _E(r < 0, create_error(e_RetrieveError, "virNetworkGetUUIDString", conn(s))); return rb_str_new2((char *) uuid); }
Call
virNetworkGetXMLDesc[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkGetXMLDesc]
to retrieve the XML for this network.
static VALUE libvirt_netw_xml_desc(int argc, VALUE *argv, VALUE s) { VALUE flags; rb_scan_args(argc, argv, "01", &flags); if (NIL_P(flags)) flags = INT2NUM(0); gen_call_string(virNetworkGetXMLDesc, conn(s), 1, network_get(s), NUM2UINT(flags)); }