[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [test-API PATCH 6/6] Make use of new 'uri' parameter in tests



I changed all tests to make use of the 'uri' parameter. This change
should be more re-factored and lots of things could be changed to make
the code more readable, but unfortunately there's no time for that
right now, so at least this small step towards the goal.
---
 repos/domain/attach_disk.py                        |    2 +-
 repos/domain/attach_interface.py                   |    2 +-
 repos/domain/autostart.py                          |    2 +-
 repos/domain/balloon_memory.py                     |    2 +-
 repos/domain/blkstats.py                           |    2 +-
 repos/domain/cpu_affinity.py                       |    2 +-
 repos/domain/cpu_topology.py                       |    2 +-
 repos/domain/create.py                             |    2 +-
 repos/domain/destroy.py                            |    2 +-
 repos/domain/detach_disk.py                        |    2 +-
 repos/domain/detach_interface.py                   |    2 +-
 repos/domain/domain_blkinfo.py                     |    2 +-
 repos/domain/domain_id.py                          |    2 +-
 repos/domain/domain_uuid.py                        |    2 +-
 repos/domain/dump.py                               |    2 +-
 repos/domain/eventhandler.py                       |    2 +-
 repos/domain/ifstats.py                            |    2 +-
 repos/domain/install_image.py                      |    6 ++++--
 repos/domain/install_linux_cdrom.py                |    6 +++---
 repos/domain/install_linux_check.py                |    2 +-
 repos/domain/install_linux_net.py                  |    7 ++++---
 repos/domain/install_windows_cdrom.py              |    7 ++++---
 repos/domain/ownership_test.py                     |    2 +-
 repos/domain/reboot.py                             |    2 +-
 repos/domain/restore.py                            |    2 +-
 repos/domain/resume.py                             |    2 +-
 repos/domain/save.py                               |    2 +-
 repos/domain/sched_params.py                       |    2 +-
 repos/domain/shutdown.py                           |    2 +-
 repos/domain/start.py                              |    2 +-
 repos/domain/suspend.py                            |    2 +-
 repos/domain/undefine.py                           |    2 +-
 repos/domain/update_devflag.py                     |    2 +-
 repos/interface/create.py                          |    2 +-
 repos/interface/define.py                          |    2 +-
 repos/interface/destroy.py                         |    2 +-
 repos/interface/undefine.py                        |    2 +-
 repos/libvirtd/qemu_hang.py                        |    2 +-
 repos/libvirtd/restart.py                          |    2 +-
 repos/network/autostart.py                         |    2 +-
 repos/network/create.py                            |    2 +-
 repos/network/define.py                            |    2 +-
 repos/network/destroy.py                           |    2 +-
 repos/network/network_list.py                      |    2 +-
 repos/network/network_name.py                      |    2 +-
 repos/network/network_uuid.py                      |    2 +-
 repos/network/start.py                             |    2 +-
 repos/network/undefine.py                          |    2 +-
 repos/nodedevice/detach.py                         |    2 +-
 repos/nodedevice/reattach.py                       |    2 +-
 repos/nodedevice/reset.py                          |    2 +-
 repos/npiv/create_virtual_hba.py                   |    2 +-
 .../multiple_thread_block_on_domain_create.py      |    2 +-
 repos/sVirt/domain_nfs_start.py                    |    4 ++--
 repos/snapshot/delete.py                           |    2 +-
 repos/snapshot/file_flag.py                        |    2 +-
 repos/snapshot/flag_check.py                       |    2 +-
 repos/snapshot/internal_create.py                  |    2 +-
 repos/snapshot/revert.py                           |    2 +-
 repos/storage/activate_pool.py                     |    2 +-
 repos/storage/build_dir_pool.py                    |    2 +-
 repos/storage/build_disk_pool.py                   |    2 +-
 repos/storage/build_logical_pool.py                |    2 +-
 repos/storage/build_netfs_pool.py                  |    2 +-
 repos/storage/create_dir_pool.py                   |    2 +-
 repos/storage/create_dir_volume.py                 |    2 +-
 repos/storage/create_fs_pool.py                    |    2 +-
 repos/storage/create_iscsi_pool.py                 |    2 +-
 repos/storage/create_logical_volume.py             |    2 +-
 repos/storage/create_netfs_pool.py                 |    2 +-
 repos/storage/create_netfs_volume.py               |    2 +-
 repos/storage/create_partition_volume.py           |    2 +-
 repos/storage/define_dir_pool.py                   |    2 +-
 repos/storage/define_disk_pool.py                  |    2 +-
 repos/storage/define_iscsi_pool.py                 |    2 +-
 repos/storage/define_logical_pool.py               |    2 +-
 repos/storage/define_mpath_pool.py                 |    2 +-
 repos/storage/define_netfs_pool.py                 |    2 +-
 repos/storage/define_scsi_pool.py                  |    2 +-
 repos/storage/delete_dir_volume.py                 |    2 +-
 repos/storage/delete_logical_pool.py               |    2 +-
 repos/storage/delete_logical_volume.py             |    2 +-
 repos/storage/delete_netfs_volume.py               |    2 +-
 repos/storage/delete_partition_volume.py           |    2 +-
 repos/storage/destroy_pool.py                      |    2 +-
 repos/storage/pool_name.py                         |    2 +-
 repos/storage/pool_uuid.py                         |    2 +-
 repos/storage/undefine_pool.py                     |    2 +-
 88 files changed, 100 insertions(+), 96 deletions(-)

diff --git a/repos/domain/attach_disk.py b/repos/domain/attach_disk.py
index 3a1175e..4faaf65 100644
--- a/repos/domain/attach_disk.py
+++ b/repos/domain/attach_disk.py
@@ -87,7 +87,7 @@ def attach_disk(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/attach_interface.py b/repos/domain/attach_interface.py
index 9d475a3..0dcce11 100644
--- a/repos/domain/attach_interface.py
+++ b/repos/domain/attach_interface.py
@@ -71,7 +71,7 @@ def attach_interface(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/autostart.py b/repos/domain/autostart.py
index f0fc97c..ead5bcb 100644
--- a/repos/domain/autostart.py
+++ b/repos/domain/autostart.py
@@ -84,7 +84,7 @@ def autostart(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/balloon_memory.py b/repos/domain/balloon_memory.py
index 0a40591..10dc0a8 100644
--- a/repos/domain/balloon_memory.py
+++ b/repos/domain/balloon_memory.py
@@ -179,7 +179,7 @@ def balloon_memory(params):
     # Connect to local hypervisor connection URI
     global util
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     logger.info("get the mac address of vm %s" % domain_name)
     mac = util.get_dom_mac_addr(domain_name)
diff --git a/repos/domain/blkstats.py b/repos/domain/blkstats.py
index 67592f0..f79050b 100644
--- a/repos/domain/blkstats.py
+++ b/repos/domain/blkstats.py
@@ -57,7 +57,7 @@ def blkstats(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/cpu_affinity.py b/repos/domain/cpu_affinity.py
index 380b307..dc2b8e0 100644
--- a/repos/domain/cpu_affinity.py
+++ b/repos/domain/cpu_affinity.py
@@ -242,7 +242,7 @@ def cpu_affinity(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
     hypervisor = uri.split(':')[0]
diff --git a/repos/domain/cpu_topology.py b/repos/domain/cpu_topology.py
index adf238c..2791610 100644
--- a/repos/domain/cpu_topology.py
+++ b/repos/domain/cpu_topology.py
@@ -213,7 +213,7 @@ def cpu_topology(params):
     logger.info("threads is %s" % threads)

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     logger.info("the uri is %s" % uri)
     conn = connectAPI.ConnectAPI()
diff --git a/repos/domain/create.py b/repos/domain/create.py
index 4e3e1c4..ccbbc06 100644
--- a/repos/domain/create.py
+++ b/repos/domain/create.py
@@ -99,7 +99,7 @@ def create(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/destroy.py b/repos/domain/destroy.py
index 9187d34..6ae915d 100644
--- a/repos/domain/destroy.py
+++ b/repos/domain/destroy.py
@@ -71,7 +71,7 @@ def destroy(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/detach_disk.py b/repos/domain/detach_disk.py
index 21c6598..bdeb1ce 100644
--- a/repos/domain/detach_disk.py
+++ b/repos/domain/detach_disk.py
@@ -75,7 +75,7 @@ def detach_disk(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/detach_interface.py b/repos/domain/detach_interface.py
index 6639336..298be4f 100644
--- a/repos/domain/detach_interface.py
+++ b/repos/domain/detach_interface.py
@@ -73,7 +73,7 @@ def detach_interface(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     macs = util.get_dom_mac_addr(guestname)
     mac_list = macs.split("\n")
     logger.debug("mac address: \n%s" % macs)
diff --git a/repos/domain/domain_blkinfo.py b/repos/domain/domain_blkinfo.py
index 700bf02..5a33cc3 100644
--- a/repos/domain/domain_blkinfo.py
+++ b/repos/domain/domain_blkinfo.py
@@ -123,7 +123,7 @@ def domblkinfo(params):
     logger.info("the block device is %s" % blockdev)

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/domain_id.py b/repos/domain/domain_id.py
index 6216e30..211b1cf 100644
--- a/repos/domain/domain_id.py
+++ b/repos/domain/domain_id.py
@@ -77,7 +77,7 @@ def domid(params):
         return 1

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/domain_uuid.py b/repos/domain/domain_uuid.py
index 8b02a15..acce192 100644
--- a/repos/domain/domain_uuid.py
+++ b/repos/domain/domain_uuid.py
@@ -71,7 +71,7 @@ def domuuid(params):
         logger.info("guest name is %s" % guestname)

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/dump.py b/repos/domain/dump.py
index 15951e6..b9b0d35 100644
--- a/repos/domain/dump.py
+++ b/repos/domain/dump.py
@@ -164,7 +164,7 @@ def dump(dicts):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/eventhandler.py b/repos/domain/eventhandler.py
index 7bbd157..3ef4a11 100644
--- a/repos/domain/eventhandler.py
+++ b/repos/domain/eventhandler.py
@@ -253,7 +253,7 @@ def eventhandler(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()

     virconn = conn.open(uri)
diff --git a/repos/domain/ifstats.py b/repos/domain/ifstats.py
index 73ff9b7..4008634 100644
--- a/repos/domain/ifstats.py
+++ b/repos/domain/ifstats.py
@@ -63,7 +63,7 @@ def ifstats(params):
     test_result = False

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/domain/install_image.py b/repos/domain/install_image.py
index 888e80f..6abfaee 100644
--- a/repos/domain/install_image.py
+++ b/repos/domain/install_image.py
@@ -17,7 +17,7 @@
 __author__ = "Guannan Ren <gren redhat com>"
 __date__ = "Tue Mar 15 2010"
 __version__ = "0.1.0"
-__credits__ = "Copyright (C) 2010 Red Hat, Inc."
+__credits__ = "Copyright (C) 2010, 2012 Red Hat, Inc."
 __all__ = ['install_windows', 'usage']

 import os
@@ -84,6 +84,9 @@ def install_image(params):
     global logger
     logger = params['logger']
     params.pop('logger')
+    uri = params['uri']
+    params.pop('uri')
+
     logger.info("Checking the validation of arguments provided.")
     params_check_result = check_params(params)

@@ -105,7 +108,6 @@ def install_image(params):
     # Connect to local hypervisor connection URI
     util = utils.Utils()
     hypervisor = util.get_hypervisor()
-    uri = util.get_uri('127.0.0.1')

     logger.info("the type of hypervisor is %s" % hypervisor)
     logger.debug("the uri to connect is %s" % uri)
diff --git a/repos/domain/install_linux_cdrom.py b/repos/domain/install_linux_cdrom.py
index 79dd41c..357740b 100644
--- a/repos/domain/install_linux_cdrom.py
+++ b/repos/domain/install_linux_cdrom.py
@@ -51,7 +51,7 @@ from exception import LibvirtAPI
 __author__ = "Guannan Ren <gren redhat com>"
 __date__ = "Tue Mar 11 2010"
 __version__ = "0.1.0"
-__credits__ = "Copyright (C) 2010 Red Hat, Inc."
+__credits__ = "Copyright (C) 2010, 2012 Red Hat, Inc."
 __all__ = ['install_linux_cdrom', 'usage']

 VIRSH_QUIET_LIST = "virsh --quiet list --all|awk '{print $2}'|grep \"^%s$\""
@@ -222,8 +222,9 @@ def install_linux_cdrom(params):
     """ install a new virtual machine """
     global logger
     logger = params['logger']
-
     params.pop('logger')
+    uri = params['uri']
+    params.pop('uri')

     logger.info("Checking the validation of arguments provided.")
     params_check_result = check_params(params)
@@ -242,7 +243,6 @@ def install_linux_cdrom(params):
     logger.info("the type of guest is %s" % guesttype)

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
     hypervisor = util.get_hypervisor()
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/domain/install_linux_check.py b/repos/domain/install_linux_check.py
index 4431b1c..1ac7b2d 100644
--- a/repos/domain/install_linux_check.py
+++ b/repos/domain/install_linux_check.py
@@ -114,7 +114,7 @@ def install_linux_check(params):
     # Connect to local hypervisor connection URI
     util = utils.Utils()
     hypervisor = util.get_hypervisor()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     logger.info("the type of hypervisor is %s" % hypervisor)
     logger.debug("the uri to connect is %s" % uri)
diff --git a/repos/domain/install_linux_net.py b/repos/domain/install_linux_net.py
index 0ef5036..748948c 100644
--- a/repos/domain/install_linux_net.py
+++ b/repos/domain/install_linux_net.py
@@ -22,7 +22,7 @@
 __author__ = "Guannan Ren <gren redhat com>"
 __date__ = "Wed Apr 07 2010"
 __version__ = "0.1.0"
-__credits__ = "Copyright (C) 2010 Red Hat, Inc."
+__credits__ = "Copyright (C) 2010, 2012 Red Hat, Inc."
 __all__ = ['install_linux', 'usage']

 import os
@@ -211,6 +211,9 @@ def install_linux_net(params):
     global logger
     logger = params['logger']
     params.pop('logger')
+    uri = params['uri']
+    params.pop('uri')
+
     logger.info("Checking the validation of arguments provided.")
     params_check_result = check_params(params)

@@ -232,7 +235,6 @@ def install_linux_net(params):
     util = utils.Utils()
     hypervisor = util.get_hypervisor()
     macaddr = util.get_rand_mac()
-    uri = util.get_uri('127.0.0.1')

     logger.info("the macaddress is %s" % macaddr)
     logger.info("the type of hypervisor is %s" % hypervisor)
@@ -495,4 +497,3 @@ def install_linux_net_clean(params):
         guest_dir = os.path.join(homepath, guestname)
         if os.path.exists(guest_dir):
             shutil.rmtree(guest_dir)
-
diff --git a/repos/domain/install_windows_cdrom.py b/repos/domain/install_windows_cdrom.py
index 79cd25c..1fd58e4 100644
--- a/repos/domain/install_windows_cdrom.py
+++ b/repos/domain/install_windows_cdrom.py
@@ -50,7 +50,7 @@ from exception import LibvirtAPI
 __author__ = "Guannan Ren <gren redhat com>"
 __date__ = "Tue Jun 29 2010"
 __version__ = "0.1.0"
-__credits__ = "Copyright (C) 2010 Red Hat, Inc."
+__credits__ = "Copyright (C) 2010, 2012 Red Hat, Inc."
 __all__ = ['install_windows_cdrom', 'usage']

 VIRSH_QUIET_LIST = "virsh --quiet list --all|awk '{print $2}'|grep \"^%s$\""
@@ -269,6 +269,9 @@ def install_windows_cdrom(params):
     global logger
     logger = params['logger']
     params.pop('logger')
+    uri = params['uri']
+    params.pop('uri')
+
     logger.info("Checking the validation of arguments provided.")
     params_check_result = check_params(params)
     if params_check_result:
@@ -291,8 +294,6 @@ def install_windows_cdrom(params):
         macaddr = util.get_rand_mac()
         params['macaddr'] = macaddr

-    uri = util.get_uri('127.0.0.1')
-
     logger.info("the macaddress is %s" % params['macaddr'])
     logger.info("the type of hypervisor is %s" % hypervisor)
     logger.debug("the uri to connect is %s" % uri)
diff --git a/repos/domain/ownership_test.py b/repos/domain/ownership_test.py
index 1eacbcf..52d3bf1 100644
--- a/repos/domain/ownership_test.py
+++ b/repos/domain/ownership_test.py
@@ -219,7 +219,7 @@ def ownership_test(params):
         return 1

     # Connect to local hypervisor connection URI
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/reboot.py b/repos/domain/reboot.py
index 03172c4..ba2fb51 100644
--- a/repos/domain/reboot.py
+++ b/repos/domain/reboot.py
@@ -59,7 +59,7 @@ def reboot(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     hypervisor = util.get_hypervisor()
     if hypervisor == "kvm":
         logger.info("kvm hypervisor doesn't support the funtion now")
diff --git a/repos/domain/restore.py b/repos/domain/restore.py
index 528bd75..77a5401 100644
--- a/repos/domain/restore.py
+++ b/repos/domain/restore.py
@@ -105,7 +105,7 @@ def restore(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/resume.py b/repos/domain/resume.py
index 798fd2a..da8088e 100644
--- a/repos/domain/resume.py
+++ b/repos/domain/resume.py
@@ -76,7 +76,7 @@ def resume(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     # Resume domain
     conn = connectAPI.ConnectAPI()
diff --git a/repos/domain/save.py b/repos/domain/save.py
index d9782e3..7c720ee 100644
--- a/repos/domain/save.py
+++ b/repos/domain/save.py
@@ -101,7 +101,7 @@ def save(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/sched_params.py b/repos/domain/sched_params.py
index aa736d2..76b8a5e 100644
--- a/repos/domain/sched_params.py
+++ b/repos/domain/sched_params.py
@@ -86,7 +86,7 @@ def sched_params(params):
        to verify validity of the result
     """
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     hypervisor = util.get_hypervisor()
     usage(params, hypervisor)

diff --git a/repos/domain/shutdown.py b/repos/domain/shutdown.py
index 28c01ba..6d6ee84 100644
--- a/repos/domain/shutdown.py
+++ b/repos/domain/shutdown.py
@@ -73,7 +73,7 @@ def shutdown(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/start.py b/repos/domain/start.py
index 38bad7f..0edb3fc 100644
--- a/repos/domain/start.py
+++ b/repos/domain/start.py
@@ -89,7 +89,7 @@ def start(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/suspend.py b/repos/domain/suspend.py
index 19c26cf..b08be43 100644
--- a/repos/domain/suspend.py
+++ b/repos/domain/suspend.py
@@ -76,7 +76,7 @@ def suspend(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/undefine.py b/repos/domain/undefine.py
index 13412fa..c4c961a 100644
--- a/repos/domain/undefine.py
+++ b/repos/domain/undefine.py
@@ -58,7 +58,7 @@ def undefine(params):

     # Connect to local hypervisor connection URI
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/domain/update_devflag.py b/repos/domain/update_devflag.py
index de69c5e..f4ea78b 100644
--- a/repos/domain/update_devflag.py
+++ b/repos/domain/update_devflag.py
@@ -212,7 +212,7 @@ def update_devflag(params):
         flag = domainAPI.VIR_DOMAIN_AFFECT_CONFIG

     # Connect to local hypervisor connection URI
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     mac = util.get_dom_mac_addr(guestname)
     guestip = util.mac_to_ip(mac, 180)
     logger.debug("ip address: %s" % guestip)
diff --git a/repos/interface/create.py b/repos/interface/create.py
index 41e5dcc..ee751fe 100644
--- a/repos/interface/create.py
+++ b/repos/interface/create.py
@@ -90,7 +90,7 @@ def create(params):
     ifacename = params['ifacename']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     try:
         hostip = util.get_ip_address(ifacename)
         logger.error("interface %s is running" % ifacename)
diff --git a/repos/interface/define.py b/repos/interface/define.py
index 054bd54..b8cccf7 100644
--- a/repos/interface/define.py
+++ b/repos/interface/define.py
@@ -82,7 +82,7 @@ def define(params):
     params['dhcp'] = 'yes'

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/interface/destroy.py b/repos/interface/destroy.py
index 771fa74..d9ef512 100644
--- a/repos/interface/destroy.py
+++ b/repos/interface/destroy.py
@@ -88,7 +88,7 @@ def destroy(params):
     ifacename = params['ifacename']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     try:
         hostip = util.get_ip_address(ifacename)
         logger.info("interface %s is active" % ifacename)
diff --git a/repos/interface/undefine.py b/repos/interface/undefine.py
index 7d49942..737360c 100644
--- a/repos/interface/undefine.py
+++ b/repos/interface/undefine.py
@@ -81,7 +81,7 @@ def undefine(params):
     ifacename = params['ifacename']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/libvirtd/qemu_hang.py b/repos/libvirtd/qemu_hang.py
index 8b1ffda..8a0ce3d 100644
--- a/repos/libvirtd/qemu_hang.py
+++ b/repos/libvirtd/qemu_hang.py
@@ -99,7 +99,7 @@ def qemu_hang(params):
     logger = params['logger']
     guestname = params['guestname']
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/libvirtd/restart.py b/repos/libvirtd/restart.py
index 2d217cb..1320850 100644
--- a/repos/libvirtd/restart.py
+++ b/repos/libvirtd/restart.py
@@ -99,7 +99,7 @@ def restart(params):
     logger = params['logger']
     guestname = params['guestname']
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/network/autostart.py b/repos/network/autostart.py
index ba4b4f1..9a1deda 100644
--- a/repos/network/autostart.py
+++ b/repos/network/autostart.py
@@ -95,7 +95,7 @@ def autostart(params):
         return 1

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     logger.info("uri address is %s" % uri)

diff --git a/repos/network/create.py b/repos/network/create.py
index a667441..ccda782 100644
--- a/repos/network/create.py
+++ b/repos/network/create.py
@@ -65,7 +65,7 @@ def create(params):
     test_result = False

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/network/define.py b/repos/network/define.py
index dda8d06..7078721 100644
--- a/repos/network/define.py
+++ b/repos/network/define.py
@@ -73,7 +73,7 @@ def define(params):
     test_result = False

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/network/destroy.py b/repos/network/destroy.py
index 51663ac..ca60bea 100644
--- a/repos/network/destroy.py
+++ b/repos/network/destroy.py
@@ -66,7 +66,7 @@ def destroy(params):
     test_result = False

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/network/network_list.py b/repos/network/network_list.py
index 7448fd9..e2c7716 100644
--- a/repos/network/network_list.py
+++ b/repos/network/network_list.py
@@ -176,7 +176,7 @@ def network_list(params):
         return 1

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/network/network_name.py b/repos/network/network_name.py
index 5b78dec..25700ab 100644
--- a/repos/network/network_name.py
+++ b/repos/network/network_name.py
@@ -72,7 +72,7 @@ def netname(params):
         networkname = params['networkname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/network/network_uuid.py b/repos/network/network_uuid.py
index be30fd2..6129e59 100644
--- a/repos/network/network_uuid.py
+++ b/repos/network/network_uuid.py
@@ -72,7 +72,7 @@ def netuuid(params):
         networkname = params['networkname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/network/start.py b/repos/network/start.py
index b28b635..1bd9120 100644
--- a/repos/network/start.py
+++ b/repos/network/start.py
@@ -63,7 +63,7 @@ def start(params):
                  networkname)

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     logger.info("uri address is %s" % uri)

diff --git a/repos/network/undefine.py b/repos/network/undefine.py
index d7e903e..4cc1b1b 100644
--- a/repos/network/undefine.py
+++ b/repos/network/undefine.py
@@ -65,7 +65,7 @@ def undefine(params):
     test_result = False

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/nodedevice/detach.py b/repos/nodedevice/detach.py
index 18e792e..00a2021 100644
--- a/repos/nodedevice/detach.py
+++ b/repos/nodedevice/detach.py
@@ -82,7 +82,7 @@ def detach(dicts):
     logger.info("original device driver: %s" % original_driver)

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     kernel_version = util.get_host_kernel_version()
     hypervisor = util.get_hypervisor()
diff --git a/repos/nodedevice/reattach.py b/repos/nodedevice/reattach.py
index 8eafb1d..deb5222 100644
--- a/repos/nodedevice/reattach.py
+++ b/repos/nodedevice/reattach.py
@@ -81,7 +81,7 @@ def reattach(dicts):
     logger.info("original device driver: %s" % original_driver)

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     kernel_version = util.get_host_kernel_version()
     hypervisor = util.get_hypervisor()
diff --git a/repos/nodedevice/reset.py b/repos/nodedevice/reset.py
index 40ba95b..43f3828 100644
--- a/repos/nodedevice/reset.py
+++ b/repos/nodedevice/reset.py
@@ -58,7 +58,7 @@ def reset(dicts):
     pciaddress = dicts['pciaddress']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     kernel_version = util.get_host_kernel_version()

diff --git a/repos/npiv/create_virtual_hba.py b/repos/npiv/create_virtual_hba.py
index e86b85a..ab913a3 100644
--- a/repos/npiv/create_virtual_hba.py
+++ b/repos/npiv/create_virtual_hba.py
@@ -88,7 +88,7 @@ def create_virtual_hba(params):
         return 1

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/regression/multiple_thread_block_on_domain_create.py b/repos/regression/multiple_thread_block_on_domain_create.py
index 82cf3d1..d38eb4b 100644
--- a/repos/regression/multiple_thread_block_on_domain_create.py
+++ b/repos/regression/multiple_thread_block_on_domain_create.py
@@ -145,7 +145,7 @@ def multiple_thread_block_on_domain_create(params):

     util = utils.Utils()
     hypervisor = util.get_hypervisor()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     auth = [[connectAPI.VIR_CRED_AUTHNAME, connectAPI.VIR_CRED_PASSPHRASE], request_credentials, None]

diff --git a/repos/sVirt/domain_nfs_start.py b/repos/sVirt/domain_nfs_start.py
index edaf2f2..91c51f0 100644
--- a/repos/sVirt/domain_nfs_start.py
+++ b/repos/sVirt/domain_nfs_start.py
@@ -170,7 +170,7 @@ def domain_nfs_start(params):
     util = utils.Utils()

     # Connect to local hypervisor connection URI
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
     domobj = domainAPI.DomainAPI(virconn)
@@ -458,7 +458,7 @@ def domain_nfs_start_clean(params):
     util = utils.Utils()

     # Connect to local hypervisor connection URI
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
     domobj = domainAPI.DomainAPI(virconn)
diff --git a/repos/snapshot/delete.py b/repos/snapshot/delete.py
index 98f82a5..7a6f1c8 100644
--- a/repos/snapshot/delete.py
+++ b/repos/snapshot/delete.py
@@ -82,7 +82,7 @@ def delete(params):
     snapshotname = params['snapshotname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/snapshot/file_flag.py b/repos/snapshot/file_flag.py
index 5c5b2c7..956a628 100644
--- a/repos/snapshot/file_flag.py
+++ b/repos/snapshot/file_flag.py
@@ -88,7 +88,7 @@ def file_flag(params):

     util = utils.Utils()
     chk = check.Check()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/snapshot/flag_check.py b/repos/snapshot/flag_check.py
index 70fb506..d7f22f0 100644
--- a/repos/snapshot/flag_check.py
+++ b/repos/snapshot/flag_check.py
@@ -78,7 +78,7 @@ def flag_check(params):

     util = utils.Utils()
     chk = check.Check()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/snapshot/internal_create.py b/repos/snapshot/internal_create.py
index 7ec1d30..3ca0b0b 100644
--- a/repos/snapshot/internal_create.py
+++ b/repos/snapshot/internal_create.py
@@ -91,7 +91,7 @@ def internal_create(params):
         params['snapshotname'] = str(int(time.time()))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/snapshot/revert.py b/repos/snapshot/revert.py
index dafcf44..44d8eb2 100644
--- a/repos/snapshot/revert.py
+++ b/repos/snapshot/revert.py
@@ -65,7 +65,7 @@ def revert(params):
     snapshotname = params['snapshotname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/storage/activate_pool.py b/repos/storage/activate_pool.py
index 2b27be6..8223b65 100644
--- a/repos/storage/activate_pool.py
+++ b/repos/storage/activate_pool.py
@@ -88,7 +88,7 @@ def activate_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/build_dir_pool.py b/repos/storage/build_dir_pool.py
index 5765b36..b2c48a9 100644
--- a/repos/storage/build_dir_pool.py
+++ b/repos/storage/build_dir_pool.py
@@ -88,7 +88,7 @@ def build_dir_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/build_disk_pool.py b/repos/storage/build_disk_pool.py
index be36ea8..8f6f7aa 100644
--- a/repos/storage/build_disk_pool.py
+++ b/repos/storage/build_disk_pool.py
@@ -120,7 +120,7 @@ def build_disk_pool(params):
     logger.info("the poolname is %s" % (poolname))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/build_logical_pool.py b/repos/storage/build_logical_pool.py
index f761fd1..fefbacb 100644
--- a/repos/storage/build_logical_pool.py
+++ b/repos/storage/build_logical_pool.py
@@ -100,7 +100,7 @@ def build_logical_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/build_netfs_pool.py b/repos/storage/build_netfs_pool.py
index d0012ff..8805e5f 100644
--- a/repos/storage/build_netfs_pool.py
+++ b/repos/storage/build_netfs_pool.py
@@ -87,7 +87,7 @@ def build_netfs_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/create_dir_pool.py b/repos/storage/create_dir_pool.py
index d497fdb..9397342 100644
--- a/repos/storage/create_dir_pool.py
+++ b/repos/storage/create_dir_pool.py
@@ -90,7 +90,7 @@ def create_dir_pool(params):
     pooltype = params['pooltype']

     util = utils.Utils()
-    uri  = util.get_uri('127.0.0.1')
+    uri  = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/create_dir_volume.py b/repos/storage/create_dir_volume.py
index 6022e7b..5cd9575 100644
--- a/repos/storage/create_dir_volume.py
+++ b/repos/storage/create_dir_volume.py
@@ -138,7 +138,7 @@ def create_dir_volume(params):
                 (poolname, volname, volformat, capacity))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/create_fs_pool.py b/repos/storage/create_fs_pool.py
index 887b91d..96c274a 100644
--- a/repos/storage/create_fs_pool.py
+++ b/repos/storage/create_fs_pool.py
@@ -117,7 +117,7 @@ def create_fs_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri  = util.get_uri('127.0.0.1')
+    uri  = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/create_iscsi_pool.py b/repos/storage/create_iscsi_pool.py
index d642ddd..a84969c 100644
--- a/repos/storage/create_iscsi_pool.py
+++ b/repos/storage/create_iscsi_pool.py
@@ -97,7 +97,7 @@ def create_iscsi_pool(params):
     pooltype = params['pooltype']

     util = utils.Utils()
-    uri  = util.get_uri('127.0.0.1')
+    uri  = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/create_logical_volume.py b/repos/storage/create_logical_volume.py
index e41bede..b693a01 100644
--- a/repos/storage/create_logical_volume.py
+++ b/repos/storage/create_logical_volume.py
@@ -134,7 +134,7 @@ def create_logical_volume(params):
     # default is KB in the /etc/lvm/backup/{poolname}
     caps_kbyte = dicts['capacity_byte']/1024

-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/storage/create_netfs_pool.py b/repos/storage/create_netfs_pool.py
index 8ea781b..9562fd6 100644
--- a/repos/storage/create_netfs_pool.py
+++ b/repos/storage/create_netfs_pool.py
@@ -120,7 +120,7 @@ def create_netfs_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri  = util.get_uri('127.0.0.1')
+    uri  = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/create_netfs_volume.py b/repos/storage/create_netfs_volume.py
index 65d1215..4423c0b 100644
--- a/repos/storage/create_netfs_volume.py
+++ b/repos/storage/create_netfs_volume.py
@@ -136,7 +136,7 @@ def create_netfs_volume(params):
                  (poolname, volname, volformat, capacity))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/create_partition_volume.py b/repos/storage/create_partition_volume.py
index 4772ea6..528df56 100644
--- a/repos/storage/create_partition_volume.py
+++ b/repos/storage/create_partition_volume.py
@@ -119,7 +119,7 @@ def create_partition_volume(params):
                  (poolname, volname, volformat, capacity))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/define_dir_pool.py b/repos/storage/define_dir_pool.py
index 03b15b7..5f56374 100644
--- a/repos/storage/define_dir_pool.py
+++ b/repos/storage/define_dir_pool.py
@@ -85,7 +85,7 @@ def define_dir_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/define_disk_pool.py b/repos/storage/define_disk_pool.py
index 4b47814..0d1a929 100644
--- a/repos/storage/define_disk_pool.py
+++ b/repos/storage/define_disk_pool.py
@@ -103,7 +103,7 @@ def define_disk_pool(params):
                  (poolname, pooltype, sourcepath))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/define_iscsi_pool.py b/repos/storage/define_iscsi_pool.py
index 5711159..39b3f18 100644
--- a/repos/storage/define_iscsi_pool.py
+++ b/repos/storage/define_iscsi_pool.py
@@ -98,7 +98,7 @@ def define_iscsi_pool(params):
     srcpath = params['sourcepath']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/define_logical_pool.py b/repos/storage/define_logical_pool.py
index 71dbdeb..9715771 100644
--- a/repos/storage/define_logical_pool.py
+++ b/repos/storage/define_logical_pool.py
@@ -76,7 +76,7 @@ def define_logical_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/define_mpath_pool.py b/repos/storage/define_mpath_pool.py
index 89db5ef..29c80aa 100644
--- a/repos/storage/define_mpath_pool.py
+++ b/repos/storage/define_mpath_pool.py
@@ -97,7 +97,7 @@ def define_mpath_pool(params):
     logger.info("the poolname is %s, pooltype is %s" % (poolname, pooltype))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/define_netfs_pool.py b/repos/storage/define_netfs_pool.py
index 68d7c86..6d2db46 100644
--- a/repos/storage/define_netfs_pool.py
+++ b/repos/storage/define_netfs_pool.py
@@ -77,7 +77,7 @@ def define_netfs_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/define_scsi_pool.py b/repos/storage/define_scsi_pool.py
index 6afbe01..90be53b 100644
--- a/repos/storage/define_scsi_pool.py
+++ b/repos/storage/define_scsi_pool.py
@@ -101,7 +101,7 @@ def define_scsi_pool(params):
                 (poolname, pooltype, sourcename))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/delete_dir_volume.py b/repos/storage/delete_dir_volume.py
index 7e6c714..7d8bfc2 100644
--- a/repos/storage/delete_dir_volume.py
+++ b/repos/storage/delete_dir_volume.py
@@ -95,7 +95,7 @@ def delete_dir_volume(params):
     volname = params['volname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/delete_logical_pool.py b/repos/storage/delete_logical_pool.py
index c880aa3..4bf92f1 100644
--- a/repos/storage/delete_logical_pool.py
+++ b/repos/storage/delete_logical_pool.py
@@ -95,7 +95,7 @@ def delete_logical_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/delete_logical_volume.py b/repos/storage/delete_logical_volume.py
index 3dc7036..f89cecd 100644
--- a/repos/storage/delete_logical_volume.py
+++ b/repos/storage/delete_logical_volume.py
@@ -115,7 +115,7 @@ def delete_logical_volume(params):
     volname = params['volname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/delete_netfs_volume.py b/repos/storage/delete_netfs_volume.py
index e719087..8d8b863 100644
--- a/repos/storage/delete_netfs_volume.py
+++ b/repos/storage/delete_netfs_volume.py
@@ -95,7 +95,7 @@ def delete_netfs_volume(params):
     volname = params['volname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/delete_partition_volume.py b/repos/storage/delete_partition_volume.py
index 65ef0b5..cf0fd3a 100644
--- a/repos/storage/delete_partition_volume.py
+++ b/repos/storage/delete_partition_volume.py
@@ -106,7 +106,7 @@ def delete_partition_volume(params):
     logger.info("the poolname is %s, volname is %s" % (poolname, volname))

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
diff --git a/repos/storage/destroy_pool.py b/repos/storage/destroy_pool.py
index 9b99d74..2bcbd70 100644
--- a/repos/storage/destroy_pool.py
+++ b/repos/storage/destroy_pool.py
@@ -90,7 +90,7 @@ def destroy_pool(params):

     poolname = params['poolname']
     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
     stgobj = storageAPI.StorageAPI(virconn)
diff --git a/repos/storage/pool_name.py b/repos/storage/pool_name.py
index 15329c4..da59c9a 100644
--- a/repos/storage/pool_name.py
+++ b/repos/storage/pool_name.py
@@ -73,7 +73,7 @@ def pool_name(params):
         poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/storage/pool_uuid.py b/repos/storage/pool_uuid.py
index ba92466..f6f0dc7 100644
--- a/repos/storage/pool_uuid.py
+++ b/repos/storage/pool_uuid.py
@@ -73,7 +73,7 @@ def pool_uuid(params):
         poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']
     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)

diff --git a/repos/storage/undefine_pool.py b/repos/storage/undefine_pool.py
index 8246926..147a2d9 100644
--- a/repos/storage/undefine_pool.py
+++ b/repos/storage/undefine_pool.py
@@ -88,7 +88,7 @@ def undefine_pool(params):
     poolname = params['poolname']

     util = utils.Utils()
-    uri = util.get_uri('127.0.0.1')
+    uri = params['uri']

     conn = connectAPI.ConnectAPI()
     virconn = conn.open(uri)
-- 
1.7.3.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]