[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt-users] changeBegin() on python API



On 29.10.2015 15:22, Ramon Medeiros wrote:
> Hi,
> 
> is changeBegin() working on python? I was trying to use the following
> method:
> 
> if = conn.interfaceLookupByName("name")
> if.undefine()
> 
> I saw that changeBegin() does not commit changes, but i can't use it.
> 

This python API boils down to virInterfaceChangeBegin() but as such it's
implemented just for netcf backend. So if you're on a distro where udev
is used instead, the API will return an error.
Otherwise, this should work:

if = conn.interfaceLookupByName("name")
if.changeBegin()
if.undefine()

/* test if the connectivity to the host was not lost */

if.changeCommit()


Michal


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]