1 ##############################################################################
2 # Copyright (c) 2017 ZTE Corporation and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
12 ep_file = '/etc/ceilometer/event_pipeline.yaml'
13 ep_file_bak = '/etc/ceilometer/event_pipeline.yaml.bak'
16 def restore_ep_config():
18 if not os.path.isfile(ep_file_bak):
19 print('Bak_file:%s does not exist.' % ep_file_bak)
22 shutil.copyfile(ep_file_bak, ep_file)
23 os.remove(ep_file_bak)