WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Persist network details when they change.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Persist network details when they change.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Dec 2006 10:55:14 -0800
Delivery-date: Mon, 25 Dec 2006 10:56:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1167064944 0
# Node ID c1fbe291b56405b430703edfef02615c79944420
# Parent  8f864129d5994a99112eb786bbac9cf10508b377
Persist network details when they change.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendNetwork.py |    4 ++++
 tools/python/xen/xend/XendNode.py    |   11 +++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff -r 8f864129d599 -r c1fbe291b564 tools/python/xen/xend/XendNetwork.py
--- a/tools/python/xen/xend/XendNetwork.py      Mon Dec 25 16:36:48 2006 +0000
+++ b/tools/python/xen/xend/XendNetwork.py      Mon Dec 25 16:42:24 2006 +0000
@@ -66,17 +66,21 @@ class XendNetwork:
 
     def set_name_label(self, new_name):
         self.name_label = new_name
+        XendNode.instance().save_networks()
 
     def set_name_description(self, new_desc):
         self.name_description = new_desc
+        XendNode.instance().save_networks()
 
     def set_default_gateway(self, new_gateway):
         if re.search('^\d+\.\d+\.\d+\.\d+$', new_gateway):
             self.default_gateway = new_gateway
+            XendNode.instance().save_networks()
 
     def set_default_netmask(self, new_netmask):
         if re.search('^\d+\.\d+\.\d+\.\d+$', new_netmask):
             self.default_netmask = new_netmask
+            XendNode.instance().save_networks()
 
     def get_VIF_UUIDs(self):
         return []
diff -r 8f864129d599 -r c1fbe291b564 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Mon Dec 25 16:36:48 2006 +0000
+++ b/tools/python/xen/xend/XendNode.py Mon Dec 25 16:42:24 2006 +0000
@@ -135,13 +135,16 @@ class XendNode:
         pif_records = dict([(k, v.get_record(transient = False))
                             for k, v in self.pifs.items()])
         self.state_store.save_state('pif', pif_records)
+
+        self.save_networks()
+
+        sr_record = {self.sr.uuid: self.sr.get_record()}
+        self.state_store.save_state('sr', sr_record)
+
+    def save_networks(self):
         net_records = dict([(k, v.get_record(transient = False))
                             for k, v in self.networks.items()])
         self.state_store.save_state('network', net_records)
-
-
-        sr_record = {self.sr.uuid: self.sr.get_record()}
-        self.state_store.save_state('sr', sr_record)
 
     def shutdown(self):
         return 0

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Persist network details when they change., Xen patchbot-unstable <=