Updated stopnetwork.py to use vmmNetwork.stop().
Removed the libvirtworker.destroy_network() API.
This commit is contained in:
parent
9860f807c7
commit
ead4ee61e0
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue