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] Add -s --ssl option to xm migrate

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Add -s --ssl option to xm migrate
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 May 2008 09:50:11 -0700
Delivery-date: Fri, 23 May 2008 09:50:17 -0700
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1211535731 -3600
# Node ID 33a6590ba948b29cba9e5d2e1df1774c6b9a1cfd
# Parent  91a9e28aed468d6548b3a4aac9d80988093cc91e
Add -s --ssl option to xm migrate

This patch adds -s --ssl option to xm migrate. It will override
xend-relocation-ssl setting in /etc/xen/xend-config.sxp.

When mix deploy xen 3.2 and xen 3.3 servers, it's convenient to have a
command line option rather than modify /etc/xen/xend-config.sxp every
time.

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py          |    3 ++-
 tools/python/xen/xend/XendDomain.py       |    8 ++++++--
 tools/python/xen/xend/server/SrvDomain.py |    3 ++-
 tools/python/xen/xm/migrate.py            |   10 ++++++++--
 4 files changed, 18 insertions(+), 6 deletions(-)

diff -r 91a9e28aed46 -r 33a6590ba948 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Fri May 23 10:41:44 2008 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Fri May 23 10:42:11 2008 +0100
@@ -1762,9 +1762,10 @@ class XendAPI(object):
         resource = other_config.get("resource", 0)
         port = other_config.get("port", 0)
         node = other_config.get("node", 0)
+        ssl = other_config.get("ssl", 0)
         
         xendom.domain_migrate(xeninfo.getDomid(), destination_url,
-                              bool(live), resource, port, node)
+                              bool(live), resource, port, node, ssl)
         return xen_api_success_void()
 
     def VM_save(self, _, vm_ref, dest, checkpoint):
diff -r 91a9e28aed46 -r 33a6590ba948 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Fri May 23 10:41:44 2008 +0100
+++ b/tools/python/xen/xend/XendDomain.py       Fri May 23 10:42:11 2008 +0100
@@ -1258,7 +1258,7 @@ class XendDomain:
 
         return val       
 
-    def domain_migrate(self, domid, dst, live=False, port=0, node=-1):
+    def domain_migrate(self, domid, dst, live=False, port=0, node=-1, 
ssl=None):
         """Start domain migration.
         
         @param domid: Domain ID or Name
@@ -1269,6 +1269,8 @@ class XendDomain:
         @type port: int        
         @keyword live: Live migration
         @type live: bool
+        @keyword ssl: use ssl connection
+        @type ssl: bool
         @rtype: None
         @keyword node: use node number for target
         @rtype: int 
@@ -1294,7 +1296,9 @@ class XendDomain:
             """ Make sure there's memory free for enabling shadow mode """
             dominfo.checkLiveMigrateMemory()
 
-        ssl = xoptions.get_xend_relocation_ssl()
+        if ssl is None:
+            ssl = xoptions.get_xend_relocation_ssl()
+
         if ssl:
             from OpenSSL import SSL
             from xen.web import connection
diff -r 91a9e28aed46 -r 33a6590ba948 tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Fri May 23 10:41:44 2008 +0100
+++ b/tools/python/xen/xend/server/SrvDomain.py Fri May 23 10:42:11 2008 +0100
@@ -115,7 +115,8 @@ class SrvDomain(SrvDir):
                     [['dom',         'int'],
                      ['destination', 'str'],
                      ['live',        'int'],
-                     ['port',        'int']])
+                     ['port',        'int'],
+                     ['ssl',         'int']])
         return fn(req.args, {'dom': self.dom.domid})
 
     def op_pincpu(self, _, req):
diff -r 91a9e28aed46 -r 33a6590ba948 tools/python/xen/xm/migrate.py
--- a/tools/python/xen/xm/migrate.py    Fri May 23 10:41:44 2008 +0100
+++ b/tools/python/xen/xm/migrate.py    Fri May 23 10:42:11 2008 +0100
@@ -47,6 +47,10 @@ gopts.opt('node', short='n', val='nodenu
           fn=set_int, default=-1,
           use="Use specified NUMA node on target.")
 
+gopts.opt('ssl', short='s',
+          fn=set_true, default=None,
+          use="Use ssl connection for migration.")
+
 def help():
     return str(gopts)
     
@@ -65,11 +69,13 @@ def main(argv):
         vm_ref = get_single_vm(dom)
         other_config = {
             "port":     opts.vals.port,
-            "node":     opts.vals.node
+            "node":     opts.vals.node,
+            "ssl":      opts.vals.ssl
             }
         server.xenapi.VM.migrate(vm_ref, dst, bool(opts.vals.live),
                                  other_config)
     else:
         server.xend.domain.migrate(dom, dst, opts.vals.live,
                                    opts.vals.port,
-                                   opts.vals.node)
+                                   opts.vals.node,
+                                   opts.vals.ssl)

_______________________________________________
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] Add -s --ssl option to xm migrate, Xen patchbot-unstable <=