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

Replace pyswsssdk with swsscommon #2251

Merged
merged 6 commits into from
Jul 13, 2022

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Jul 5, 2022

What I did

Replace sonic-py-swsssdk with sonic-swss-common.

How I did it

Update all sonic-py-swsssdk to use sonic-swss-common or sonic-py-common.

How to verify it

Pass all UT and E2E test.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@liuh-80
Copy link
Contributor Author

liuh-80 commented Jul 5, 2022

This PR depends on another PR to merge first:
sonic-net/sonic-buildimage#11215

@liuh-80
Copy link
Contributor Author

liuh-80 commented Jul 7, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Jul 8, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Jul 11, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -6539,7 +6539,7 @@ def rate():
@click.argument('rates_type', type=click.Choice(['all', 'port', 'rif', 'flowcnt-trap']), default='all')
def smoothing_interval(interval, rates_type):
"""Set rates smoothing interval """
counters_db = swsssdk.SonicV2Connector()
counters_db = SonicV2Connector()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following API missing in sonic-swss-common:

int64_t SonicV2Connector_Native::set(const std::string& db_name, const std::string& _hash, const std::string& key, const int val, bool blocking=false);

So this PR need wait for swss-common add the missing API first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Create another PR to add the set method:

sonic-net/sonic-swss-common#648

@@ -26,7 +26,6 @@ Currently, this list of dependencies is as follows:
- libyang-cpp_1.0.73_amd64.deb
- python3-yang_1.0.73_amd64.deb
- redis_dump_load-1.1-py3-none-any.whl
- swsssdk-2.0.1-py3-none-any.whl
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 11, 2022

Choose a reason for hiding this comment

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

swsssdk

Add "python-swsscommon_1.0.0_amd64.deb" into the list? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

qiluo-msft
qiluo-msft previously approved these changes Jul 11, 2022
@liuh-80 liuh-80 marked this pull request as ready for review July 13, 2022 02:03
@liuh-80 liuh-80 changed the title [WIP] Replace pyswsssdk with swsscommon Replace pyswsssdk with swsscommon Jul 13, 2022
@liuh-80
Copy link
Contributor Author

liuh-80 commented Jul 13, 2022

The depends PR merged, so this PR is ready for review.

@liuh-80 liuh-80 merged commit 1dacb7f into sonic-net:master Jul 13, 2022
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