Commit 096a2f1c authored by Senthil Kumaran S's avatar Senthil Kumaran S
Browse files

LAVA-1049 - Allow for .yml as well as .yaml for healthchecks

Change-Id: I2fafc4fc13e6ed47de542ff9e3fb0c2c5895f95c
parent 2c8a88d8
......@@ -997,8 +997,11 @@ class Device(RestrictedResource):
if not extends:
return None
filename = os.path.join(Device.HEALTH_CHECK_PATH,
"%s.yaml" % extends)
filename = os.path.join(Device.HEALTH_CHECK_PATH, "%s.yaml" % extends)
# Try if health check file is having a .yml extension
if not os.path.exists(filename):
filename = os.path.join(Device.HEALTH_CHECK_PATH,
"%s.yml" % extends)
try:
with open(filename, "r") as f_in:
return f_in.read()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment