summaryrefslogtreecommitdiffstats
path: root/modules/datacenter_definitions/file.py
blob: d66b49d74d96c85c294893e176ba319d3a2cbfb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python
import yaml

def get(config,result):
    dc_config = yaml.load(file(config["file"], 'r'))
    for dc in dc_config:
        if result.has_key(dc):
            result[dc].update(dc_config[dc])
        else:
            result[dc] = dc_config[dc]
            
    return result