diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-08-26 18:23:12 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-08-26 18:23:12 +0000 |
commit | d6163ab0982d6ea065634c7d3fc46916260411c6 (patch) | |
tree | 7d5c2a4b18ed77242d8f2c2e91e7d5c3e28eb8d0 | |
parent | 619d8822eecbfe604c6cd008b818bcc42c8ab221 (diff) | |
download | bcfg2-d6163ab0982d6ea065634c7d3fc46916260411c6.tar.gz bcfg2-d6163ab0982d6ea065634c7d3fc46916260411c6.tar.bz2 bcfg2-d6163ab0982d6ea065634c7d3fc46916260411c6.zip |
Add altsrc crosschecking
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3643 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Server/Core.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index 35f3288dc..db4f460b2 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -325,6 +325,18 @@ class Core(object): # do prereq processing prereqs = self.plugins['Deps'].GeneratePrereqs(structures, meta) structures.append(prereqs) + + # Perform altsrc consistency checking + esrcs = {} + for struct in structures: + for entry in struct: + key = (entry.tag, entry.get('name')) + if key in esrcs: + if esrcs[key] != entry.get('altsrc'): + logger.error("Found inconsistent altsrc mapping for entry %s:%s" % key) + else: + esrcs[key] = entry.get('altsrc', None) + del esrcs for astruct in structures: try: |