Updated stopnetwork.py to use vmmNetwork.stop().

Removed the libvirtworker.destroy_network() API.
This commit is contained in:
Darryl L. Pierce 2011-05-26 14:37:23 -04:00 committed by Cole Robinson
parent 9860f807c7
commit ead4ee61e0
2 changed files with 3 additions and 8 deletions

View File

@ -232,11 +232,6 @@ class LibvirtWorker:
self.__conn.networkDefineXML(xml)
def destroy_network(self, name):
'''Destroys the specified network.'''
network = self.get_network(name)
network.destroy()
def undefine_network(self, name):
'''Undefines the specified network.'''
network = self.get_network(name)

View File

@ -43,13 +43,13 @@ class StopNetworkConfigScreen(NetworkListConfigScreen):
def validate_input(self, page, errors):
if page is LIST_PAGE:
network = self.get_selected_network()
self.get_libvirt().stop_network(network)
network.stop()
return True
return False
def get_stop_network_page(self, screen):
return [Label("Network Stoped"),
Label("%s has been stoped." % self.get_selected_network())]
network = self.get_selected_network()
return [Label("%s has been stopped." % network.get_name())]
def StopNetwork():
screen = StopNetworkConfigScreen()