summaryrefslogtreecommitdiffstats
path: root/src/python
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2014-05-07 10:51:30 +0200
committerJan Synacek <jsynacek@redhat.com>2014-05-12 09:00:17 +0200
commitf5923aed88c2d163d76e16de82e9a9999609372f (patch)
treec6b7712636dd0263d1d7cb5bed0e10abd9a31c87 /src/python
parentfcf9a1cb25a736fe306699ec47176fe86bc70a2f (diff)
downloadopenlmi-providers-f5923aed88c2d163d76e16de82e9a9999609372f.tar.gz
openlmi-providers-f5923aed88c2d163d76e16de82e9a9999609372f.tar.xz
openlmi-providers-f5923aed88c2d163d76e16de82e9a9999609372f.zip
logicalfile: test providers' configuration
Diffstat (limited to 'src/python')
-rw-r--r--src/python/lmi/test/cimbase.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/python/lmi/test/cimbase.py b/src/python/lmi/test/cimbase.py
index f5155a3..4582d8e 100644
--- a/src/python/lmi/test/cimbase.py
+++ b/src/python/lmi/test/cimbase.py
@@ -27,6 +27,7 @@ import BaseHTTPServer
import pywbem
import Queue
import random
+import subprocess
import threading
import time
@@ -360,3 +361,21 @@ class CIMTestCase(base.BaseLmiTestCase):
jobname = outparams['Job']
(ret, outparams) = self.finish_job(jobname, return_constructor)
return (ret, outparams)
+
+ def restart_cim(self):
+ """
+ Restart CIMOM
+ """
+ ret = self.log_run(["systemctl", "restart", self.cimom])
+ time.sleep(1)
+ if ret == 0:
+ CIMTestCase._WBEMCONNECTION = None
+ return ret
+
+ def log_run(self, args):
+ """
+ Print arguments and run them.
+ args must be prepared for subprocess.call()
+ """
+ print "Running:", " ".join(args)
+ return subprocess.call(args)