Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
e8f8afc5
Commit
e8f8afc5
authored
Nov 07, 2023
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: Teach param.reset -j to output param.show
parent
aa2fc004
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+1
-1
c00054.vtc
bin/varnishtest/tests/c00054.vtc
+1
-0
cli_cmds.h
include/tbl/cli_cmds.h
+4
-2
No files found.
bin/varnishd/mgt/mgt_param.c
View file @
e8f8afc5
...
...
@@ -713,7 +713,7 @@ mcf_wash_param(struct cli *cli, struct parspec *pp, enum mcf_which_e which,
static
struct
cli_proto
cli_params
[]
=
{
{
CLICMD_PARAM_SHOW
,
""
,
mcf_param_show
,
mcf_param_show_json
},
{
CLICMD_PARAM_SET
,
""
,
mcf_param_set
,
mcf_param_set_json
},
{
CLICMD_PARAM_RESET
,
""
,
mcf_param_reset
},
{
CLICMD_PARAM_RESET
,
""
,
mcf_param_reset
,
mcf_param_set_json
},
{
NULL
}
};
...
...
bin/varnishtest/tests/c00054.vtc
View file @
e8f8afc5
...
...
@@ -10,6 +10,7 @@ varnish v1 -cliok "param.show vsl_mask"
varnish v1 -cliexpect {"value": "none"} "param.set -j feature none"
varnish v1 -cliexpect {"value": "all"} "param.set -j vsl_mask all"
varnish v1 -cliexpect {"value": "all(,-\w+)+"} "param.reset -j vsl_mask"
varnish v1 -clierr 106 "param.set vsl_mask FooBar"
varnish v1 -clierr 106 "param.set vsl_mask -FooBar"
...
...
include/tbl/cli_cmds.h
View file @
e8f8afc5
...
...
@@ -172,9 +172,11 @@ CLI_CMD(VCL_LABEL,
CLI_CMD
(
PARAM_RESET
,
"param.reset"
,
"param.reset <param>"
,
"param.reset
[-j]
<param>"
,
"Reset parameter to default value."
,
""
,
" The JSON output is the same as ``param.show -j <param>`` and"
" contains the updated value as it would be represented by a"
" subsequent execution of ``param.show``.
\n\n
"
,
1
,
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment