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] [XEND] Keep vif IP addresses as space sep

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Keep vif IP addresses as space separated string.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 08 Dec 2006 17:00:38 +0000
Delivery-date: Fri, 08 Dec 2006 09:00:02 -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 Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID a4d1f99e5a534d31501ecad91ae1de53d391b4a1
# Parent  28403de6c4158ffe23cac8714632e855f151c3cc
[XEND] Keep vif IP addresses as space separated string.

They were inconsistently represented as strings or lists making it
difficult to know the type of the IP parameter for vifs. Since both xm
and DevController represents these as space separated strings, that is
what it will be stored as.

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py   |   13 -------------
 tools/python/xen/xend/server/netif.py |    4 ++--
 2 files changed, 2 insertions(+), 15 deletions(-)

diff -r 28403de6c415 -r a4d1f99e5a53 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Fri Dec 08 13:28:22 2006 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Fri Dec 08 13:31:21 2006 +0000
@@ -922,24 +922,11 @@ class XendConfig(dict):
             except ValueError:
                 pass # SXP has no options for this device
 
-
-            # Special handling for certain device parameters.
-
-            def _get_config_ipaddr(cfg):
-                val = []
-                for ipaddr in sxp.children(cfg, elt='ip'):
-                    val.append(sxp.child0(ipaddr))
-                return val
-
-            if dev_type == 'vif' and 'ip' in dev_info:
-                dev_info['ip'] = _get_config_ipaddr(config)
-
             if dev_type == 'vbd':
                 if dev_info.get('dev', '').startswith('ioemu:'):
                     dev_info['driver'] = 'ioemu'
                 else:
                     dev_info['driver'] = 'paravirtualised'
-                    
 
             # create uuid if it doesn't exist
             dev_uuid = dev_info.get('uuid', uuid.createString())
diff -r 28403de6c415 -r a4d1f99e5a53 tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     Fri Dec 08 13:28:22 2006 +0000
+++ b/tools/python/xen/xend/server/netif.py     Fri Dec 08 13:31:21 2006 +0000
@@ -164,7 +164,7 @@ class NetifController(DevController):
             front = { 'handle' : "%i" % devid,
                       'mac'    : mac }
         if ipaddr:
-            back['ip'] = ' '.join(ipaddr)
+            back['ip'] = ipaddr
         if bridge:
             back['bridge'] = bridge
         if vifname:
@@ -189,7 +189,7 @@ class NetifController(DevController):
             network_script_dir = xroot.network_script_dir + os.sep
             result['script'] = script.replace(network_script_dir, "")
         if ip:
-            result['ip'] = ip.split(" ")
+            result['ip'] = ip
         if bridge:
             result['bridge'] = bridge
         if mac:

_______________________________________________
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] [XEND] Keep vif IP addresses as space separated string., Xen patchbot-unstable <=