2 ##############################################################################
3 # Copyright (c) 2015 Ericsson AB and others.
4 # stefan.k.berg@ericsson.com
5 # jonas.bjurel@ericsson.com
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
17 if len(sys.argv) != 3:
18 sys.stderr.write("Usage: "+sys.argv[0]+" <astutefile> <deafile>\n")
21 fuelfile = sys.argv[1]
22 if not os.path.exists(fuelfile):
23 sys.stderr.write("ERROR: The file "+fuelfile+" could not be opened\n")
27 if not os.path.exists(deafile):
28 sys.stderr.write("ERROR: The file "+deafile+" could not be opened\n")
31 f = open(deafile, 'r')
35 f = open(fuelfile, 'r')
40 for property in dea.keys():
41 if property == "ADMIN_NETWORK":
42 for adminproperty in dea[property].keys():
43 fuel[property][adminproperty] = dea[property][adminproperty]
45 fuel[property] = dea[property]
47 f = open(fuelfile, 'w')
48 f.write(yaml.dump(fuel, default_flow_style=False))