Skip to content

Commit

Permalink
T5249: Add node rollback-soft
Browse files Browse the repository at this point in the history
```
vyos@r4# rollback-soft
Possible completions:
  <N>	Rollback to revision N
```
  • Loading branch information
sever-sever committed Dec 11, 2023
1 parent f86d305 commit 935389a
Show file tree
Hide file tree
Showing 11 changed files with 9,415 additions and 0 deletions.
126 changes: 126 additions & 0 deletions debian/autoreconf.after
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
symlink ./ChangeLog
b62a65ecf99f01f7cfc0c0bc2e7dff96 ./autom4te.cache/output.3
8aa6a05847ab423165c42e5cbc34edc5 ./autom4te.cache/requests
1f7ad47ec29f17deb25574c7a0af5ae3 ./autom4te.cache/traces.0
092a107c36bd38295c4fbcdbe23a6d1f ./autom4te.cache/traces.1
6b318a7b46c1c71933982b87e6f6817a ./autom4te.cache/output.1
955b3881a6ab1257db3de0b17e5aa452 ./autom4te.cache/traces.2
5f48055bee326cfb69d0eccba0d714bb ./autom4te.cache/traces.3
ab9d8906639102d30c53355f832119c7 ./autom4te.cache/output.2
ab9d8906639102d30c53355f832119c7 ./autom4te.cache/output.0
8540f059fd3d29ff087bcff12160d219 ./lib/Vyatta/ioctl.pm
43f21efef201aa96cf4a12ea9ce54f13 ./lib/Vyatta/ConfigOutput.pm
1ea7810399f04834af6c23d92053b483 ./lib/Vyatta/File.pm
c9a698f5b32a1a26c75a937364feef01 ./lib/Vyatta/Interface.pm
48d6ec98ec65c722df3ca26b1b24ee04 ./lib/Vyatta/Misc.pm
5a21440b549fa663d05311992c544320 ./lib/Vyatta/Config.pm
dff0e4fcb232730537fcc235fd3bcc01 ./lib/Vyatta/TypeChecker.pm
421f437820e73aee8a243b7ced258168 ./lib/systemd/serial/aftervyos.conf
1f1fdcaad74dcc8b355b2233b745be38 ./lib/systemd/aftervyos.conf
b457d4b9012ea0b4ad319c645c2a0e5d ./aclocal.m4
dd63184811cb2ff705c3e466364d3773 ./INSTALL
086b8da5a251be943f06d3a927bbe60e ./config/missing
f93f8aa2e516d29f00960b4c5e41cbcd ./config/ltmain.sh
b706ac2ba26475072c6dc72a68bd5ea0 ./config/config.sub
5b624ccf5433fa4346f2ce2e4bbaf7f7 ./config/ylwrap
6ecafe15a6088eb7a2f4f2aadbb240ce ./config/depcomp
b816f92498a6ec8138d9ec53a14bcaa4 ./config/compile
b090c5891571c820e91d345a9551af44 ./config/install-sh
32828e0f15b831b50dbb2c7503b8d89b ./config/config.guess
a8ca3aacddb10d88c17883175178640a ./.merge-branch-exclude
f1986cd1ac468e07ef608ef31afdd0ee ./.gitignore
dbce7a010b789a3fe25b50c5de3621ae ./scripts/vyos-user-precommit-hooks.sh
e287e5835dd24bcdc9ebee1223cbbefa ./scripts/vyatta-cfg-notify
052445cb817d053e40d9dfda0920d732 ./scripts/vyatta-save-config.pl
0cf2f5023ad07c9cf47ac3725ab32f53 ./scripts/vyos-user-postcommit-hooks.sh
5adbce5dfacc5caf6f2ddc5095988a52 ./scripts/vyatta-cfg-cmd-wrapper
ea813560598b00f0232f96cbda5c1cb1 ./scripts/priority.pl
3d1ebd8455ec286aed377f7f6e782192 ./scripts/vyatta-log-commit.pl
604c78906ac569d458737f3a9c391a54 ./NEWS
f35dc1f098856c0a67704a7c77a2d484 ./.frlog
9e76e900c6256192e6dab03af84a7409 ./functions/interpreter/vyatta-cfg-run
b2ec62c77de339cda3e53eb35431bae5 ./functions/wrapper/script-template
af5b0e474b5d5d12f95881a883e314d3 ./AUTHORS
54ebecdd53d2443f6531efc03ed699d7 ./Makefile.in
9953c6f5d899ca30f4f6864fe1a748f8 ./src/exe_action.c
4ad8ce5a51ac51ad6ff2797340e530f3 ./src/common/common.h
22b15b3a370d585f1dbb24d4e18bc58c ./src/common/defs.h
c157110494a6d820f9db7eb80561fe71 ./src/common/unionfs.c
151564a5efa3c6851a75c2884a615b00 ./src/common/unionfs.h
d0a754ce6a2970246ac9570b61ae8bd7 ./src/commit/commit-algorithm.hpp
bc6c8da7d57a725e59559ea0eceb72d6 ./src/commit/commit-algorithm.cpp
4208ae16e55ce3f38944c8b42b0062fe ./src/cli_parse.y
e8ec4e80851aef9f93ed30f20a67933d ./src/check_tmpl.c
41ee6cfd63a519c4cd0cc6d788fa8176 ./src/cli_bin.cpp
0197587bbcf9d38998963cc6c9612eea ./src/dump_session.c
c4b80adf0c51e2d0fa50bf5fd7f66a45 ./src/.gitignore
f6491922fd8b850abe87b8f8e82cdee1 ./src/cli_new.c
0b66cea45c1450a3653207c6520294fc ./src/cli_def.l
e255012f60a6650daae03e36a22061f6 ./src/cnode/cnode-algorithm.cpp
7e13348522d471e27c22ce27adf43ef5 ./src/cnode/cnode.hpp
76ff7f70c80bbd3d053ce82117561294 ./src/cnode/cnode-algorithm.hpp
11c48d4ca533d08c1beee6f2ea036395 ./src/cnode/cnode-util.hpp
ebcf7d68bde3e115cb587fcf5452ac47 ./src/cnode/cnode.cpp
74b22d2ce8c7a9b37acb4e5d4326851d ./src/cli_path_utils.c
3e11dfb214be7417b8d9dda54ef9fc5a ./src/cli_val.l
f2ae946c5b9e602f36693ff5637d0f65 ./src/cli_path_utils.h
dca07f50a23459e2b9367943a12bd469 ./src/commit2.cpp
b31fa9c1ddb65ab5ccea674e0fa65a47 ./src/cli_shell_api.cpp
e86473d2d66ae828bb315796b6f7a9da ./src/cli_objects.c
63447fdd7a5d40c0414c7f4913b69c46 ./src/cstore/util.hpp
2a14dea4a92d841a65c0b9dcfcc3e432 ./src/cstore/unionfs/fspath.hpp
f6489bc1420ad29eaf26582b9d0f3225 ./src/cstore/unionfs/cstore-unionfs.cpp
edadedbd599fda51d9416dfda98d0358 ./src/cstore/unionfs/cstore-unionfs.hpp
4e6bd058333dff56028e4376ad5103c8 ./src/cstore/cstore.hpp
f5f8fe8cd09f233d662a35f197d292a6 ./src/cstore/cstore-c.h
f4b08866d2691073b9291c0eb5792c5f ./src/cstore/cstore.cpp
4ac081235ded7e0726c7e17e8f7137bf ./src/cstore/cpath.hpp
f50ac4f6010db1c57be58e9c001f6a22 ./src/cstore/ctemplate.hpp
5d954534951992ef1529204c00efc86c ./src/cstore/cstore-varref.hpp
1b8f854bf78dcaeecdea126fcd371c34 ./src/cstore/cstore-c.cpp
b59c6e35cbf23be54d6e2a44ef7dc9e6 ./src/cstore/cstore-varref.cpp
63974949e93fbc8932979ac3abad742c ./src/cstore/svector.hpp
49d4cd9a09579f123f59e60a92de357d ./src/cli_cstore.h
75234beff84d60df5d539a051d596991 ./src/vyos-errors.h
a14ebc97d088fe893830037ddb284f38 ./src/cparse/cparse.ypp
30a7c8307942e1514dbddad64de131d0 ./src/cparse/cparse.hpp
9066b850b017f4fd846079d8b9480b40 ./src/cparse/cparse_lex.l
bc519ad7c5dd9bafb5a5ae28f1fb042e ./src/cparse/cparse_def.h
ebf09986ed54b8bffe9afdae83805d3d ./src/cli_val_engine.c
6b1f3496e0e5e710290a24a8a4ee1ebf ./src/cli_objects.h
40c9da00157b4aebfc89e0209d9831ff ./src/priority.c
bb97811b60663bc01f7912113401192d ./src/cli_val.h
6a5a65cafa9b5373504b2c0f10338c72 ./src/cli_val_engine.h
abb4ebbfcc4b251702d9f9073562c1cd ./etc/default/vyatta-load-boot
b7008695f68b969257b77ec1371e37a9 ./etc/default/vyatta-cfg
838337db0b65bfd3a542f0c5ca047ae2 ./etc/shell/level/admin/restricted-mode
07ec69512bddb22690b83855a0ab6e18 ./etc/shell/level/users/allowed-pipe
dfbfc09aef387eeaf7158f8bb8c0be31 ./etc/shell/level/users/restricted-mode
d41d8cd98f00b204e9800998ecf8427e ./etc/shell/level/users/allowed-cfg
7baf050be2db1244fd8169f48a45067e ./etc/logrotate.d/vyatta-config-logs
51debedfccef60d77d11e4a9ad7d245a ./etc/logrotate.d/auth
821c01cb88dd6afa0c300427bec49195 ./etc/bash_completion.d/vyatta-cfg
eb723b61539feef013de476e68b5c50a ./COPYING
c86c5295457f3db6da062ef23ff7d47c ./perl_dmod/Cstore/MANIFEST
ba8a7e1de9b9b5825cd204bad5a8ca24 ./perl_dmod/Cstore/Cstore.xs
3e142490d0ba44bc503c8cde5c555259 ./perl_dmod/Cstore/Changes
f7016b86b59dd056fdf100a61bddb995 ./perl_dmod/Cstore/lib/Cstore.pm
9bdac6a5f53c80434a2d5922c068fdd0 ./perl_dmod/Cstore/.gitignore
96476ab82cf7fc29b55e3f8648787e0b ./perl_dmod/Cstore/Makefile.PL
38c2f59efbf75301e9b2b88ddd9a8f29 ./perl_dmod/Cstore/typemap
9d3305b7a50affd87f55aecbadeb5d43 ./perl_dmod/Cstore/t/Cstore.t
b0f548843241e08c68ec0275660a1f8f ./perl_dmod/Cstore/README
78f3d7f8c90d5ce61f9a2a3e7f248835 ./perl_dmod/.gitignore
ddaf34b7e674d656028b3db6f483e83e ./perl_dmod/Makefile.in
56cc46fbd1a494bda20adf65834ca006 ./perl_dmod/Makefile.am
724a635c477fb4e09019f377def23f48 ./Makefile.am
b4087fbf79375b6d394e84ca6aa13d7e ./configure.ac
4bead3247130d2d9ac49e09ce6604ad5 ./Jenkinsfile
30838b9ba04529705f92bcb4d2f1cd4e ./README
5a35ba4df50f66788be1399f0ffa64d0 ./.github/workflows/codeql.yml
665ef728f05b03734804931333632de4 ./m4/ltversion.m4
98312682443b415dc42558ee6c7f25a9 ./m4/ltoptions.m4
42fc54566fd6a8055fad65f78f32960c ./m4/lt~obsolete.m4
057a003c14ef81b6c16d1dc54d491105 ./m4/ltsugar.m4
977b5a5821f9013ef0cd54824d232a20 ./m4/libtool.m4
bccae674ee3ca829237c6bf67c0e1eb5 ./configure
99 changes: 99 additions & 0 deletions debian/autoreconf.before
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
symlink ./ChangeLog
8540f059fd3d29ff087bcff12160d219 ./lib/Vyatta/ioctl.pm
43f21efef201aa96cf4a12ea9ce54f13 ./lib/Vyatta/ConfigOutput.pm
1ea7810399f04834af6c23d92053b483 ./lib/Vyatta/File.pm
c9a698f5b32a1a26c75a937364feef01 ./lib/Vyatta/Interface.pm
48d6ec98ec65c722df3ca26b1b24ee04 ./lib/Vyatta/Misc.pm
5a21440b549fa663d05311992c544320 ./lib/Vyatta/Config.pm
dff0e4fcb232730537fcc235fd3bcc01 ./lib/Vyatta/TypeChecker.pm
421f437820e73aee8a243b7ced258168 ./lib/systemd/serial/aftervyos.conf
1f1fdcaad74dcc8b355b2233b745be38 ./lib/systemd/aftervyos.conf
a8ca3aacddb10d88c17883175178640a ./.merge-branch-exclude
f1986cd1ac468e07ef608ef31afdd0ee ./.gitignore
dbce7a010b789a3fe25b50c5de3621ae ./scripts/vyos-user-precommit-hooks.sh
e287e5835dd24bcdc9ebee1223cbbefa ./scripts/vyatta-cfg-notify
052445cb817d053e40d9dfda0920d732 ./scripts/vyatta-save-config.pl
0cf2f5023ad07c9cf47ac3725ab32f53 ./scripts/vyos-user-postcommit-hooks.sh
5adbce5dfacc5caf6f2ddc5095988a52 ./scripts/vyatta-cfg-cmd-wrapper
ea813560598b00f0232f96cbda5c1cb1 ./scripts/priority.pl
3d1ebd8455ec286aed377f7f6e782192 ./scripts/vyatta-log-commit.pl
604c78906ac569d458737f3a9c391a54 ./NEWS
f35dc1f098856c0a67704a7c77a2d484 ./.frlog
9e76e900c6256192e6dab03af84a7409 ./functions/interpreter/vyatta-cfg-run
b2ec62c77de339cda3e53eb35431bae5 ./functions/wrapper/script-template
af5b0e474b5d5d12f95881a883e314d3 ./AUTHORS
9953c6f5d899ca30f4f6864fe1a748f8 ./src/exe_action.c
4ad8ce5a51ac51ad6ff2797340e530f3 ./src/common/common.h
22b15b3a370d585f1dbb24d4e18bc58c ./src/common/defs.h
c157110494a6d820f9db7eb80561fe71 ./src/common/unionfs.c
151564a5efa3c6851a75c2884a615b00 ./src/common/unionfs.h
d0a754ce6a2970246ac9570b61ae8bd7 ./src/commit/commit-algorithm.hpp
bc6c8da7d57a725e59559ea0eceb72d6 ./src/commit/commit-algorithm.cpp
4208ae16e55ce3f38944c8b42b0062fe ./src/cli_parse.y
e8ec4e80851aef9f93ed30f20a67933d ./src/check_tmpl.c
41ee6cfd63a519c4cd0cc6d788fa8176 ./src/cli_bin.cpp
0197587bbcf9d38998963cc6c9612eea ./src/dump_session.c
c4b80adf0c51e2d0fa50bf5fd7f66a45 ./src/.gitignore
f6491922fd8b850abe87b8f8e82cdee1 ./src/cli_new.c
0b66cea45c1450a3653207c6520294fc ./src/cli_def.l
e255012f60a6650daae03e36a22061f6 ./src/cnode/cnode-algorithm.cpp
7e13348522d471e27c22ce27adf43ef5 ./src/cnode/cnode.hpp
76ff7f70c80bbd3d053ce82117561294 ./src/cnode/cnode-algorithm.hpp
11c48d4ca533d08c1beee6f2ea036395 ./src/cnode/cnode-util.hpp
ebcf7d68bde3e115cb587fcf5452ac47 ./src/cnode/cnode.cpp
74b22d2ce8c7a9b37acb4e5d4326851d ./src/cli_path_utils.c
3e11dfb214be7417b8d9dda54ef9fc5a ./src/cli_val.l
f2ae946c5b9e602f36693ff5637d0f65 ./src/cli_path_utils.h
dca07f50a23459e2b9367943a12bd469 ./src/commit2.cpp
b31fa9c1ddb65ab5ccea674e0fa65a47 ./src/cli_shell_api.cpp
e86473d2d66ae828bb315796b6f7a9da ./src/cli_objects.c
63447fdd7a5d40c0414c7f4913b69c46 ./src/cstore/util.hpp
2a14dea4a92d841a65c0b9dcfcc3e432 ./src/cstore/unionfs/fspath.hpp
f6489bc1420ad29eaf26582b9d0f3225 ./src/cstore/unionfs/cstore-unionfs.cpp
edadedbd599fda51d9416dfda98d0358 ./src/cstore/unionfs/cstore-unionfs.hpp
4e6bd058333dff56028e4376ad5103c8 ./src/cstore/cstore.hpp
f5f8fe8cd09f233d662a35f197d292a6 ./src/cstore/cstore-c.h
f4b08866d2691073b9291c0eb5792c5f ./src/cstore/cstore.cpp
4ac081235ded7e0726c7e17e8f7137bf ./src/cstore/cpath.hpp
f50ac4f6010db1c57be58e9c001f6a22 ./src/cstore/ctemplate.hpp
5d954534951992ef1529204c00efc86c ./src/cstore/cstore-varref.hpp
1b8f854bf78dcaeecdea126fcd371c34 ./src/cstore/cstore-c.cpp
b59c6e35cbf23be54d6e2a44ef7dc9e6 ./src/cstore/cstore-varref.cpp
63974949e93fbc8932979ac3abad742c ./src/cstore/svector.hpp
49d4cd9a09579f123f59e60a92de357d ./src/cli_cstore.h
75234beff84d60df5d539a051d596991 ./src/vyos-errors.h
a14ebc97d088fe893830037ddb284f38 ./src/cparse/cparse.ypp
30a7c8307942e1514dbddad64de131d0 ./src/cparse/cparse.hpp
9066b850b017f4fd846079d8b9480b40 ./src/cparse/cparse_lex.l
bc519ad7c5dd9bafb5a5ae28f1fb042e ./src/cparse/cparse_def.h
ebf09986ed54b8bffe9afdae83805d3d ./src/cli_val_engine.c
6b1f3496e0e5e710290a24a8a4ee1ebf ./src/cli_objects.h
40c9da00157b4aebfc89e0209d9831ff ./src/priority.c
bb97811b60663bc01f7912113401192d ./src/cli_val.h
6a5a65cafa9b5373504b2c0f10338c72 ./src/cli_val_engine.h
abb4ebbfcc4b251702d9f9073562c1cd ./etc/default/vyatta-load-boot
b7008695f68b969257b77ec1371e37a9 ./etc/default/vyatta-cfg
838337db0b65bfd3a542f0c5ca047ae2 ./etc/shell/level/admin/restricted-mode
07ec69512bddb22690b83855a0ab6e18 ./etc/shell/level/users/allowed-pipe
dfbfc09aef387eeaf7158f8bb8c0be31 ./etc/shell/level/users/restricted-mode
d41d8cd98f00b204e9800998ecf8427e ./etc/shell/level/users/allowed-cfg
7baf050be2db1244fd8169f48a45067e ./etc/logrotate.d/vyatta-config-logs
51debedfccef60d77d11e4a9ad7d245a ./etc/logrotate.d/auth
821c01cb88dd6afa0c300427bec49195 ./etc/bash_completion.d/vyatta-cfg
eb723b61539feef013de476e68b5c50a ./COPYING
c86c5295457f3db6da062ef23ff7d47c ./perl_dmod/Cstore/MANIFEST
ba8a7e1de9b9b5825cd204bad5a8ca24 ./perl_dmod/Cstore/Cstore.xs
3e142490d0ba44bc503c8cde5c555259 ./perl_dmod/Cstore/Changes
f7016b86b59dd056fdf100a61bddb995 ./perl_dmod/Cstore/lib/Cstore.pm
9bdac6a5f53c80434a2d5922c068fdd0 ./perl_dmod/Cstore/.gitignore
96476ab82cf7fc29b55e3f8648787e0b ./perl_dmod/Cstore/Makefile.PL
38c2f59efbf75301e9b2b88ddd9a8f29 ./perl_dmod/Cstore/typemap
9d3305b7a50affd87f55aecbadeb5d43 ./perl_dmod/Cstore/t/Cstore.t
b0f548843241e08c68ec0275660a1f8f ./perl_dmod/Cstore/README
78f3d7f8c90d5ce61f9a2a3e7f248835 ./perl_dmod/.gitignore
56cc46fbd1a494bda20adf65834ca006 ./perl_dmod/Makefile.am
724a635c477fb4e09019f377def23f48 ./Makefile.am
b4087fbf79375b6d394e84ca6aa13d7e ./configure.ac
4bead3247130d2d9ac49e09ce6604ad5 ./Jenkinsfile
30838b9ba04529705f92bcb4d2f1cd4e ./README
5a35ba4df50f66788be1399f0ffa64d0 ./.github/workflows/codeql.yml
3 changes: 3 additions & 0 deletions debian/debhelper-build-stamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vyatta-cfg
libvyatta-cfg1
libvyatta-cfg-dev
14 changes: 14 additions & 0 deletions functions/interpreter/vyatta-cfg-run
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ _vyatta_cfg_cmds=( "confirm" \
"merge" \
"rename" \
"rollback" \
"rollback-soft" \
"run" \
"save" \
"set" \
Expand All @@ -56,6 +57,7 @@ _vyatta_cfg_helps=( \
"Load configuration from a file and merge running configuration" \
"Rename a configuration element" \
"Rollback to a prior config revision (requires reboot)" \
"Rollback to a prior config revision (without reboot)" \
"Run an operational-mode command" \
"Save configuration to a file" \
"Set the value of a parameter or create a new element" \
Expand Down Expand Up @@ -212,6 +214,15 @@ vyatta_config_rollback ()
sudo ${vyos_bin_dir}/config-mgmt rollback --rev "$@"
}

vyatta_config_rollback-soft ()
{
if [ $# != 1 ]; then
echo "Error: must include a revision # to rollback to"
return 1;
fi
${vyos_bin_dir}/config-mgmt rollback_soft --rev "$@"
}

shutdown ()
{
echo "Exit from configure mode before shutting down system."
Expand Down Expand Up @@ -565,6 +576,7 @@ vyatta_cfg_run ()
commit) vyatta_config_commit "${@:2}";;
confirm) vyatta_config_confirm "${@:2}";;
rollback) vyatta_config_rollback "${@:2}";;
rollback-soft) vyatta_config_rollback-soft "${@:2}";;
commit-confirm) vyatta_config_commit-confirm "${@:2}";;
compare) vyatta_config_compare "${@:2}";;
save) vyatta_config_save "${@:2}" ;;
Expand Down Expand Up @@ -614,6 +626,8 @@ _vyatta_cfg_init ()
complete -F vyatta_compare_complete ${cmd:0:$pos} ;;
rollback)
complete -F vyatta_rollback_complete ${cmd:0:$pos} ;;
rollback-soft)
complete -F vyatta_rollback_complete ${cmd:0:$pos} ;;
commit|commit-confirm)
complete -F vyatta_commit_complete ${cmd:0:$pos} ;;
*)
Expand Down
Loading

0 comments on commit 935389a

Please sign in to comment.