Using NESSSI from the Command Line

Authors: Roy Williams, Conrad Steenberg, Ray Plante, Joe Jacob, Matthew Graham

This tutorial explains how to run Nesssi services with a Python API on a Unix machine, in place of the alternate web-browser tools. This API requires a certificate.

1: Getting an NVO certificate

2: Installing the certificate

You will need the "openssl" libraries installed on your machine to convert the format of the certificate. Run the following command, where the -in parameter is the name of your certificate file.

openssl pkcs12 -nodes -out /tmp/x509up_u`id -u` -in MyNVOCert.p12 

3: Download the Nesssi client

4: Run some sample code

Run the test service, called sleepyadd:

$ python
>>> import nesssi_client as nesssi
>>> nesssiServer=nesssi.client('https://envoy.cacr.caltech.edu:8443/clarens/',debug=0)
>>> sessionID = nesssiServer.sleepyadd.init()
>>> print "Your session ID is", sessionID
>>> nesssiServer.sleepyadd.run(sessionID, "-time 30 -n 52 -m 344")
(wait a few seconds for the prompt)
>>> msg = nesssiServer.sleepyadd.monitor(sessionID)
>>>print msg