.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Sys::Virt::Interface 3pm" .TH Sys::Virt::Interface 3pm 2023-07-26 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Sys::Virt::Interface \- Represent & manage a libvirt host network interface .SH DESCRIPTION .IX Header "DESCRIPTION" The \f(CW\*(C`Sys::Virt::Interface\*(C'\fR module represents a host network interface allowing configuration of IP addresses, bonding, vlans and bridges. .SH METHODS .IX Header "METHODS" .ie n .IP "my $name = $iface\->\fBget_name()\fR" 4 .el .IP "my \f(CW$name\fR = \f(CW$iface\fR\->\fBget_name()\fR" 4 .IX Item "my $name = $iface->get_name()" Returns a string with a locally unique name of the network .ie n .IP $iface\->\fBis_active()\fR 4 .el .IP \f(CW$iface\fR\->\fBis_active()\fR 4 .IX Item "$iface->is_active()" Returns a true value if the interface is currently running .ie n .IP "my $name = $iface\->\fBget_mac()\fR" 4 .el .IP "my \f(CW$name\fR = \f(CW$iface\fR\->\fBget_mac()\fR" 4 .IX Item "my $name = $iface->get_mac()" Returns a string with the hardware MAC address of the interface .ie n .IP "my $xml = $iface\->\fBget_xml_description()\fR" 4 .el .IP "my \f(CW$xml\fR = \f(CW$iface\fR\->\fBget_xml_description()\fR" 4 .IX Item "my $xml = $iface->get_xml_description()" Returns an XML document containing a complete description of the network's configuration .ie n .IP $iface\->\fBcreate()\fR 4 .el .IP \f(CW$iface\fR\->\fBcreate()\fR 4 .IX Item "$iface->create()" Start a network whose configuration was previously defined using the \&\f(CW\*(C`define_network\*(C'\fR method in Sys::Virt. .ie n .IP $iface\->\fBundefine()\fR 4 .el .IP \f(CW$iface\fR\->\fBundefine()\fR 4 .IX Item "$iface->undefine()" Remove the configuration associated with a network previously defined with the \f(CW\*(C`define_network\*(C'\fR method in Sys::Virt. If the network is running, you probably want to use the \f(CW\*(C`shutdown\*(C'\fR or \f(CW\*(C`destroy\*(C'\fR methods instead. .ie n .IP $iface\->\fBdestroy()\fR 4 .el .IP \f(CW$iface\fR\->\fBdestroy()\fR 4 .IX Item "$iface->destroy()" Immediately terminate the machine, and remove it from the virtual machine monitor. The \f(CW$iface\fR handle is invalid after this call completes and should not be used again. .SH CONSTANTS .IX Header "CONSTANTS" This section documents constants that are used with various APIs described above .SS "LIST FILTERING" .IX Subsection "LIST FILTERING" The following constants are used to filter object lists .IP Sys::Virt::Interface::LIST_ACTIVE 4 .IX Item "Sys::Virt::Interface::LIST_ACTIVE" Include interfaces that are active .IP Sys::Virt::Interface::LIST_INACTIVE 4 .IX Item "Sys::Virt::Interface::LIST_INACTIVE" Include interfaces that are not active .SS "INTERFACE DEFINE" .IX Subsection "INTERFACE DEFINE" The following constants can be used to control the behaviour of interface define operations .IP Sys::Virt::Interface::DEFINE_VALIDATE 4 .IX Item "Sys::Virt::Interface::DEFINE_VALIDATE" Validate the XML document against the XML schema .SS "XML CONSTANTS" .IX Subsection "XML CONSTANTS" The following constants are used when querying XML .IP Sys::Virt::Interface::XML_INACTIVE 4 .IX Item "Sys::Virt::Interface::XML_INACTIVE" Request the inactive XML, instead of the current possibly live config. .SH AUTHORS .IX Header "AUTHORS" Daniel P. Berrange .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 2006\-2009 Red Hat Copyright (C) 2006\-2007 Daniel P. Berrange .SH LICENSE .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the terms of either the GNU General Public License as published by the Free Software Foundation (either version 2 of the License, or at your option any later version), or, the Artistic License, as specified in the Perl README file. .SH "SEE ALSO" .IX Header "SEE ALSO" Sys::Virt, Sys::Virt::Error, \f(CW\*(C`http://libvirt.org\*(C'\fR