Skip to content

Commit

Permalink
Fix sfputil/psuutil issues due to dependencies on minigraph (sonic-ne…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenggen-xu authored and jleveque committed May 16, 2018
1 parent e2a3228 commit 9087d5f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import mlnx

SONIC_CFGGEN_PATH = "sonic-cfggen"
MINIGRAPH_PATH = "/etc/sonic/minigraph.xml"
MINIGRAPH_BGP_SESSIONS = "minigraph_bgp"

#
# Helper functions
Expand Down
3 changes: 1 addition & 2 deletions psuutil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions sfputil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9087d5f

Please sign in to comment.