diff --git a/src/sonic-config-engine/tests/test_cfggen_platformJson.py b/src/sonic-config-engine/tests/test_cfggen_platformJson.py index 4b099bee62ca..f94fcb4ab89b 100644 --- a/src/sonic-config-engine/tests/test_cfggen_platformJson.py +++ b/src/sonic-config-engine/tests/test_cfggen_platformJson.py @@ -5,7 +5,7 @@ import ast # Global Variable -PLATFORM_CAP = "platform_output.json" +PLATFORM_OUTPUT_FILE = "platform_output.json" class TestCfgGenPlatformJson(TestCase): @@ -66,7 +66,7 @@ def test_platform_json_all_ethernet_interfaces(self): argument = '-m "' + self.sample_graph_simple + '" -p "' + self.platform_json + '" -S "' + self.hwsku_json + '" -v "PORT"' output = self.run_script(argument) - sample_file = os.path.join(self.test_dir, 'sample_output', "platform_output.json") + sample_file = os.path.join(self.test_dir, 'sample_output', PLATFORM_OUTPUT_FILE) fh = open(sample_file, 'rb') fh_data = json.load(fh) fh.close() diff --git a/src/sonic-daemon-base/sonic_daemon_base/daemon_base.py b/src/sonic-daemon-base/sonic_daemon_base/daemon_base.py index 481e1db65b31..797110422dc9 100644 --- a/src/sonic-daemon-base/sonic_daemon_base/daemon_base.py +++ b/src/sonic-daemon-base/sonic_daemon_base/daemon_base.py @@ -27,7 +27,7 @@ # Port config information PORT_CONFIG = 'port_config.ini' -PLATFORM_CAP = 'platform.json' +PLATFORM_JSON = 'platform.json' EEPROM_MODULE_NAME = 'eeprom' EEPROM_CLASS_NAME = 'board' @@ -152,7 +152,7 @@ def get_path_to_port_config_file(self): (platform_path, hwsku_path) = self.get_path_to_platform_and_hwsku() # First check for the presence of the new 'platform.json' file - port_config_file_path = "/".join([platform_path, PLATFORM_CAP]) + port_config_file_path = "/".join([platform_path, PLATFORM_JSON]) if not os.path.isfile(port_config_file_path): # platform.json doesn't exist. Try loading the legacy 'port_config.ini' file