From 5915de1b9b1dfaabc4f4d97998d348633ca3ed19 Mon Sep 17 00:00:00 2001 From: mkbalani Date: Sun, 10 Jun 2018 15:50:32 -0700 Subject: [PATCH] Add sonic platform scripts for bfn montara/maverick --- .../sonic-platform-modules-bfn-montara/scripts/eeprom | 10 ++++++++++ .../scripts/fancontrol | 9 +++++++++ .../sonic-platform-modules-bfn-montara/scripts/ps_info | 10 ++++++++++ .../sonic-platform-modules-bfn-montara/scripts/sensors | 10 ++++++++++ .../scripts/sfputil.py | 10 ++++++++++ .../barefoot/sonic-platform-modules-bfn/scripts/eeprom | 10 ++++++++++ .../sonic-platform-modules-bfn/scripts/fancontrol | 9 +++++++++ .../sonic-platform-modules-bfn/scripts/ps_info | 10 ++++++++++ .../sonic-platform-modules-bfn/scripts/sensors | 10 ++++++++++ .../sonic-platform-modules-bfn/scripts/sfputil | 10 ++++++++++ 10 files changed, 98 insertions(+) create mode 100755 platform/barefoot/sonic-platform-modules-bfn-montara/scripts/eeprom create mode 100755 platform/barefoot/sonic-platform-modules-bfn-montara/scripts/fancontrol create mode 100755 platform/barefoot/sonic-platform-modules-bfn-montara/scripts/ps_info create mode 100755 platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sensors create mode 100755 platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sfputil.py create mode 100755 platform/barefoot/sonic-platform-modules-bfn/scripts/eeprom create mode 100755 platform/barefoot/sonic-platform-modules-bfn/scripts/fancontrol create mode 100755 platform/barefoot/sonic-platform-modules-bfn/scripts/ps_info create mode 100755 platform/barefoot/sonic-platform-modules-bfn/scripts/sensors create mode 100755 platform/barefoot/sonic-platform-modules-bfn/scripts/sfputil diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/eeprom b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/eeprom new file mode 100755 index 0000000000..fa70255714 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/eeprom @@ -0,0 +1,10 @@ +#!/bin/bash + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd eeprom.py "$@" diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/fancontrol b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/fancontrol new file mode 100755 index 0000000000..fa12436e11 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/fancontrol @@ -0,0 +1,9 @@ +CKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd fancontrol.py "$@" + diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/ps_info b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/ps_info new file mode 100755 index 0000000000..b0baee6379 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/ps_info @@ -0,0 +1,10 @@ +#!/bin/bash + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd ps_info.py "$@" diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sensors b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sensors new file mode 100755 index 0000000000..2ed2543b8f --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sensors @@ -0,0 +1,10 @@ +CKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd sensors.py "$@" + + diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sfputil.py b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sfputil.py new file mode 100755 index 0000000000..bfdf7be64a --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sfputil.py @@ -0,0 +1,10 @@ +#!/bin/bash + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd sfputil.py "$@" diff --git a/platform/barefoot/sonic-platform-modules-bfn/scripts/eeprom b/platform/barefoot/sonic-platform-modules-bfn/scripts/eeprom new file mode 100755 index 0000000000..fa70255714 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn/scripts/eeprom @@ -0,0 +1,10 @@ +#!/bin/bash + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd eeprom.py "$@" diff --git a/platform/barefoot/sonic-platform-modules-bfn/scripts/fancontrol b/platform/barefoot/sonic-platform-modules-bfn/scripts/fancontrol new file mode 100755 index 0000000000..fa12436e11 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn/scripts/fancontrol @@ -0,0 +1,9 @@ +CKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd fancontrol.py "$@" + diff --git a/platform/barefoot/sonic-platform-modules-bfn/scripts/ps_info b/platform/barefoot/sonic-platform-modules-bfn/scripts/ps_info new file mode 100755 index 0000000000..b0baee6379 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn/scripts/ps_info @@ -0,0 +1,10 @@ +#!/bin/bash + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd ps_info.py "$@" diff --git a/platform/barefoot/sonic-platform-modules-bfn/scripts/sensors b/platform/barefoot/sonic-platform-modules-bfn/scripts/sensors new file mode 100755 index 0000000000..2ed2543b8f --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn/scripts/sensors @@ -0,0 +1,10 @@ +CKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd sensors.py "$@" + + diff --git a/platform/barefoot/sonic-platform-modules-bfn/scripts/sfputil b/platform/barefoot/sonic-platform-modules-bfn/scripts/sfputil new file mode 100755 index 0000000000..bfdf7be64a --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn/scripts/sfputil @@ -0,0 +1,10 @@ +#!/bin/bash + +DOCKER_EXEC_FLAGS="i" + +# Determine whether stdout is on a terminal +if [ -t 1 ] ; then + DOCKER_EXEC_FLAGS+="t" +fi + +docker exec -$DOCKER_EXEC_FLAGS syncd sfputil.py "$@"