Changeset 2729e48 for fedd


Ignore:
Timestamp:
Nov 29, 2008 11:31:03 PM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
2dd442f
Parents:
0a20ef8
Message:

Move things around to make a python module encapsulation easier. More to do,
but this mostly works.

Location:
fedd
Files:
1 added
3 edited
18 moved

Legend:

Unmodified
Added
Removed
  • fedd/Makefile

    r0a20ef8 r2729e48  
    11
    2 GENERATED_MODS= fedd_services.py fedd_internal_services.py \
    3                 fedd_services_types.py
     2GENERATED_MODS= fedd/fedd_services.py fedd/fedd_internal_services.py \
     3                fedd/fedd_services_types.py
    44WSDL_FILES= fedd.wsdl fedd_bindings.wsdl fedd_messages.wsdl fedd_types.xsd \
    55            fedd_internal.wsdl fedd_internal_bindings.wsdl \
     
    1010
    1111${GENERATED_MODS}:      ${WSDL_FILES}
    12         /usr/local/bin/wsdl2py --file fedd.wsdl --complexType
     12        /usr/local/bin/wsdl2py --file fedd.wsdl --complexType --output-dir=fedd
    1313        /usr/local/bin/wsdl2py --file fedd_internal.wsdl --complexType \
    14                 --types=fedd_services_types
     14                --types=fedd_services_types --output-dir=fedd
    1515
    1616clean:
    17         rm -f ${GENERATED_MODS} *.pyc
     17        rm -f ${GENERATED_MODS} fedd/*.pyc *.pyc
  • fedd/fedd.py

    r0a20ef8 r2729e48  
    11#!/usr/local/bin/python
    22
    3 import sys
     3import os,sys
    44
    55from optparse import OptionParser
    66
    7 from fedd_server import fedd_server, fedd_xmlrpc_handler, fedd_soap_handler
    8 from fedd_config_parser import fedd_config_parser
    9 from fedd_util import fedd_ssl_context
    10 from fedd_deter_impl import new_feddservice
     7from fedd.fedd_server import fedd_server, fedd_xmlrpc_handler, fedd_soap_handler
     8from fedd.fedd_config_parser import fedd_config_parser
     9from fedd.fedd_util import fedd_ssl_context
     10from fedd.fedd_deter_impl import new_feddservice
    1111
    1212from threading import *
     
    115115    sys.exit("Error configuring fedd: %s" % str)
    116116
    117 if impl.cert_file == None:
     117if impl.cert_file:
     118    if not os.access(impl.cert_file, os.R_OK):
     119        sys.exit("Cannot read certificate file: %s" % impl.cert_file)
     120else:
    118121    sys.exit("Must supply certificate file (probably in config)")
     122
     123if impl.trusted_certs:
     124    if not os.access(impl.trusted_certs, os.R_OK):
     125        sys.exit("Cannot read trusted certificate file: %s" % \
     126                impl.trusted_certs)
    119127
    120128# Create the SSL credentials
     
    124132        ctx = fedd_ssl_context(impl.cert_file, impl.trusted_certs,
    125133                password=impl.cert_pwd)
    126     except SSL.SSLError, e:
     134    except Exception, e:
    127135        if str(e) != "bad decrypt" or impl.cert_pwd != None:
    128136            raise
  • fedd/fedd_client.py

    r0a20ef8 r2729e48  
    55import pwd
    66
    7 from fedd_services import *
    8 from fedd_internal_services import *
     7from fedd.fedd_services import *
     8from fedd.fedd_internal_services import *
    99
    1010from M2Crypto import SSL, X509
     
    1919import xmlrpclib
    2020
    21 from fedd_util import fedd_ssl_context, pack_id, unpack_id
    22 from fedid import fedid
    23 from remote_service import service_caller
    24 from service_error import *
     21from fedd.fedd_util import fedd_ssl_context, pack_id, unpack_id
     22from fedd.fedid import fedid
     23from fedd.remote_service import service_caller
     24from fedd.service_error import *
     25import fedd.parse_detail
    2526
    2627from optparse import OptionParser, OptionValueError
    2728
    28 import parse_detail
    2929
    3030# Turn off the matching of hostname to certificate ID
Note: See TracChangeset for help on using the changeset viewer.