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

[auto_ts] Enable register/de-register auto_ts config for APP Extension #2139

Merged
merged 14 commits into from
May 10, 2022

Conversation

vivekrnv
Copy link
Contributor

What I did

Added the ability to dynamically add entries into AUTO_TECHSUPPORT_FEATURE when a new app extension is installed/updated

More details can be found here: sonic-net/SONiC#990

How I did it

Enhanced FeatureRegistry Class to also support AUTO_TECHSUPPORT_FEATURE table

How to verify it

  • Unit Tests
  • verify on live switch
root@r-leopard-simx-69:~# redis-cli -n 4 hgetall "AUTO_TECHSUPPORT_FEATURE|what-just-happened"
(empty array)
root@r-leopard-simx-69:~# redis-cli -n 4 hgetall "AUTO_TECHSUPPORT_FEATURE|swss"
1) "rate_limit_interval"
2) "600"
3) "state"
4) "enabled"

root@r-leopard-simx-69:~# sonic-package-manager install what-just-happened
what-just-happened is going to be installed, continue? [y/N]: y

root@r-leopard-simx-69:~# sonic-package-manager install what-just-happened
what-just-happened is going to be installed, continue? [y/N]: y

.............................
what-just-happened entry is added to AUTO_TECHSUPPORT_FEATURE table
root@r-leopard-simx-69:~# redis-cli -n 4 hgetall "AUTO_TECHSUPPORT_FEATURE|what-just-happened"
1) "rate_limit_interval"
2) "600"
3) "state"
4) "enabled"

cat /etc/sonic/config_db.json | jq -r '.AUTO_TECHSUPPORT_FEATURE'
{
....
"what-just-happened": {
    "state": "enabled",
    "rate_limit_interval": "600"
  }
}

cat /etc/sonic/init_cfg.json | jq -r '.AUTO_TECHSUPPORT_FEATURE'
{
....
"what-just-happened": {
    "state": "enabled",
    "rate_limit_interval": "600"
  }
}

root@r-leopard-simx-69:~# sonic-package-manager uninstall what-just-happened
Package what-just-happened is going to be uninstalled, continue? [y/N]: y
..................................................................


root@r-leopard-simx-69:~# redis-cli -n 4 hgetall "AUTO_TECHSUPPORT_FEATURE|what*"
(empty array)


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)

@liat-grozovik
Copy link
Collaborator

@stepanblyschak could you please help to review?
@SuvarnaMeenakshi, @renukamanavalan FYI

@dprital dprital requested a review from qiluo-msft April 25, 2022 16:57
stepanblyschak
stepanblyschak previously approved these changes Apr 26, 2022
@@ -2,6 +2,7 @@

import os
import copy
import unittest
Copy link
Contributor

Choose a reason for hiding this comment

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

why import unittest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

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