class Libvirt::NWFilter

Attributes

connection[R]

Public Instance Methods

free → nil click to toggle source

Call virNWFilterFree[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterFree] to free this network filter. After this call the network filter object is no longer valid.

static VALUE libvirt_nwfilter_free(VALUE s) {
    gen_call_free(NWFilter, s);
}
name → string click to toggle source

Call virNWFilterGetName[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterGetName] to retrieve the network filter name.

static VALUE libvirt_nwfilter_name(VALUE s) {
    gen_call_string(virNWFilterGetName, conn(s), 0, nwfilter_get(s));
}
undefine → nil click to toggle source

Call virNWFilterUndefine[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterUndefine] to undefine the network filter.

static VALUE libvirt_nwfilter_undefine(VALUE s) {
    gen_call_void(virNWFilterUndefine, conn(s), nwfilter_get(s));
}
uuid → string click to toggle source

Call virNWFilterGetUUIDString[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterGetUUIDString] to retrieve the network filter UUID.

static VALUE libvirt_nwfilter_uuid(VALUE s) {
    virNWFilterPtr nwfilter = nwfilter_get(s);
    int r;
    char uuid[VIR_UUID_STRING_BUFLEN];

    r = virNWFilterGetUUIDString(nwfilter, uuid);
    _E(r < 0, create_error(e_RetrieveError, "virNWFilterGetUUIDString",
                           conn(s)));

    return rb_str_new2((char *)uuid);
}
xml_desc(flags=0) → string click to toggle source

Call virNWFilterGetXMLDesc[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterGetXMLDesc] to retrieve the XML for this network filter.

static VALUE libvirt_nwfilter_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(virNWFilterGetXMLDesc, conn(s), 1, nwfilter_get(s),
                    NUM2UINT(flags));
}