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_aodh_event_alarm():
14 # Remove modified docker and restore original
15 orig = "orig_docker_id"
17 if os.path.isfile(orig):
18 with open("orig_docker_id", 'r') as oid:
19 orig_docker_id = oid.read()
21 if os.path.isfile(new):
22 with open("new_docker_id", 'r') as nid:
23 new_docker_id = nid.read()
25 subprocess.check_output("docker stop %s" % new_docker_id,
27 subprocess.check_output("docker rm %s" % new_docker_id, shell=True)
29 subprocess.check_output("docker start %s" % orig_docker_id, shell=True)
32 restore_aodh_event_alarm()