Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/sonic-config-engine/sonic-cfggen
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def main():
parser=argparse.ArgumentParser(description="Render configuration file from minigraph data and jinja2 template.")
parser.add_argument("-m", "--minigraph", help="minigraph xml file")
parser.add_argument("-p", "--port-config", help="port config file, used with -m")
parser.add_argument("-y", "--yaml", help="yaml file that contains addtional variables")
parser.add_argument("-y", "--yaml", help="yaml file that contains addtional variables", action='append', default=[])
parser.add_argument("-a", "--additional-data", help="addition data, in json string")
group = parser.add_mutually_exclusive_group()
group.add_argument("-t", "--template", help="render the data with the template file")
Expand Down Expand Up @@ -79,8 +79,8 @@ def main():
else:
data.update(parse_xml(minigraph))

if args.yaml != None:
with open(args.yaml, 'r') as stream:
for yaml_file in args.yaml:
with open(yaml_file, 'r') as stream:
additional_data = yaml.load(stream)
data.update(additional_data)

Expand Down