Changeset 8094


Ignore:
Timestamp:
17/08/12 12:48:06 (8 years ago)
Author:
pjkersha
Message:
  • simplified test paster script
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MyProxyWebService/myproxy/ws/test/myproxy_ws.py

    r8085 r8094  
    1 ''' 
    2 Created on Aug 3, 2012 
    3  
    4 @author: philipkershaw 
    5 ''' 
    61#!/usr/bin/env python 
    72"""Test script to run MyProxy web service interface in the Paster web  
     
    94""" 
    105__author__ = "P J Kershaw" 
    11 __date__ = "26/05/10" 
    12 __copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     6__date__ = "03/08/12" 
     7__copyright__ = "(C) 2012 Science and Technology Facilities Council" 
    138__license__ = "BSD - see LICENSE file in top-level directory" 
    149__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    1510__revision__ = "$Id: $" 
    16 #import sys 
    1711from os import path 
    18 #from OpenSSL import SSL 
    19 # 
    20 #from myproxy.ws.test.server_utils import PasteDeployAppServer 
    21 # 
     12 
    2213THIS_DIR = path.abspath(path.dirname(__file__)) 
    2314INI_FILENAME = 'myproxywsgi.ini' 
    2415ini_filepath = path.join(THIS_DIR, INI_FILENAME)  
    25 #SSLCERT_FILEPATH = path.join(THIS_DIR, 'localhost.crt') 
    26 #SSLKEY_FILEPATH = path.join(THIS_DIR, 'localhost.key') 
    27 #PORTNUM = 7443 
    28 #WITH_SSL = True # Set to False to run over HTTP 
    29 # 
    30 #if __name__ == "__main__": 
    31 #    # Provide a port number as command line argument or accept the default 
    32 #    # PORTNUM 
    33 #    if len(sys.argv) > 1: 
    34 #        port = sys.argv[1] 
    35 #    else: 
    36 #        port = PORTNUM 
    37 #         
    38 #    if WITH_SSL: 
    39 #        ssl_context = SSL.Context(SSL.SSLv23_METHOD) 
    40 #        ssl_context.set_options(SSL.OP_NO_SSLv2) 
    41 #     
    42 #        ssl_context.use_privatekey_file(SSLKEY_FILEPATH) 
    43 #        ssl_context.use_certificate_file(SSLCERT_FILEPATH) 
    44 #    else: 
    45 #        ssl_context = None 
    46 #         
    47 #    server = PasteDeployAppServer(ssl_context=ssl_context,  
    48 #                                  cfgFilePath=ini_filepath,  
    49 #                                  port=port,  
    50 #                                  withLoggingConfig=False)  
    51 #    try:    
    52 #        server.start()    
    53 #    except KeyboardInterrupt: 
    54 #        sys.exit(0)  
     16 
    5517from paste.script.serve import ServeCommand 
    5618 
Note: See TracChangeset for help on using the changeset viewer.