network: Add install() command, remove function from vmmConnection

This is the pattern used by other virtinst objects
This commit is contained in:
Cole Robinson
2013-09-30 15:06:52 -04:00
parent b9bcc84d35
commit 98a95b2e2d
3 changed files with 26 additions and 18 deletions

View File

@@ -732,18 +732,6 @@ class vmmConnection(vmmGObject):
def define_interface(self, xml):
return self._backend.interfaceDefineXML(xml, 0)
def create_network(self, xml, start=True, autostart=True):
net = self.define_network(xml)
try:
if start:
net.create()
net.setAutostart(autostart)
except:
net.undefine()
raise
return net
def _rename_helper(self, objtype, define_cb, obj, origxml, newxml):
# Undefine the original object
obj.delete()