sonic-buildimage/dockers
Stepan Blyshchak 790bdded96 [dhcp-relay] make DHCP relay an extension (#6531)
- Why I did it
Make DHCP relay docker an extension. DHCP relay now carries dhcp relay commands CLI plugin and has a complete manifest.
It is installed as extension if INCLUDE_DHCP_REALY is set to y.

DEPENDS on #5939

- How I did it
Modify DHCP relay docker makefile and dockerfile. Make changes to sonic_debian_extension.j2 to install sonic packages.
I moved DHCP related CLI tests from sonic-utilities to DHCP relay docker.
This PR introduces a way to write a plugin as part of docker image and run the tests from cli-plugin-tests directory under docker directory.
The test result is available in target/docker-dhcp-relay.gz.log:

[ REASON ] :      target/docker-dhcp-relay.gz does not exist   NON-EXISTENT PREREQUISITES: docker-start target/docker-config-engine-buster.gz-load target/python-wheels/sonic_utilities-1.2-py3-none-any.whl-in
stall target/debs/buster/python3-swsscommon_1.0.0_amd64.deb-install
[ FLAGS  FILE    ] : []
[ FLAGS  DEPENDS ] : []
[ FLAGS  DIFF    ] : []
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /sonic/dockers/docker-dhcp-relay/cli-plugin-tests, inifile:
plugins: cov-2.6.0
collecting ... collected 10 items

test_config_dhcp_relay.py::TestConfigVlanDhcpRelay::test_plugin_registration PASSED [ 10%]
test_config_dhcp_relay.py::TestConfigVlanDhcpRelay::test_config_vlan_add_dhcp_relay_with_nonexist_vlanid PASSED [ 20%]
test_config_dhcp_relay.py::TestConfigVlanDhcpRelay::test_config_vlan_add_dhcp_relay_with_invalid_vlanid PASSED [ 30%]
test_config_dhcp_relay.py::TestConfigVlanDhcpRelay::test_config_vlan_add_dhcp_relay_with_invalid_ip PASSED [ 40%]
test_config_dhcp_relay.py::TestConfigVlanDhcpRelay::test_config_vlan_add_dhcp_relay_with_exist_ip PASSED [ 50%]
test_config_dhcp_relay.py::TestConfigVlanDhcpRelay::test_config_vlan_add_del_dhcp_relay_dest PASSED [ 60%]
test_config_dhcp_relay.py::TestConfigVlanDhcpRelay::test_config_vlan_remove_nonexist_dhcp_relay_dest PASSED [ 70%]
test_config_dhcp_relay.py::TestConfigVlanDhcpRelay::test_config_vlan_remove_dhcp_relay_dest_with_nonexist_vlanid PASSED [ 80%]
test_show_dhcp_relay.py::TestVlanDhcpRelay::test_plugin_registration PASSED [ 90%]
test_show_dhcp_relay.py::TestVlanDhcpRelay::test_dhcp_relay_column_output PASSED [100%]

=============================== warnings summary ===============================
/usr/local/lib/python3.7/dist-packages/tabulate.py:7
  /usr/local/lib/python3.7/dist-packages/tabulate.py:7: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import namedtuple, Iterable

-- Docs: https://docs.pytest.org/en/latest/warnings.html
==================== 10 passed, 1 warnings in 0.35 seconds =====================
2021-08-06 17:28:55 -07:00
..
docker-base [arm] support compile sonic arm image on arm server (#7285) 2021-04-18 08:17:57 -07:00
docker-base-buster [arm] support compile sonic arm image on arm server (#7285) 2021-04-18 08:17:57 -07:00
docker-base-stretch [arm] support compile sonic arm image on arm server (#7285) 2021-04-18 08:17:57 -07:00
docker-basic_router [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-config-engine [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
docker-config-engine-buster [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
docker-config-engine-stretch [docker-base-buster][docker-config-engine-buster] No longer install Python 2 (#6162) 2020-12-25 21:29:25 -08:00
docker-database [Monit] Deprecate the feature of monitoring the critical processes by Monit (#7676) 2021-06-04 10:16:53 -07:00
docker-dhcp-relay [dhcp-relay] make DHCP relay an extension (#6531) 2021-08-06 17:28:55 -07:00
docker-fpm-frr [multiasic][voq][bgpconf] Fix for the issue of same BGP router id in all asics (#8049) 2021-08-03 23:48:50 -07:00
docker-fpm-gobgp [dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 (#7083) 2021-03-27 21:14:24 -07:00
docker-iccpd [dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 (#7083) 2021-03-27 21:14:24 -07:00
docker-lldp [Monit] Deprecate the feature of monitoring the critical processes by Monit (#7676) 2021-06-04 10:16:53 -07:00
docker-macsec [dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 (#7083) 2021-03-27 21:14:24 -07:00
docker-nat [dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 (#7083) 2021-03-27 21:14:24 -07:00
docker-orchagent [fabric] Disable unnecessary processes in swss and the orchagent-portsyncd dependency for fabric asic (#5569) 2021-06-09 10:53:47 -07:00
docker-platform-monitor Add ethtool to docker-platform-monitor (#8017) 2021-06-30 09:36:47 -07:00
docker-ptf [arm] support compile sonic arm image on arm server (#7285) 2021-04-18 08:17:57 -07:00
docker-router-advertiser [radv] fix bug for radv can't startup if DEVICE_METADATA.localhost.type is NULL (#7651) 2021-05-25 08:17:44 -07:00
docker-sflow [Monit] Deprecate the feature of monitoring the critical processes by Monit (#7676) 2021-06-04 10:16:53 -07:00
docker-snmp [Monit] Deprecate the feature of monitoring the critical processes by Monit (#7676) 2021-06-04 10:16:53 -07:00
docker-sonic-mgmt [build]: Fix sonic-cfggen contextlib err (#7996) 2021-06-28 17:15:03 -07:00
docker-sonic-mgmt-framework [docker-mgmt-framework]: update mgmt framework docker to support sonic-cli cmd (#6148) 2021-06-02 19:38:21 -07:00
docker-sonic-restapi [Monit] Deprecate the feature of monitoring the critical processes by Monit (#7676) 2021-06-04 10:16:53 -07:00
docker-sonic-sdk [sonic-sdk] add sonic sdk and sonic sdk buildenv (#6712) 2021-05-28 10:16:02 -07:00
docker-sonic-sdk-buildenv [sonic-sdk] add sonic sdk and sonic sdk buildenv (#6712) 2021-05-28 10:16:02 -07:00
docker-sonic-telemetry [Monit] Deprecate the feature of monitoring the critical processes by Monit (#7676) 2021-06-04 10:16:53 -07:00
docker-teamd [docker-teamd]: Increase teammgrd timeout to allow graceful shutdown. (#7662) (#8045) 2021-07-13 13:15:46 -07:00
dockerfile-macros.j2 [sonic-config-engine] Clean up dependencies, pin versions; install Python 3 package in Buster container (#5656) 2020-10-26 13:48:50 -07:00