Skip to content

Commit bc73082

Browse files
Staphylolguohan
authored andcommitted
[devices]: Add led plugin for Arista 7060CX-32S and 7260CX3-64 (#945)
* Bump sonic-platform-modules-arista submodule * Allow image specific mount option for containers * Add led plugin for DCS-7060CX-32S * Add led plugin for DCS-7260CX3-64
1 parent d3997f4 commit bc73082

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
try:
2+
import arista.utils.sonic_leds as arista_leds
3+
except ImportError, e:
4+
raise ImportError (str(e) + "- required module not found")
5+
6+
LedControl = arista_leds.getLedControl()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
try:
2+
import arista.utils.sonic_leds as arista_leds
3+
except ImportError, e:
4+
raise ImportError (str(e) + "- required module not found")
5+
6+
LedControl = arista_leds.getLedControl()

rules/docker-platform-monitor.mk

+3
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ $(DOCKER_PLATFORM_MONITOR)_CONTAINER_NAME = pmon
1212
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += --net=host --privileged -t
1313
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
1414

15+
# Mount Arista python library on Aboot images to be used by plugins
16+
$(DOCKER_PLATFORM_MONITOR)_aboot_RUN_OPT += -v /usr/lib/python2.7/dist-packages/arista:/usr/lib/python2.7/dist-packages/arista:ro
17+
1518
$(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += sensors:/usr/bin/sensors

slave.mk

+1
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : .platform
400400
export docker_image="$(docker)"
401401
export docker_image_name="$(basename $(docker))"
402402
export docker_container_name="$($(docker)_CONTAINER_NAME)"
403+
$(eval $(docker)_RUN_OPT += $($(docker)_$($*_IMAGE_TYPE)_RUN_OPT))
403404
export docker_image_run_opt="$($(docker)_RUN_OPT)"
404405
j2 files/build_templates/docker_image_ctl.j2 > $($(docker)_CONTAINER_NAME).sh
405406
if [ -f files/build_templates/$($(docker)_CONTAINER_NAME).service.j2 ]; then

0 commit comments

Comments
 (0)