
# HG changeset patch # User Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1236853111 25200 # Node ID 873ac33542e0a2cfc49a7f1ca89c0190bafe58cd # Parent 676a8b05baa09b69052d519c7b438b301bea849c [TEST] Adding option to main.py to accept target machine info for Migration Tests. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r 676a8b05baa0 -r 873ac33542e0 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Tue Mar 10 22:27:59 2009 -0700 +++ b/suites/libvirt-cim/main.py Thu Mar 12 03:18:31 2009 -0700 @@ -44,6 +44,8 @@ parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", help="IP address of machine to test (default: localhost)") +parser.add_option("-m", "--target_url", dest="t_url", default="localhost:5988", + help="URL of destination host for remote migration ") parser.add_option("-p", "--port", dest="port", type="int", default=5988, help="CIMOM port (default: 5988)") parser.add_option("-g", "--group", dest="group", @@ -199,6 +201,21 @@ # with a different port if options.port: os.environ['CIMOM_PORT'] = str(options.port) + + if ":" in options.ip: + (s_sysname, port) = options.ip.split(":") + else: + s_sysname = options.ip + + if ":" in options.t_url: + (t_sysname, port) = options.t_url.split(":") + else: + t_sysname = options.t_url + + # HACK: To be able to use the src and target host + # comparison for remote migration + os.environ['SRC_IP'] = str(s_sysname) + os.environ['TARGET_IP'] = str(t_sysname) if options.report: to_addr = options.report