Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install python-subnettree to sonic-mgmt container. #3978

Merged
merged 2 commits into from
Jan 8, 2020
Merged

Install python-subnettree to sonic-mgmt container. #3978

merged 2 commits into from
Jan 8, 2020

Conversation

iris00522
Copy link
Contributor

- What I did
install python-subnettree to sonic-mgmt container.

sonic@6c789c1e31c6:~/sonic-mgmt/tests$ py.test -k 'platform' --host-pattern=2-4_t0 --module-path ../ansible/library/ --testbed_file=testbed.csv --inventory=lab --testbed=2-4_t0 --show-capture=stdout --duration=0 -v --ignore=platform/me llanox
============================================================================================================ test session starts ============================================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.7, py-1.8.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.8.7
rootdir: /var/sonic/sonic-mgmt
plugins: ansible-2.2.2
collecting ...
collecting 474 items / 2 errors / 472 selected
collected 487 items / 4 errors / 471 deselected / 12 selected

================================================================================================================== ERRORS ===================================================================================================================
_____________________________________________________________________________________________ ERROR collecting tests/ptftests/IP_decap_test.py ______________________________________________________________________________________________
ImportError while importing test module '/var/sonic/sonic-mgmt/tests/ptftests/IP_decap_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ptftests/IP_decap_test.py:58: in
import fib
ptftests/fib.py:3: in
from lpm import LpmDict
ptftests/lpm.py:4: in
from SubnetTree import SubnetTree
E ImportError: No module named SubnetTree
________________________________________________________________________________________________ ERROR collecting tests/ptftests/fib_test.py ________________________________________________________________________________________________
ImportError while importing test module '/var/sonic/sonic-mgmt/tests/ptftests/fib_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ptftests/fib_test.py:28: in
import fib
ptftests/fib.py:3: in
from lpm import LpmDict
ptftests/lpm.py:4: in
from SubnetTree import SubnetTree
E ImportError: No module named SubnetTree
_______________________________________________________________________________________________ ERROR collecting tests/ptftests/hash_test.py ________________________________________________________________________________________________
ImportError while importing test module '/var/sonic/sonic-mgmt/tests/ptftests/hash_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ptftests/hash_test.py:25: in
import fib
ptftests/fib.py:3: in
from lpm import LpmDict
ptftests/lpm.py:4: in
from SubnetTree import SubnetTree
E ImportError: No module named SubnetTree
________________________________________________________________________________________________ ERROR collecting tests/ptftests/vrf_test.py ________________________________________________________________________________________________
ImportError while importing test module '/var/sonic/sonic-mgmt/tests/ptftests/vrf_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ptftests/vrf_test.py:21: in
from fib_test import FibTest
ptftests/fib_test.py:28: in
import fib
ptftests/fib.py:3: in
from lpm import LpmDict
ptftests/lpm.py:4: in
from SubnetTree import SubnetTree
E ImportError: No module named SubnetTree

- How I did it
add intall python-subnettree command

- How to verify it
test sonic-mgmt pytest

sonic@6c789c1e31c6:~/sonic-mgmt/tests$ py.test -k 'platform' --host-pattern=2-4_t0 --module-path ../ansible/library/ --testbed_file=testbed.csv --inventory=lab --testbed=2-4_t0 --show-capture=stdout --duration=0 -v --ignore=platform/mel
llanox
============================================================================================================ test session starts ============================================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.7, py-1.8.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.8.7
rootdir: /var/sonic/sonic-mgmt
plugins: ansible-2.2.2
collecting ...
collected 502 items / 486 deselected / 16 selected

platform/test_platform_info.py::test_show_platform_summary PASSED [ 6%]
platform/test_platform_info.py::test_show_platform_psustatus PASSED [ 12%]
platform/test_platform_info.py::test_turn_on_off_psu_and_check_psustatus SKIPPED [ 18%]
platform/test_platform_info.py::test_show_platform_syseeprom PASSED [ 25%]
platform/test_reboot.py::test_cold_reboot FAILED [ 31%]
platform/test_reboot.py::test_fast_reboot FAILED [ 37%]
platform/test_reboot.py::test_warm_reboot FAILED [ 43%]
platform/test_reboot.py::test_power_off_reboot[15] SKIPPED [ 50%]
platform/test_reboot.py::test_power_off_reboot[5] SKIPPED [ 56%]
platform/test_reboot.py::test_watchdog_reboot FAILED [ 62%]
platform/test_reload_config.py::test_reload_configuration PASSED [ 68%]
platform/test_sequential_restart.py::test_restart_swss FAILED [ 75%]
platform/test_sequential_restart.py::test_restart_syncd SKIPPED [ 81%]
platform/test_sfp.py::test_check_sfp_status_and_configure_sfp PASSED [ 87%]
platform/test_sfp.py::test_check_sfp_low_power_mode PASSED [ 93%]
platform/test_xcvr_info_in_db.py::test_xcvr_info_in_db PASSED [100%]

================================================================================================================= FAILURES ==================================================================================================================

@@ -143,4 +143,6 @@ RUN azure-cli_bundle_*/installer
# TODO: if azure-cli contains newer version azure-keyvault, remove this
RUN ~/lib/azure-cli/bin/python -m pip install azure-keyvault==0.3.7 -U

RUN apt-get install -y python-subnettree
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use pip to install since pip have more latest version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help to review, thanks a lot.

@lguohan lguohan merged commit 68499e6 into sonic-net:master Jan 8, 2020
rlhui pushed a commit that referenced this pull request Jul 7, 2020
* Install python-subnettree to sonic-mgmt container.
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants