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.
105 106 107 108 109 110 |
# File 'ext/libvirt/interface.c', line 105
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.
67 68 69 70 71 72 73 74 75 76 77 |
# File 'ext/libvirt/interface.c', line 67
static VALUE libvirt_interface_create(int argc, VALUE *argv, VALUE i)
{
VALUE flags = RUBY_Qnil;
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.
86 87 88 89 90 91 92 93 94 95 96 |
# File 'ext/libvirt/interface.c', line 86
static VALUE libvirt_interface_destroy(int argc, VALUE *argv, VALUE i)
{
VALUE flags = RUBY_Qnil;
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.
166 167 168 169 |
# File 'ext/libvirt/interface.c', line 166
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.
133 134 135 136 137 138 |
# File 'ext/libvirt/interface.c', line 133
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.
119 120 121 122 123 124 |
# File 'ext/libvirt/interface.c', line 119
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.
53 54 55 56 57 58 |
# File 'ext/libvirt/interface.c', line 53
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.
147 148 149 150 151 152 153 154 155 156 157 |
# File 'ext/libvirt/interface.c', line 147
static VALUE libvirt_interface_xml_desc(int argc, VALUE *argv, VALUE i)
{
VALUE flags = RUBY_Qnil;
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));
}
|