Skip to content

Commit

Permalink
Enable DPB dependency check using YANG model in VS container (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasant17 committed Feb 13, 2020
1 parent 85380ec commit 1c2fd93
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
7 changes: 6 additions & 1 deletion platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ $(DOCKER_SONIC_VS)_DEPENDS += $(SWSS) \
$(PYTHON_SWSSCOMMON) \
$(LIBTEAMDCT) \
$(LIBTEAM_UTILS) \
$(SONIC_DEVICE_DATA)
$(SONIC_DEVICE_DATA) \
$(LIBYANG) \
$(LIBYANG_CPP) \
$(LIBYANG_PY2)

$(DOCKER_SONIC_VS)_PYTHON_DEBS += $(SONIC_UTILS)

$(DOCKER_SONIC_VS)_PYTHON_WHEELS += $(SONIC_YANG_MGMT_PY2)

ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SONIC_VS)_DEPENDS += $(SWSS_DBG) \
$(LIBSWSSCOMMON_DBG) \
Expand Down
18 changes: 18 additions & 0 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ RUN pip install six
RUN pip install pyroute2==0.5.3 netifaces==0.10.7
RUN pip install monotonic==1.5
RUN pip install click==7.0.0
RUN pip install ijson
RUN pip install jsondiff
RUN pip install xmltodict

{% if docker_sonic_vs_debs.strip() -%}
# Copy locally-built Debian package dependencies
Expand All @@ -84,6 +87,21 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
{%- endfor %}
{%- endif %}

{% if docker_sonic_vs_whls.strip() %}
COPY \
{% for whl in docker_sonic_vs_whls.split(' ') -%}
python-wheels/{{ whl }}{{' '}}
{%- endfor -%}
python-wheels/
{%- endif -%}

{% if docker_sonic_vs_whls.strip() %}
RUN pip install \
{% for whl in docker_sonic_vs_whls.split(' ') -%}
python-wheels/{{ whl }}{{' '}}
{%- endfor %}
{%- endif -%}

# Clean up
RUN apt-get clean -y
RUN apt-get autoclean -y
Expand Down

0 comments on commit 1c2fd93

Please sign in to comment.