[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:
parent
0ac81e3c96
commit
25b0f43d9f
@ -297,6 +297,11 @@ def get_sonic_version_info():
|
|||||||
|
|
||||||
return data
|
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
|
# Multi-NPU functionality
|
||||||
|
Reference in New Issue
Block a user