[virt-tools-list] [PATCH 08/10] Updated stopnetwork.py to use vmmNetwork.stop().

Darryl L. Pierce dpierce at redhat.com
Thu May 26 18:37:23 UTC 2011


Removed the libvirtworker.destroy_network() API.
---
 src/virtManagerTui/libvirtworker.py |    5 -----
 src/virtManagerTui/stopnetwork.py   |    6 +++---
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/virtManagerTui/libvirtworker.py b/src/virtManagerTui/libvirtworker.py
index 5b74139..2e7e22a 100644
--- a/src/virtManagerTui/libvirtworker.py
+++ b/src/virtManagerTui/libvirtworker.py
@@ -233,11 +233,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)
diff --git a/src/virtManagerTui/stopnetwork.py b/src/virtManagerTui/stopnetwork.py
index b9d62f9..0e11cb2 100644
--- a/src/virtManagerTui/stopnetwork.py
+++ b/src/virtManagerTui/stopnetwork.py
@@ -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()
-- 
1.7.5.1




More information about the virt-tools-list mailing list