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 to determine if this interface is currently active.
-
#create(flags = 0) ⇒ nil
Call virInterfaceCreate to start this interface.
-
#destroy(flags = 0) ⇒ nil
Call virInterfaceDestroy to shutdown this interface.
-
#free ⇒ nil
Call virInterfaceFree to free this interface.
-
#mac ⇒ String
Call virInterfaceGetMACString to retrieve the MAC address of this interface.
-
#name ⇒ String
Call virInterfaceGetName to retrieve the name of this interface.
-
#undefine ⇒ nil
Call virInterfaceUndefine to undefine this interface.
-
#xml_desc ⇒ String
Call virInterfaceGetXMLDesc to retrieve the XML of this interface.
Instance Attribute Details
#connection ⇒ Object (readonly)
Instance Method Details
#active? ⇒ Array
Call virInterfaceIsActive to determine if this interface is currently active.
107 108 109 110 111 112 |
# File 'ext/libvirt/interface.c', line 107
static VALUE libvirt_interface_active_p(VALUE p)
{
ruby_libvirt_generate_call_truefalse(virInterfaceIsActive,
ruby_libvirt_connect_get(p),
interface_get(p));
}
|
#create(flags = 0) ⇒ nil
Call virInterfaceCreate to start this interface.
68 69 70 71 72 73 74 75 76 77 78 |
# File 'ext/libvirt/interface.c', line 68
static VALUE libvirt_interface_create(int argc, VALUE *argv, VALUE i)
{
VALUE flags;
rb_scan_args(argc, argv, "01", &flags);
ruby_libvirt_generate_call_nil(virInterfaceCreate,
ruby_libvirt_connect_get(i),
interface_get(i),
ruby_libvirt_value_to_uint(flags));
}
|
#destroy(flags = 0) ⇒ nil
Call virInterfaceDestroy to shutdown this interface.
87 88 89 90 91 92 93 94 95 96 97 |
# File 'ext/libvirt/interface.c', line 87
static VALUE libvirt_interface_destroy(int argc, VALUE *argv, VALUE i)
{
VALUE flags;
rb_scan_args(argc, argv, "01", &flags);
ruby_libvirt_generate_call_nil(virInterfaceDestroy,
ruby_libvirt_connect_get(i),
interface_get(i),
ruby_libvirt_value_to_uint(flags));
}
|
#free ⇒ nil
Call virInterfaceFree to free this interface. The object will no longer be valid after this call.
169 170 171 172 |
# File 'ext/libvirt/interface.c', line 169
static VALUE libvirt_interface_free(VALUE i)
{
ruby_libvirt_generate_call_free(Interface, i);
}
|
#mac ⇒ String
Call virInterfaceGetMACString to retrieve the MAC address of this interface.
136 137 138 139 140 141 |
# File 'ext/libvirt/interface.c', line 136
static VALUE libvirt_interface_mac(VALUE i)
{
ruby_libvirt_generate_call_string(virInterfaceGetMACString,
ruby_libvirt_connect_get(i),
0, interface_get(i));
}
|
#name ⇒ String
Call virInterfaceGetName to retrieve the name of this interface.
122 123 124 125 126 127 |
# File 'ext/libvirt/interface.c', line 122
static VALUE libvirt_interface_name(VALUE i)
{
ruby_libvirt_generate_call_string(virInterfaceGetName,
ruby_libvirt_connect_get(i), 0,
interface_get(i));
}
|
#undefine ⇒ nil
Call virInterfaceUndefine to undefine this interface.
54 55 56 57 58 59 |
# File 'ext/libvirt/interface.c', line 54
static VALUE libvirt_interface_undefine(VALUE i)
{
ruby_libvirt_generate_call_nil(virInterfaceUndefine,
ruby_libvirt_connect_get(i),
interface_get(i));
}
|
#xml_desc ⇒ String
Call virInterfaceGetXMLDesc to retrieve the XML of this interface.
150 151 152 153 154 155 156 157 158 159 160 |
# File 'ext/libvirt/interface.c', line 150
static VALUE libvirt_interface_xml_desc(int argc, VALUE *argv, VALUE i)
{
VALUE flags;
rb_scan_args(argc, argv, "01", &flags);
ruby_libvirt_generate_call_string(virInterfaceGetXMLDesc,
ruby_libvirt_connect_get(i),
1, interface_get(i),
ruby_libvirt_value_to_uint(flags));
}
|