Skip to content

[testbed_v2] Init and provision connection_db#2689

Merged
lolyu merged 2 commits intosonic-net:masterfrom
lolyu:testbed_v2_stage_1
Mar 30, 2021
Merged

[testbed_v2] Init and provision connection_db#2689
lolyu merged 2 commits intosonic-net:masterfrom
lolyu:testbed_v2_stage_1

Conversation

@lolyu
Copy link
Collaborator

@lolyu lolyu commented Dec 21, 2020

Description of PR

[testbed_v2] Init and provision connection_db

Signed-off-by: Longxiang Lyu lolv@microsoft.com

Summary:
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

Add initial connection_db setup and provision.

How did you do it?

Modify creategraphy.py to include devices meta for Server and Sonic devices in connection graph files.

Add two Ansible lookup plugins:

  1. graphfile: Find the connection graph file that defineds those DUTs listed in the testbed.
  2. servercfgd_client: Dispatches calls to the remote functions in servercfgd.

Add Ansible role connection_db with the following three actions:

  1. start_db: Install Redis related depedencies for connection_db and servercfgd
  2. stop_db: Remove Redis related dependencies.
  3. provision_db: Calls provision_connection_db remote call of servercfgd to provision connection_db with the connection graph file that contains DUTs defined in this testbed.

How did you verify/test it?

# ansible-playbook -i veos config_connection_db.yml --vault-password-file=password.txt -e duts_name=str-a7060cx-acs-1 -e configure_action=start_db -v
# ansible-playbook -i veos config_connection_db.yml --vault-password-file=password.txt -e duts_name=str-a7060cx-acs-1 -e configure_action=provision_db -v
# ansible-playbook -i veos config_connection_db.yml --vault-password-file=password.txt -e duts_name=str-a7060cx-acs-1 -e configure_action=stop_db -v

Any platform specific information?

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

Documentation

@lgtm-com
Copy link

lgtm-com bot commented Dec 21, 2020

This pull request introduces 1 alert when merging 771f68c05d0716fe67084b20e1dc66202e093586 into 3c513c0 - view on LGTM.com

new alerts:

  • 1 for First parameter of a method is not named 'self'

@lolyu lolyu force-pushed the testbed_v2_stage_1 branch 2 times, most recently from 06dee2c to 280f01b Compare December 21, 2020 06:25
@lolyu lolyu marked this pull request as ready for review December 21, 2020 06:29
@lolyu lolyu changed the title Init and provision connection_db [testbed_v2] Init and provision connection_db Dec 21, 2020
@lolyu lolyu requested a review from a team December 21, 2020 06:33
@lolyu lolyu force-pushed the testbed_v2_stage_1 branch 2 times, most recently from 0c93776 to aa646ac Compare December 22, 2020 09:12
@lolyu lolyu force-pushed the testbed_v2_stage_1 branch 2 times, most recently from 2f55a9b to 6fc25f3 Compare January 6, 2021 14:15
@lolyu
Copy link
Collaborator Author

lolyu commented Jan 21, 2021

Retest this please

lolyu added 2 commits March 29, 2021 20:30
Add support to initialize and provision `connection_db`.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lolyu lolyu force-pushed the testbed_v2_stage_1 branch from 6fc25f3 to c411466 Compare March 30, 2021 03:30
@lolyu lolyu merged commit c94222d into sonic-net:master Mar 30, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
What is the motivation for this PR?
Add initial connection_db setup and provision.

How did you do it?
Modify creategraphy.py to include devices meta for Server and Sonic devices in connection graph files.

Add two Ansible lookup plugins:

graphfile: Find the connection graph file that defineds those DUTs listed in the testbed.
servercfgd_client: Dispatches calls to the remote functions in servercfgd.
Add Ansible role connection_db with the following three actions:

start_db: Install Redis related depedencies for connection_db and servercfgd
stop_db: Remove Redis related dependencies.
provision_db: Calls provision_connection_db remote call of servercfgd to provision connection_db with the connection graph file that contains DUTs defined in this testbed.

Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…onic-net#14169)

swss:
* 2447754 2023-02-23 | Do not allow to add port to .1Q bridge while router port deletion is not completed  (sonic-net#2669) (HEAD -> 202205) [Lior Avramov]
* 641c65c 2023-03-07 | [bfdorch] add default TOS value for BFD session (sonic-net#2689) (HEAD -> 202205) [Baorong Liu]
* 95d3f6d 2023-03-08 | [ACL] Write ACL table/rule creation status into STATE_DB (sonic-net#2662) [bingwang-ms]

swss-common:
* 1fdeb9e 2023-03-03 | Define ACL_TABLE and ACL_RULE table in STATE_DB (sonic-net#748) (HEAD -> 202205, github/202205) [bingwang-ms]

platform-common:
* c441bd7 2023-03-07 | [sonic_ssd] Nokia-7215: Fix "show platform ssdhealth" (sonic-net#337) (HEAD -> 202205) [Pavan-Nokia]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
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