Class: Libvirt::NWFilter

Inherits:
Object
  • Object
show all
Defined in:
ext/libvirt/nwfilter.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#connectionObject (readonly)

Instance Method Details

#freenil

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.

Returns:

  • (nil)


111
112
113
# File 'ext/libvirt/nwfilter.c', line 111

static VALUE libvirt_nwfilter_free(VALUE s) {
    gen_call_free(NWFilter, s);
}

#nameString

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

Returns:

  • (String)


61
62
63
# File 'ext/libvirt/nwfilter.c', line 61

static VALUE libvirt_nwfilter_name(VALUE s) {
    gen_call_string(virNWFilterGetName, conn(s), 0, nwfilter_get(s));
}

#undefinenil

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

Returns:

  • (nil)


50
51
52
# File 'ext/libvirt/nwfilter.c', line 50

static VALUE libvirt_nwfilter_undefine(VALUE s) {
    gen_call_void(virNWFilterUndefine, conn(s), nwfilter_get(s));
}

#uuidString

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

Returns:

  • (String)


72
73
74
75
76
77
78
79
80
81
82
# File 'ext/libvirt/nwfilter.c', line 72

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

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

Returns:

  • (String)


91
92
93
94
95
96
97
98
99
100
101
# File 'ext/libvirt/nwfilter.c', line 91

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));
}