Last change
on this file since 18693 was 18693, checked in by vboxsync, 16 years ago |
SDK: proper SVN props
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/usr/bin/python
|
---|
2 |
|
---|
3 | #########################################################################################
|
---|
4 | #
|
---|
5 | # This Python program implements interactive script access to VBox services
|
---|
6 | #
|
---|
7 | # To run this example you need to have:
|
---|
8 | # - Python ZSI installed (see http://pywebsvcs.sourceforge.net/zsi.html)
|
---|
9 | # - VirtualBox webservice Python wrappers visible
|
---|
10 | # (such as PYTHONPATH=/opt/VirtualBox/sdk/bindings/webservice/python/lib)
|
---|
11 | # - VirtualBox webservice running (vboxwebsrv) on the local machine, or whatever WSDL says, for interactive sessions disable object watchdog with -t 0
|
---|
12 | #
|
---|
13 | #########################################################################################
|
---|
14 | from VirtualBox_services import *
|
---|
15 | from VirtualBox_wrappers import *
|
---|
16 |
|
---|
17 | import sys, traceback
|
---|
18 | from shellcommon import interpret, PerfCollector
|
---|
19 |
|
---|
20 | mgr = IWebsessionManager()
|
---|
21 | vbox = None
|
---|
22 |
|
---|
23 | try:
|
---|
24 | vbox = mgr.logon("test", "test")
|
---|
25 | except Exception, e:
|
---|
26 | print "Cannot log in:", e
|
---|
27 | traceback.print_exc()
|
---|
28 | print "***********************************************"
|
---|
29 | print "Have you started vboxwebsrv: 'vboxwebsrv -t 0'?"
|
---|
30 | print "***********************************************"
|
---|
31 | sys.exit(1)
|
---|
32 |
|
---|
33 | ctx = {'mgr':mgr, 'vb':vbox, 'ifaces': g_reflectionInfo, 'remote': True,
|
---|
34 | 'perf':PerfCollector(vbox)}
|
---|
35 |
|
---|
36 | interpret(ctx)
|
---|
37 |
|
---|
38 | mgr.logoff(vbox)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.