'virNetwork *': ('O', "virNetwork", "virNetworkPtr", "virNetworkPtr"),
'const virNetwork *': ('O', "virNetwork", "virNetworkPtr", "virNetworkPtr"),
+ 'virInterfacePtr': ('O', "virInterface", "virInterfacePtr", "virInterfacePtr"),
+ 'const virInterfacePtr': ('O', "virInterface", "virInterfacePtr", "virInterfacePtr"),
+ 'virInterface *': ('O', "virInterface", "virInterfacePtr", "virInterfacePtr"),
+ 'const virInterface *': ('O', "virInterface", "virInterfacePtr", "virInterfacePtr"),
+
'virStoragePoolPtr': ('O', "virStoragePool", "virStoragePoolPtr", "virStoragePoolPtr"),
'const virStoragePoolPtr': ('O', "virStoragePool", "virStoragePoolPtr", "virStoragePoolPtr"),
'virStoragePool *': ('O', "virStoragePool", "virStoragePoolPtr", "virStoragePoolPtr"),
'virConnectListDefinedDomains',
'virConnectListNetworks',
'virConnectListDefinedNetworks',
+ 'virConnectListInterfaces',
+ 'virConnectListDefinedInterfaces',
'virConnectListStoragePools',
'virConnectListDefinedStoragePools',
'virConnectListStorageVols',
"virDomain *": ("._o", "virDomain(self, _obj=%s)", "virDomain"),
"virNetworkPtr": ("._o", "virNetwork(self, _obj=%s)", "virNetwork"),
"virNetwork *": ("._o", "virNetwork(self, _obj=%s)", "virNetwork"),
+ "virInterfacePtr": ("._o", "virInterface(self, _obj=%s)", "virInterface"),
+ "virInterface *": ("._o", "virInterface(self, _obj=%s)", "virInterface"),
"virStoragePoolPtr": ("._o", "virStoragePool(self, _obj=%s)", "virStoragePool"),
"virStoragePool *": ("._o", "virStoragePool(self, _obj=%s)", "virStoragePool"),
"virStorageVolPtr": ("._o", "virStorageVol(self, _obj=%s)", "virStorageVol"),
converter_type = {
}
-primary_classes = ["virDomain", "virNetwork", "virStoragePool", "virStorageVol",
+primary_classes = ["virDomain", "virNetwork", "virInterface",
+ "virStoragePool", "virStorageVol",
"virConnect", "virNodeDevice" ]
classes_ancestor = {
classes_destructors = {
"virDomain": "virDomainFree",
"virNetwork": "virNetworkFree",
+ "virInterface": "virInterfaceFree",
"virStoragePool": "virStoragePoolFree",
"virStorageVol": "virStorageVolFree",
"virNodeDevice" : "virNodeDeviceFree"
'virDomainGetID': True,
'virDomainGetName': True,
'virNetworkGetName': True,
+ 'virInterfaceGetName': True,
'virStoragePoolGetName': True,
'virStorageVolGetName': True,
'virStorageVolGetkey': True,
elif name[0:16] == "virNetworkLookup":
func = name[3:]
func = string.lower(func[0:1]) + func[1:]
+ elif name[0:18] == "virInterfaceDefine":
+ func = name[3:]
+ func = string.lower(func[0:1]) + func[1:]
+ elif name[0:21] == "virInterfaceCreateXML":
+ func = name[3:]
+ func = string.lower(func[0:1]) + func[1:]
+ elif name[0:18] == "virInterfaceLookup":
+ func = name[3:]
+ func = string.lower(func[0:1]) + func[1:]
elif name[0:20] == "virStoragePoolDefine":
func = name[3:]
func = string.lower(func[0:1]) + func[1:]
elif name[0:10] == "virNetwork":
func = name[10:]
func = string.lower(func[0:1]) + func[1:]
+ elif name[0:15] == "virInterfaceGet":
+ func = name[13:]
+ func = string.lower(func[0:1]) + func[1:]
+ elif name[0:12] == "virInterface":
+ func = name[10:]
+ func = string.lower(func[0:1]) + func[1:]
elif name[0:17] == "virStoragePoolGet":
func = name[17:]
func = string.lower(func[0:1]) + func[1:]
else:
txt.write("Class %s()\n" % (classname))
classes.write("class %s:\n" % (classname))
- if classname in [ "virDomain", "virNetwork", "virStoragePool", "virStorageVol", "virNodeDevice" ]:
+ if classname in [ "virDomain", "virNetwork", "virInterface", "virStoragePool", "virStorageVol", "virNodeDevice" ]:
classes.write(" def __init__(self, conn, _obj=None):\n")
else:
classes.write(" def __init__(self, _obj=None):\n")
list = reference_keepers[classname]
for ref in list:
classes.write(" self.%s = None\n" % ref[1])
- if classname in [ "virDomain", "virNetwork", "virNodeDevice" ]:
+ if classname in [ "virDomain", "virNetwork", "virInterface", "virNodeDevice" ]:
classes.write(" self._conn = conn\n")
elif classname in [ "virStorageVol", "virStoragePool" ]:
classes.write(" self._conn = conn\n" + \
(name))
elif classname == "virNetwork":
classes.write(
+ " if ret is None:raise libvirtError('%s() failed', net=self)\n" %
+ (name))
+ elif classname == "virInterface":
+ classes.write(
" if ret is None:raise libvirtError('%s() failed', net=self)\n" %
(name))
elif classname == "virStoragePool":
classes.write ((" if " + test +
": raise libvirtError ('%s() failed', net=self)\n") %
("ret", name))
+ elif classname == "virInterface":
+ classes.write ((" if " + test +
+ ": raise libvirtError ('%s() failed', net=self)\n") %
+ ("ret", name))
elif classname == "virStoragePool":
classes.write ((" if " + test +
": raise libvirtError ('%s() failed', pool=self)\n") %
classes.write ((" if " + test +
": raise libvirtError ('%s() failed', net=self)\n") %
("ret", name))
+ elif classname == "virInterface":
+ classes.write ((" if " + test +
+ ": raise libvirtError ('%s() failed', net=self)\n") %
+ ("ret", name))
elif classname == "virStoragePool":
classes.write ((" if " + test +
": raise libvirtError ('%s() failed', pool=self)\n") %