Skip to content

[tests] if no ptf host in testbed.csv get it from inventory#1159

Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom
stepanblyschak:fix-ptfhost-fixture
Oct 16, 2019
Merged

[tests] if no ptf host in testbed.csv get it from inventory#1159
liat-grozovik merged 1 commit intosonic-net:masterfrom
stepanblyschak:fix-ptfhost-fixture

Conversation

@stepanblyschak
Copy link
Copy Markdown
Contributor

@stepanblyschak stepanblyschak commented Oct 15, 2019

Signed-off-by: Stepan Blyschak stepanb@mellanox.com

Description of PR

Summary:
Fixes # (issue)

02:08:09         "ansible_adhoc = <function init_host_mgr at 0x7f19ecd395f0>", 
02:08:09         "testbed = {'comment': 'Mellanox MTBC testbed', 'dut': 'mtbc-sonic-03-2700', 'group-name': 'vm-t1', 'ptf_image_name': 'docker-ptf-mlnx', ...}", 
02:08:09         "", 
02:08:09         "    @pytest.fixture(scope='module')", 
02:08:09         "    def ptfadapter(ansible_adhoc, testbed):", 
02:08:09         "        \"\"\"return ptf test adapter object.", 
02:08:09         "        The fixture is module scope, because usually there is not need to", 
02:08:09         "        restart PTF nn agent and reinitialize data plane thread on every", 
02:08:09         "        test class or test function/method. Session scope should also be Ok,", 
02:08:09         "        however if something goes really wrong in one test module it is safer", 
02:08:09         "        to restart PTF before proceeding running other test modules", 
02:08:09         "        \"\"\"", 
02:08:09         "    ", 
02:08:09         ">       ptfhost = AnsibleHost(ansible_adhoc, testbed['ptf'])", 
02:08:09         "E       KeyError: 'ptf'", 

Type of change

  • Bug fix
  • [] Testbed and Framework(new/improvement)
  • [] Test case(new/improvement)

Approach

How did you do it?

Get ptf_host from inventory

How did you verify/test it?

Run test with pdb and access ptf_host when no ptf in testbed.csv

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Copy link
Copy Markdown
Collaborator

@liat-grozovik liat-grozovik left a comment

Choose a reason for hiding this comment

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

please add more information in the commit message itself.
i am missing bug description as for sure you are fixing some issue found

@stepanblyschak stepanblyschak force-pushed the fix-ptfhost-fixture branch 2 times, most recently from c93136a to 69c8d42 Compare October 15, 2019 16:04
Fix when no ptf in testbed.csv then try to parse it from inventory

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
@liat-grozovik
Copy link
Copy Markdown
Collaborator

@stepanblyschak should this fix be merged to 201811? if so, need to set label.

@liat-grozovik liat-grozovik merged commit 2737970 into sonic-net:master Oct 16, 2019
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Update sonic-sairedis submodule pointer to include the following:

0994449 [asan] suppress the static variable leaks (sonic-net#1085) (sonic-net#1159)
6fc86a9 Switch to using stock gcovr 5.2 (sonic-net#1174) (sonic-net#1190)
e7ded51 Create fabric ports for switch_type fabric (sonic-net#1189)
f498261 * Add Voqs to Virtual Switch (sonic-net#1162)

Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Submodule src/sonic-swss 49aff5da..e237e12d:
  > [aclorch] Validate that provided IN/OUT_PORTS are physical interfaces (sonic-net#1156)
  > Teamd :: fix for cleaning up the teamd processes correctly on teamd docker stop (sonic-net#1159)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
 1d3a810 [python coverage] fix result color bar (sonic-net#202)
 3f7b359 Add a template function that returns list of asics on module (sonic-net#185)
 abc2709 Fix decode error when parsing EEPROM fields (sonic-net#199)
 789b41e Load interval from thermal_policy.json (sonic-net#178)
 540ed1c Fix Xcvrd crash due to invalid key access in type_of_media_interface, host_electrical_interface, connector_dict (sonic-net#206)
 716caf8 Unifying the platform api for get_pcie_aer_stats with PcieBase (sonic-net#197)

Update sonic-utilities with following commit

 3f3974e [show priority-group drop counters] Add user info output when user want to check PG counters and polling are disabled (sonic-net#1678)
 16606de Global and Interface commands for IPv6 Link local address enhancements (sonic-net#1159)
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.

4 participants