diff options
author | Adrian Likins <alikins@redhat.com> | 2007-09-20 19:02:50 -0400 |
---|---|---|
committer | Adrian Likins <alikins@redhat.com> | 2007-09-20 19:02:50 -0400 |
commit | d21081735c98b717a6ba726fb7afb50a446d021a (patch) | |
tree | 028fe381072782c5ef30af10cee89e49fbe153c9 /client | |
parent | 895c2af960d789798884a2f4af4b941254ab83f6 (diff) | |
parent | c0d315b2fd35c4ca8291f9a8c7f7be7bcd1cfa89 (diff) | |
download | third_party-func-d21081735c98b717a6ba726fb7afb50a446d021a.tar.gz third_party-func-d21081735c98b717a6ba726fb7afb50a446d021a.tar.xz third_party-func-d21081735c98b717a6ba726fb7afb50a446d021a.zip |
Merge branch 'master' of ssh://git.fedoraproject.org/git/hosted/func
Diffstat (limited to 'client')
-rw-r--r-- | client/test_func.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/client/test_func.py b/client/test_func.py index ede9bbf..a108c47 100644 --- a/client/test_func.py +++ b/client/test_func.py @@ -5,10 +5,33 @@ import xmlrpclib +TEST_VIRT = True +TEST_SERVICES = True + +# get a connecton (to be replaced by client lib logic) s = xmlrpclib.ServerProxy("http://127.0.0.1:51234") +# here's the basic test... print s.test_add(1, 2) -print s.service_restart("httpd") +# here's the service module testing +if TEST_SERVICES: + print s.service_restart("httpd") + +# this is so I can remember how the virt module works +if TEST_VIRT: + + # example of using koan to install a virtual machine + # s.virt_install("mdehaan.rdu.redhat.com","fc7webserver",False) + + # wait ... + vms = s.virt_list_vms() + # example of stopping all stopped virtual machines + print "list of virtual instances = %s" % vms + for vm in vms: + status = s.virt_status(vm) + if status == "stopped": + s.virt_start(vm) +# add more tests here |