VNC Console.. via the API

marotori

Member
Jun 17, 2009
161
1
16
Right...

So I am busy whipping together a low level api to enable our customers to stop/start their own machines etc..

The api is really good! Nice job on that.

What I am a bit confused about is how to initialize a java console to view the machine.

So.. assuming I run this command:

pvesh create /nodes/node8/openvz/154/vncproxy

No problem.. the console gets created and I get this response.

200 OK
{
"cert" : "-----BEGIN CERTIFICATE-----\nMIIEPzCCAyegAwIBAgIJALKFjJo+4z1+MA0GCSqGSIb3DQEBBQUAMHIxJDAiBgNV\ha04ApgFgwcm4nbz5cc5hrQ...much longer....AdGO7V\nYB92ztd/A/rsAen3jRImzsVwgLvCmcUDAzkG4joIYvlrSY+4zAiPKM/vDTMvua7E\nvKLeKO86e9VXMmCt0Ka9iOK2EI8Cfiiac/1oj3NDftzkpJuhKJL4ICv8zNG15Otu\nJ/ju8PVdq5T7jkVRogk+NYtcX2o/JCX03jD3RJevUexpRjc=\n-----END CERTIFICATE-----\n",
"port" : 5900,
"ticket" : "PVEVNC:4FE1E224::Ngx4hM3mk+DY6XVUb7BoDPAjCKigXwVpiDsO3GS57cZ0sohAtu8b9OQL6wqjYPqVhNrpqx6gIR2gAwXK3BnaWbQas0W9Op8PXhgYmfWi8R2HP/HDSyB/YqUKjvoTj/r9xs9SCUI9QKWpiDdCiZACnZyvnbR7SVxnzW/3KnIYQiXryLAhJH+exdCJddGsln2AumqpTmiWK1IdSWyb8HBrtQwp2XlyDIT+UlgIT5D3ovqJH2yVnc5zM7Nlsa+eF/dQl1hGTzhvwGcypGPrdk+n/QhdJ2eyHK/pMnudxTQgeFWrVNB/p163MCyUXBOrbcJBOEZnu4iNSnsCEeSBrxYs+A==",
"upid" : "UPID:cloud0:000263D0:09E72301:4FE1E224:vncproxy:154:root@pam:",
"user" : "root@pam

So.. I get the fact that:

upid is the password?
user is the username?

But how do I pass this information to the java applet?

Are there any usefull docs or information on this that I have not found?

Many thanks

Rob