Install python-subnettree to sonic-mgmt container.#3978
Merged
lguohan merged 2 commits intosonic-net:masterfrom Jan 8, 2020
iris00522:sonic_mgmt
Merged
Install python-subnettree to sonic-mgmt container.#3978lguohan merged 2 commits intosonic-net:masterfrom iris00522:sonic_mgmt
lguohan merged 2 commits intosonic-net:masterfrom
iris00522:sonic_mgmt
Conversation
lguohan
reviewed
Jan 7, 2020
| # 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 |
Collaborator
There was a problem hiding this comment.
can you use pip to install since pip have more latest version.
Contributor
Author
There was a problem hiding this comment.
Please help to review, thanks a lot.
lguohan
approved these changes
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
…ic-net#3978) * Install python-subnettree to sonic-mgmt container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- 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 ==================================================================================================================