From 9087d5fbeee743cffded0fc37996b0ee6b329322 Mon Sep 17 00:00:00 2001 From: zhenggen-xu Date: Wed, 16 May 2018 10:56:55 -0700 Subject: [PATCH] Fix sfputil/psuutil issues due to dependencies on minigraph (#253) --- config/main.py | 2 -- psuutil/main.py | 3 +-- sfputil/main.py | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/config/main.py b/config/main.py index ae5da507f2d8..5312f7a1731c 100755 --- a/config/main.py +++ b/config/main.py @@ -13,8 +13,6 @@ import mlnx SONIC_CFGGEN_PATH = "sonic-cfggen" -MINIGRAPH_PATH = "/etc/sonic/minigraph.xml" -MINIGRAPH_BGP_SESSIONS = "minigraph_bgp" # # Helper functions diff --git a/psuutil/main.py b/psuutil/main.py index 4e347ab9efa6..70dd0c44aba8 100644 --- a/psuutil/main.py +++ b/psuutil/main.py @@ -27,7 +27,6 @@ PLATFORM_ROOT_PATH = '/usr/share/sonic/device' PLATFORM_ROOT_PATH_DOCKER = '/usr/share/sonic/platform' SONIC_CFGGEN_PATH = '/usr/local/bin/sonic-cfggen' -MINIGRAPH_PATH = '/etc/sonic/minigraph.xml' HWSKU_KEY = 'DEVICE_METADATA.localhost.hwsku' PLATFORM_KEY = 'DEVICE_METADATA.localhost.platform' @@ -78,7 +77,7 @@ def get_platform_and_hwsku(): proc.wait() platform = stdout.rstrip('\n') - proc = subprocess.Popen([SONIC_CFGGEN_PATH, '-m', MINIGRAPH_PATH, '-v', HWSKU_KEY], + proc = subprocess.Popen([SONIC_CFGGEN_PATH, '-d', '-v', HWSKU_KEY], stdout=subprocess.PIPE, shell=False, stderr=subprocess.STDOUT) diff --git a/sfputil/main.py b/sfputil/main.py index 5aa2dd250abe..df57a532f01b 100644 --- a/sfputil/main.py +++ b/sfputil/main.py @@ -27,7 +27,6 @@ PLATFORM_ROOT_PATH = '/usr/share/sonic/device' SONIC_CFGGEN_PATH = '/usr/local/bin/sonic-cfggen' -MINIGRAPH_PATH = '/etc/sonic/minigraph.xml' HWSKU_KEY = 'DEVICE_METADATA.localhost.hwsku' PLATFORM_KEY = 'DEVICE_METADATA.localhost.platform' @@ -296,7 +295,7 @@ def get_platform_and_hwsku(): proc.wait() platform = stdout.rstrip('\n') - proc = subprocess.Popen([SONIC_CFGGEN_PATH, '-m', MINIGRAPH_PATH, '-v', HWSKU_KEY], + proc = subprocess.Popen([SONIC_CFGGEN_PATH, '-d', '-v', HWSKU_KEY], stdout=subprocess.PIPE, shell=False, stderr=subprocess.STDOUT)