[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] xmlrpc over SSH


  • To: xendevel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: jd sw <jdsw2002@xxxxxxxxx>
  • Date: Fri, 14 Jul 2006 09:41:51 -0700 (PDT)
  • Delivery-date: Fri, 14 Jul 2006 09:42:24 -0700
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bvaiBTngf9VCCOEcGgllAm9tjmdsRzpdUeiSHCpWg6lQSZ30V5rPWYLaM+XzAokSegaxo7spcWE3ttEyy30XX9yLsQ9JA+JOGl43u13iyauTV84rSzJgr6eP5gqvJ7bT/z6EOC1+mxLDNBqaDwaQ6iWSn6IlIx+4TdS+c0fFK7U= ;
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi
    I tried the SSH patch from Anthony.. using the following test code. It seems that it works only once... I mean for executing only one command over the established channel/connection.

Any ideas...


code

from xmlrpclib import Transport
from xen.util.xmlrpclib2 import ServerProxy

server = ServerProxy("ssh://root@xxxxxxxxxxxxx/RPC2", None, None, 1, 1)
l = server.xend.domains(1)
print l
# try again
l = server.xend.domains(1)
print l

Output :
-----------
['Domain-0', 'U1']
Traceback (most recent call last):
  File "/home/jd/test/t.py", line 15, in ?
    l = server.xend.domains(0)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.4/site-packages/xen/util/xmlrpclib2.py", line 155, in __request
    response = xmlrpclib.ServerProxy.__request(self, methodname, params)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.4/site-packages/xen/util/xmlrpclib2.py", line 68, in request
    ssh.stdin.write("""POST /%s HTTP/1.1
IOError: [Errno 32] Broken pipe

Thanks
/Jd


Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.