diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcaf5c3..d1f79c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.9, 3.11] steps: - uses: actions/checkout@v2 diff --git a/_modules/sonic.py b/_modules/sonic.py index 167e95c..2284c74 100644 --- a/_modules/sonic.py +++ b/_modules/sonic.py @@ -531,6 +531,19 @@ def get_running_configdb(): return data_json +def save_running_configdb(): + """Save running config_db configuration to startup config_db configuration. + + CLI Example: + + .. code-block:: bash + + salt "sonic.tor" sonic.save_running_configdb + """ + __salt__["cmd.run"]("config save") + return True + + def _apply_configdb_config(remote_tmpfile): # return nothing if done with success res = __salt__["cmd.run"]("sudo cp {} {}".format(remote_tmpfile, SONIC_DIR))