Changeset 36fec1b for fedd


Ignore:
Timestamp:
Nov 3, 2009 10:52:54 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-2.00, version-3.01, version-3.02
Children:
6409cc5
Parents:
f760064
Message:

order dragon endpoints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/dragon_access.py

    rf760064 r36fec1b  
    6767        self.axis2_home = config.get("access", "axis2_home")
    6868        self.idc_url = config.get("access", "idc")
     69        self.domain = config.get("access", "domain")
    6970
    7071        self.attrs = { }
     
    539540        else:
    540541            cap = 100
     542
     543
     544        # DRAGON's command line tool barfs if the source (ends[0]) is not in
     545        # the domain controlled by the IDC.  This code ensures this situation.
     546        if self.domain and not ends[0].endswith(self.domain):
     547            hold = ends[0]
     548            for i, e in enumerate(ends):
     549                if i == 0: continue
     550                if e.endswith(self.domain):
     551                    ends[0] = e
     552                    ends[i] = hold
     553                    break
     554            else:
     555                raise service_error(service_error.req,
     556                        "No endpoint in my domain")
     557
    541558
    542559        return cap, ends[0], ends[1], vlans
Note: See TracChangeset for help on using the changeset viewer.