1 ##############################################################################
2 # Copyright (c) 2018 Nokia 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 ##############################################################################
13 def restore_cpu_allocation_ratio():
14 nova_file = '/etc/nova/nova.conf'
15 nova_file_bak = '/etc/nova/nova.bak'
17 if not os.path.isfile(nova_file_bak):
18 print('Bak_file:%s does not exist.' % nova_file_bak)
20 print('restore: %s' % nova_file)
21 shutil.copyfile(nova_file_bak, nova_file)
22 os.remove(nova_file_bak)
25 restore_cpu_allocation_ratio()