Changeset 212


Ignore:
Timestamp:
Sep 12, 2009, 4:23:21 PM (11 years ago)
Author:
pvkouteren
Message:

Modified setup scripts for parameters, mydatasets_view and SOAP serializers.
Added checks and fixes to SOAPServer and serializers.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • IbidasSOAP.py

    r199 r212  
    1616        #print "[%s] IbidasSOAPServer started.." %(strftime("%Y-%m-%d %H:%M:%S"))
    1717        #server.start()
    18         server = make_server('localhost', 11001, IbidasSOAPServer())
    19         print "[%s] IbidasSOAPServer started.." %(strftime("%Y-%m-%d %H:%M:%S"))
    20         server.serve_forever()
     18        c = config.loadConfig('ibidas.ini', {})
     19        if not(c):
     20            print "No valid configuration found. Please provide ibidas.ini in the root directory!"
     21        else:
     22            if c['ibidas.authenticated_mode'] == 'on':
     23                print "[%s] The authenticated_mode variable in your ibidas.ini file is set to ON." %(strftime("%Y-%m-%d %H:%M:%S"))
     24                print "[%s] Please note that only openly available datasets may be shared!" %(strftime("%Y-%m-%d %H:%M:%S"))
     25            server = make_server('localhost', 11001, IbidasSOAPServer())
     26            print "[%s] IbidasSOAPServer started.." %(strftime("%Y-%m-%d %H:%M:%S"))
     27            server.serve_forever()
    2128    except ImportError:
    2229        print "Error: Server code requires Python >= 2.5"
  • ibidas.py

    r131 r212  
    1818
    1919
    20 print config
     20#print config
    2121cd = postgres.openConnection(config['database.host'],\
    2222            config['database.port'],config['database.name'],\
  • setup.py

    r150 r212  
    5151
    5252if (setupconfig['setup.setup_type'] == "new"):
     53    args = []
     54   
     55    debug_answer = ""
     56    while not(debug_answer == "y" or debug_answer == "n"):
     57        debug_answer = raw_input("Do you want to run a debugging setup? (y/n)\n")
     58    if debug_answer == "y":
     59        args.append("debug")
     60   
     61    override_answer = ""
     62    while not(override_answer == "y" or override_answer == "n"):
     63        override_answer = raw_input("Do you want to override the database if it already exists? (y/n)\n")
     64    if override_answer == "y":
     65        args.append("override")
     66   
     67    soap_answer = ""
     68    while not(soap_answer == "y" or soap_answer == "n"):
     69        soap_answer = raw_input("Do you want to generate SOAP Serializers? (y/n)\n")
     70    if soap_answer == "n":
     71        args.append("nosoap")
     72   
    5373    import os
    54     os.system("python setup_db.py")
     74    if len(args) > 0:
     75        add = " " + " ".join(args)
     76    else:
     77        add = ""
     78    os.system("python setup_db.py" + add)
  • setup_db.py

    r199 r212  
    289289        self._output("Creating views..")
    290290        # Define mydatasets_view
    291         mydatasets_view_sql = "CREATE VIEW mydatasets_view AS SELECT source_id FROM set_pg_group WHERE grosysid IN (SELECT grosysid FROM pg_group WHERE groname IN (SELECT applicable_roles.role_name FROM information_schema.applicable_roles WHERE applicable_roles.grantee::name = (SELECT current_user)));"
     291        #mydatasets_view_sql = "CREATE VIEW mydatasets_view AS SELECT source_id FROM set_pg_group WHERE grosysid IN (SELECT grosysid FROM pg_group WHERE groname IN (SELECT applicable_roles.role_name FROM information_schema.applicable_roles WHERE applicable_roles.grantee::name = (SELECT current_user)));"
     292        mydatasets_view_sql = "CREATE VIEW mydatasets_view AS SELECT DISTINCT(source_id) FROM set_pg_group LEFT JOIN pg_group ON set_pg_group.grosysid = pg_group.grosysid LEFT JOIN information_schema.applicable_roles ON pg_group.groname = applicable_roles.role_name WHERE applicable_roles.grantee::name = (SELECT current_user);"
    292293        mydatasets_rights_sql = "GRANT SELECT ON TABLE mydatasets_view TO PUBLIC; GRANT SELECT ON TABLE pg_group TO PUBLIC; GRANT SELECT ON TABLE information_schema.applicable_roles TO PUBLIC;"
    293294        try:
  • web/IbidasMessage.py

    r200 r212  
    66This file defines the IbidasMessage serializer.
    77This is the actual communication class which results in a SOAP message.
    8 @author Patrick van Kouteren <H.J.W.vanKouteren@student.tudelft.nl
     8@author Patrick van Kouteren <H.J.W.vanKouteren@student.tudelft.nl>
    99@version 1.0
    1010'''
  • web/model/IbidasSerializers.py

    r200 r212  
    55This file defines all possible IbidasSerializers
    66These are used in the IbidasMessage serializer
    7 @author Patrick van Kouteren <H.J.W.vanKouteren@student.tudelft.nl
     7@author Patrick van Kouteren <H.J.W.vanKouteren@student.tudelft.nl>
    88@version 1.0
    99'''
  • web/model/setup_serializers.py

    r200 r212  
    4141        for classname in classtypes.keys():
    4242            self._generateClass(classname, classtypes[classname])
    43         self._generateIbidasMessageSerializer(classtypes.keys())
     43        #self._generateIbidasMessageSerializer(classtypes.keys())
    4444           
    4545    def _generateSuperClass(self):
     
    5151        lines.append("This file defines all possible IbidasSerializers")
    5252        lines.append("These are used in the IbidasMessage serializer")
    53         lines.append("@author Patrick van Kouteren <H.J.W.vanKouteren@student.tudelft.nl")
     53        lines.append("@author Patrick van Kouteren <H.J.W.vanKouteren@student.tudelft.nl>")
    5454        lines.append("@version 1.0")
    5555        lines.append("'''")
     
    7575        lines.append("This file defines the IbidasMessage serializer.")
    7676        lines.append("This is the actual communication class which results in a SOAP message.")
    77         lines.append("@author Patrick van Kouteren <H.J.W.vanKouteren@student.tudelft.nl")
     77        lines.append("@author Patrick van Kouteren <H.J.W.vanKouteren@student.tudelft.nl>")
    7878        lines.append("@version 1.0")
    7979        lines.append("'''")
Note: See TracChangeset for help on using the changeset viewer.