Skip to content

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

Merged
liat-grozovik merged 14 commits intosonic-net:masterfrom
vivekrnv:app_ext_auto_ts
May 10, 2022
Merged

[auto_ts] Enable register/de-register auto_ts config for APP Extension#2139
liat-grozovik merged 14 commits intosonic-net:masterfrom
vivekrnv:app_ext_auto_ts

Conversation

@vivekrnv
Copy link
Copy Markdown
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)

vivekrnv and others added 13 commits April 8, 2022 20:10
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
@liat-grozovik
Copy link
Copy Markdown
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

import os
import copy
import unittest
Copy link
Copy Markdown
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
Copy Markdown
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