class Libvirt::Interface

Constants

XML_INACTIVE

Attributes

connection[R]

Public Instance Methods

active? → [true|false] click to toggle source

Call virInterfaceIsActive[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceIsActive] to determine if this interface is currently active.

static VALUE libvirt_interface_active_p(VALUE p) {
    gen_call_truefalse(virInterfaceIsActive, conn(p), interface_get(p));
}
create(flags=0) → nil click to toggle source

Call virInterfaceCreate[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceCreate] to start this interface.

static VALUE libvirt_interface_create(int argc, VALUE *argv, VALUE s) {
    VALUE flags;

    rb_scan_args(argc, argv, "01", &flags);
    if (NIL_P(flags))
        flags = INT2NUM(0);

    gen_call_void(virInterfaceCreate, conn(s), interface_get(s),
                  NUM2UINT(flags));
}
destroy(flags=0) → nil click to toggle source

Call virInterfaceDestroy[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceDestroy] to shutdown this interface.

static VALUE libvirt_interface_destroy(int argc, VALUE *argv, VALUE s) {
    VALUE flags;

    rb_scan_args(argc, argv, "01", &flags);
    if (NIL_P(flags))
        flags = INT2NUM(0);

    gen_call_void(virInterfaceDestroy, conn(s), interface_get(s),
                  NUM2UINT(flags));
}
free → nil click to toggle source

Call virInterfaceFree[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceFree] to free this interface. The object will no longer be valid after this call.

static VALUE libvirt_interface_free(VALUE s) {
    gen_call_free(Interface, s);
}
mac → string click to toggle source

Call virInterfaceGetMACString[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetMACString] to retrieve the MAC address of this interface.

static VALUE libvirt_interface_mac(VALUE s) {
    gen_call_string(virInterfaceGetMACString, conn(s), 0, interface_get(s));
}
name → string click to toggle source

Call virInterfaceGetName[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetName] to retrieve the name of this interface.

static VALUE libvirt_interface_name(VALUE s) {
    gen_call_string(virInterfaceGetName, conn(s), 0, interface_get(s));
}
undefine → nil click to toggle source

Call virInterfaceUndefine[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceUndefine] to undefine this interface.

static VALUE libvirt_interface_undefine(VALUE s) {
    gen_call_void(virInterfaceUndefine, conn(s), interface_get(s));
}
xml_desc → string click to toggle source

Call virInterfaceGetXMLDesc[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetXMLDesc] to retrieve the XML of this interface.

static VALUE libvirt_interface_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(virInterfaceGetXMLDesc, conn(s), 1, interface_get(s),
                    NUM2UINT(flags));
}