sshxmlrpc_server.py.in 642 Bytes
Newer Older
1
#! /usr/bin/env python
2 3 4 5 6 7
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# All rights reserved.
#
import sys
8
sys.path.append("@prefix@/lib")
9 10
import socket
import sshxmlrpc
11
from emulabserver import emulabserver
12 13

#
14 15 16 17
# This is invoked inside an SSH, typically from the paperbag shell.
# We use stdin/stdout to read/write the request/response. We handle
# just a single request this way, and then exit. 
# 
18
# Construct and wrap our object.
19
wrapper = sshxmlrpc.SSHServerWrapper(emulabserver())
20 21
# Handle the request on stdin and send the response to stdout.
wrapper.handle_request((sys.stdin, sys.stdout))
22
sys.exit(0)