Changeset e2ff75d for fedd/federation


Ignore:
Timestamp:
Jun 29, 2010 11:55:52 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
132440f
Parents:
183b208
Message:

Enable real plug-ins. I couldn't be happier at how small this diff is.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/deter_impl.py

    r183b208 re2ff75d  
    11#!/usr/local/bin/python
     2
     3import sys
    24
    35import emulab_access
     
    4042            self.access_type = config.get("globals", "access_type", "emulab")
    4143            self.auth_type = config.get("globals", "auth_type", "legacy")
     44
     45            for mp in config.get("globals", "module_path","").split(":"):
     46                sys.path.append(mp)
    4247
    4348            if self.auth_type == 'legacy':
     
    8489                    self.access = skeleton_access.access(config, self.auth)
    8590                else:
    86                     raise RuntimeError("Unknown access_type: %s" % \
    87                             self.access_type)
     91                    try:
     92                        exec 'from %s import access as plugin_access' \
     93                                % self.access_type
     94                        self.access = plugin_access(config, self.auth)
     95                    except ImportError, e:
     96                        raise RuntimeError(
     97                                "Unknown access_type: %s (import failed: %s)" \
     98                                        % (self.access_type, e))
    8899                self.soap_services.update(self.access.soap_services)
    89100                self.xmlrpc_services.update(self.access.xmlrpc_services)
Note: See TracChangeset for help on using the changeset viewer.