[sonic-py-common] Added an API to get file path containing SONiC version (#6309)

* [sonic-py-common] add an API to get file path containing SONiC version so that the API can be mocked for unit tests.
This commit is contained in:
Mahesh Maddikayala 2021-01-03 08:10:28 -08:00 committed by Guohan Lu
parent 0ac81e3c96
commit 25b0f43d9f

View File

@ -297,6 +297,11 @@ def get_sonic_version_info():
return data
def get_sonic_version_file():
if not os.path.isfile(SONIC_VERSION_YAML_PATH):
return None
return SONIC_VERSION_YAML_PATH
#
# Multi-NPU functionality