Class: Libvirt::Interface
- Inherits:
-
Object
- Object
- Libvirt::Interface
- Defined in:
- ext/libvirt/interface.c
Constant Summary collapse
- XML_INACTIVE =
INT2NUM(VIR_INTERFACE_XML_INACTIVE)
Instance Attribute Summary collapse
- #connection ⇒ Object readonly
Instance Method Summary collapse
-
#active? ⇒ Array
Call
virInterfaceIsActive
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceIsActive] to determine if this interface is currently active. -
#create(flags = 0) ⇒ nil
Call
virInterfaceCreate
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceCreate] to start this interface. -
#destroy(flags = 0) ⇒ nil
Call
virInterfaceDestroy
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceDestroy] to shutdown this interface. -
#free ⇒ nil
Call
virInterfaceFree
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceFree] to free this interface. -
#mac ⇒ String
Call
virInterfaceGetMACString
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetMACString] to retrieve the MAC address of this interface. -
#name ⇒ String
Call
virInterfaceGetName
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetName] to retrieve the name of this interface. -
#undefine ⇒ nil
Call
virInterfaceUndefine
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceUndefine] to undefine this interface. -
#xml_desc ⇒ String
Call
virInterfaceGetXMLDesc
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetXMLDesc] to retrieve the XML of this interface.
Instance Attribute Details
#connection ⇒ Object (readonly)
Instance Method Details
#active? ⇒ Array
Call virInterfaceIsActive
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceIsActive] to determine if this interface is currently active.
98 99 100 |
# File 'ext/libvirt/interface.c', line 98 static VALUE libvirt_interface_active_p(VALUE p) { gen_call_truefalse(virInterfaceIsActive, conn(p), interface_get(p)); } |
#create(flags = 0) ⇒ nil
Call virInterfaceCreate
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceCreate] to start this interface.
61 62 63 64 65 66 67 68 69 70 |
# File 'ext/libvirt/interface.c', line 61
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
Call virInterfaceDestroy
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceDestroy] to shutdown this interface.
79 80 81 82 83 84 85 86 87 88 |
# File 'ext/libvirt/interface.c', line 79
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
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.
151 152 153 |
# File 'ext/libvirt/interface.c', line 151 static VALUE libvirt_interface_free(VALUE s) { gen_call_free(Interface, s); } |
#mac ⇒ String
Call virInterfaceGetMACString
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetMACString] to retrieve the MAC address of this interface.
121 122 123 |
# File 'ext/libvirt/interface.c', line 121 static VALUE libvirt_interface_mac(VALUE s) { gen_call_string(virInterfaceGetMACString, conn(s), 0, interface_get(s)); } |
#name ⇒ String
Call virInterfaceGetName
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetName] to retrieve the name of this interface.
110 111 112 |
# File 'ext/libvirt/interface.c', line 110 static VALUE libvirt_interface_name(VALUE s) { gen_call_string(virInterfaceGetName, conn(s), 0, interface_get(s)); } |
#undefine ⇒ nil
Call virInterfaceUndefine
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceUndefine] to undefine this interface.
50 51 52 |
# File 'ext/libvirt/interface.c', line 50 static VALUE libvirt_interface_undefine(VALUE s) { gen_call_void(virInterfaceUndefine, conn(s), interface_get(s)); } |
#xml_desc ⇒ String
Call virInterfaceGetXMLDesc
[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceGetXMLDesc] to retrieve the XML of this interface.
132 133 134 135 136 137 138 139 140 141 142 |
# File 'ext/libvirt/interface.c', line 132
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));
}
|