gateway4labs / rlms_weblabdeusto

WebLab-Deusto plug-in in the LabManager
0 stars 3 forks source link

Misconfiguration error #1

Open sergiobuj opened 11 years ago

sergiobuj commented 11 years ago

Hi, I am having some trouble getting this rlms client up and running.

I installed it through the pip requirement and appended the rlms to the list in config.py... What do I have to do next... every time I try to load the class it gives me the Misconfiguration error.

If you have a snippet of code where this is shown, it would be very helpful.

porduna commented 11 years ago

So as to call this code directly, once you install it with pip and you're in the labmanager directory (we still have not done the labmanager setup.py), this should work:

>>> import webbrowser
>>> from labmanager.rlms.ext.weblabdeusto import RLMS
>>> rlms = RLMS('{ "remote_login" : "weblabfed", "password" : "password", "base_url" : "https://www.weblab.deusto.es/weblab/" }')
>>> rlms.get_laboratories()
[<labmanager.data.Laboratory object at 0x29d8c90>, <labmanager.data.Laboratory object at 0x29d8bd0>, <labmanager.data.Laboratory object at 0x29d8cd0>]
>>> [ lab.name for lab in rlms.get_laboratories() ]
[u'ud-logic@PIC experiments', u'robot-movement@Robot experiments', u'visir-fed-balance@Visir experiments']
>>> url = rlms.reserve('ud-logic@PIC experiments', 'jsmith', {}, {}, {}, 'Mozilla', '2.2.2.2', 'http://github')
>>> print url
https://www.weblab.deusto.es/weblab/client/federated.html#reservation_id=9e19c394-6b3a-46ef-86cf-2883e543af4a;9e19c394-6b3a-46ef-86cf-2883e543af4a.route3
>>> webbrowser.open(url)

That said, this is the "raw" usage. However the LabManager works for me to configure this properly. Where do you get the error exactly? What's the exact message?

sergiobuj commented 11 years ago

Ok, good. Let me try that and I'll come bak to you if I have any problems. Thanks