Changeset f96be61


Ignore:
Timestamp:
Jul 19, 2012 4:36:45 PM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, master
Children:
5e0b7dc, e5a595e
Parents:
558d829
Message:

Send an error back on service requests to unknown testbeds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r558d829 rf96be61  
    18261826        testbeds to service objects only for services requiring portals.
    18271827        """
     1828
     1829        # Sanity check the services.  Exports or imports from unknown testbeds
     1830        # cause an exception.
     1831        for s in req.get('service', []):
     1832            for t in s.get('import', []):
     1833                if t not in testbeds:
     1834                    raise service_error(service_error.req,
     1835                            'Service import to unknown testbed: %s' %t)
     1836            for t in s.get('export', []):
     1837                if t not in testbeds:
     1838                    raise service_error(service_error.req,
     1839                            'Service export from unknown testbed: %s' %t)
     1840
     1841
    18281842        # We construct both dicts here because deriving the second is more
    1829         # comples than it looks - both the keys and lists can differ, and it's
     1843        # complex than it looks - both the keys and lists can differ, and it's
    18301844        # much easier to generate both in one pass.
    18311845        masters = { }
Note: See TracChangeset for help on using the changeset viewer.