From 3a35ea705c53630fd7313303996d90bd102c52ac Mon Sep 17 00:00:00 2001 From: Samuel Angebault Date: Fri, 8 Sep 2017 15:36:22 -0700 Subject: [PATCH 1/4] Bump sonic-platform-modules-arista submodule --- platform/broadcom/sonic-platform-modules-arista | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/broadcom/sonic-platform-modules-arista b/platform/broadcom/sonic-platform-modules-arista index 4ad9358d16b8..d1417bff1778 160000 --- a/platform/broadcom/sonic-platform-modules-arista +++ b/platform/broadcom/sonic-platform-modules-arista @@ -1 +1 @@ -Subproject commit 4ad9358d16b8cd0b57d5922353f38055f83042e4 +Subproject commit d1417bff17780255d4cc371b315f620087673eb8 From 85d0972ab09790cb159421fbd59f4e915a5b6050 Mon Sep 17 00:00:00 2001 From: Samuel Angebault Date: Fri, 8 Sep 2017 15:39:04 -0700 Subject: [PATCH 2/4] Allow image specific mount option for containers --- rules/docker-platform-monitor.mk | 3 +++ slave.mk | 1 + 2 files changed, 4 insertions(+) diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index 39f8cdd3f297..76e7dac4ab63 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -12,4 +12,7 @@ $(DOCKER_PLATFORM_MONITOR)_CONTAINER_NAME = pmon $(DOCKER_PLATFORM_MONITOR)_RUN_OPT += --net=host --privileged -t $(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +# Mount Arista python library on Aboot images to be used by plugins +$(DOCKER_PLATFORM_MONITOR)_aboot_RUN_OPT += -v /usr/lib/python2.7/dist-packages/arista:/usr/lib/python2.7/dist-packages/arista:ro + $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += sensors:/usr/bin/sensors diff --git a/slave.mk b/slave.mk index c44fe12642ac..caed4279dcc3 100644 --- a/slave.mk +++ b/slave.mk @@ -400,6 +400,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform export docker_image="$(docker)" export docker_image_name="$(basename $(docker))" export docker_container_name="$($(docker)_CONTAINER_NAME)" + $(eval $(docker)_RUN_OPT += $($(docker)_$($*_IMAGE_TYPE)_RUN_OPT)) export docker_image_run_opt="$($(docker)_RUN_OPT)" j2 files/build_templates/docker_image_ctl.j2 > $($(docker)_CONTAINER_NAME).sh if [ -f files/build_templates/$($(docker)_CONTAINER_NAME).service.j2 ]; then From d1bdba3f84f673f013de5a557ef7b4a43565ff4a Mon Sep 17 00:00:00 2001 From: Samuel Angebault Date: Fri, 8 Sep 2017 15:42:57 -0700 Subject: [PATCH 3/4] Add led plugin for DCS-7060CX-32S --- .../arista/x86_64-arista_7060_cx32s/plugins/led_control.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 device/arista/x86_64-arista_7060_cx32s/plugins/led_control.py diff --git a/device/arista/x86_64-arista_7060_cx32s/plugins/led_control.py b/device/arista/x86_64-arista_7060_cx32s/plugins/led_control.py new file mode 100644 index 000000000000..8d387e513c6c --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/plugins/led_control.py @@ -0,0 +1,6 @@ +try: + import arista.utils.sonic_leds as arista_leds +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +LedControl = arista_leds.getLedControl() From d1b2d125d624df9304b62e90ecd82354399f536d Mon Sep 17 00:00:00 2001 From: Samuel Angebault Date: Fri, 8 Sep 2017 15:43:13 -0700 Subject: [PATCH 4/4] Add led plugin for DCS-7260CX3-64 --- .../arista/x86_64-arista_7260cx3_64/plugins/led_control.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 device/arista/x86_64-arista_7260cx3_64/plugins/led_control.py diff --git a/device/arista/x86_64-arista_7260cx3_64/plugins/led_control.py b/device/arista/x86_64-arista_7260cx3_64/plugins/led_control.py new file mode 100644 index 000000000000..8d387e513c6c --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/plugins/led_control.py @@ -0,0 +1,6 @@ +try: + import arista.utils.sonic_leds as arista_leds +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +LedControl = arista_leds.getLedControl()