Hook up domain creator to dbus service. Fix dbus docs

This commit is contained in:
Daniel P. Berrange 2006-08-18 17:01:17 -04:00
parent 4327a7dd7d
commit 745bdea540
2 changed files with 25 additions and 19 deletions

View File

@ -8,33 +8,39 @@ Interface description
---------------------
The service is intended to run on the session bus, and when launched
will register a well known bus name of 'com.redhat.virt.manager.ui'.
will register a well known bus name of 'com.redhat.virt.manager'.
Within this service, a single object is to be exported under the
path of '/com/redhat/virt/manager/ui'.
path of '/com/redhat/virt/manager'.
This object implements a single interface 'com.redhat.virt.manager.ui'
This object implements a single interface 'com.redhat.virt.manager'
which contains the following methods:
- show_domain_performance(string:uuid)
- show_domain_performance(string:uri, string:uuid)
Takes a domain's UUID in printable string format and displays
the window showing detailed performance data
- show_domain_editor(string:uuid)
- show_domain_editor(string:uri, string:uuid)
Takes a domain's UUID in printable string format and displays
the window for configuring the VM hardware resources
- show_domain_console(string:uuid)
- show_domain_console(string:uri, string:uuid)
Takes a domain's UUID in printable string format and displays
the window for accessing the graphical framebuffer associated
with the VM.
- show_domain_creator()
- show_domain_creator(string:uri)
Displys the window for creating & configuring a new domain
- show_host_summary()
- show_host_summary(string:uri)
Displays the window showing a summary of all active domains
on the host
- show_connect()
Displays the dialog for connecting to a hypervisor
In all these methods the 'uri' parameter is the URI for the hypervisor,
typically either 'Xen', or 'test://default'.
Example usage from shell
------------------------
@ -46,12 +52,13 @@ command as follows:
$ dbus-send --session --dest="org.freedesktop.DBus" \
"/org/freedesktop/DBus" \
"org.freedesktop.DBus.StartServiceByName" \
"string:com.redhat.virt.manager.ui"
"string:com.redhat.virt.manager"
# Now call the show_domain_performance method
$dbus-send --session --dest="com.redhat.virt.manager.ui" \
"/com/redhat/virt/manager/ui"
"com.redhat.virt.manager.ui.show_domain_performance" \
$dbus-send --session --dest="com.redhat.virt.manager" \
"/com/redhat/virt/manager"
"com.redhat.virt.manager.show_domain_performance" \
"string:xen" \
"string:349025e8-ad34-34ff-239a-12ae095249f3"
Example usage from python
@ -63,13 +70,13 @@ Example usage from python
bus_object = bus.get_object("org.freedesktop.DBus", "/org/freedesktop/DBus")
bus_iface = dbus.Interface(bus_object, "org.freedesktop.DBus")
bus_iface.StartServiceByName("com.redhat.virt.manager.ui")
bus_iface.StartServiceByName("com.redhat.virt.manager")
virt_object = bus.get_object("com.redhat.virt.manager.ui",
"/com/redhat/virt/manager/ui")
virt_iface = dbus.Interface(virt_object, "com.redhat.virt.manager.ui")
virt_iface.show_domain_performance("349025e8-ad34-34ff-239a-12ae095249f3")
virt_object = bus.get_object("com.redhat.virt.manager",
"/com/redhat/virt/manager")
virt_iface = dbus.Interface(virt_object, "com.redhat.virt.manager")
virt_iface.show_domain_performance("xen", "349025e8-ad34-34ff-239a-12ae095249f3")

View File

@ -27,8 +27,7 @@ class vmmRemote(dbus.service.Object):
@dbus.service.method("com.redhat.virt.manager", in_signature="s")
def show_domain_creator(self, uri):
# XXX fixme
self.engine.show_manager(uri)
self.engine.show_create(uri)
@dbus.service.method("com.redhat.virt.manager", in_signature="ss")
def show_domain_editor(self, uri, uuid):