Permalink
Browse files

python wrapper should expose the common interface

(instead of basing the interface name on the object name)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
  • Loading branch information...
1 parent 4796e3c commit f130c9347a8882f8021384ea3779c5086675a226 David Scott committed Feb 4, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 dbus/vm/python/dbus-resource-script.py
@@ -41,14 +41,14 @@ def __init__(self):
bus_name = dbus.service.BusName(name, bus=self.bus)
dbus.service.Object.__init__(self, bus_name, "/" + name.replace(".", "/"))
- @dbus.service.method(dbus_interface=name, in_signature="s", out_signature="ss")
+ @dbus.service.method(dbus_interface="org.xenserver.api.resource", in_signature="s", out_signature="ss")
def attach(self, global_uri):
print "attach global_uri = %s" % global_uri
p = subprocess.Popen([script, "attach", global_uri], stdout=subprocess.PIPE)
stdout, stderr = p.communicate()
return (stdout, "1")
- @dbus.service.method(dbus_interface=name, in_signature="s", out_signature="")
+ @dbus.service.method(dbus_interface="org.xenserver.api.resource", in_signature="s", out_signature="")
def detach(self, id):
print "detach id = %s" % id
p = subprocess.Popen([script, "detach", id], stdout=subprocess.PIPE)

0 comments on commit f130c93

Please sign in to comment.