(config_name, config_stream, update_dict,
section='DEFAULT')
| 198 | node.run(args=['cp', '-f', file_name, file_name + backup_ext]) |
| 199 | |
| 200 | def update_config(config_name, config_stream, update_dict, |
| 201 | section='DEFAULT'): |
| 202 | parser = ConfigParser() |
| 203 | parser.read_file(config_stream) |
| 204 | for (key, value) in update_dict.items(): |
| 205 | parser.set(section, key, value) |
| 206 | out_stream = StringIO() |
| 207 | parser.write(out_stream) |
| 208 | out_stream.seek(0) |
| 209 | return out_stream |
| 210 | |
| 211 | updates = [ |
| 212 | dict(name='/etc/glance/glance-api.conf', options=dict( |
no test coverage detected