diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c index cf0dfa60cc5..ee42f455302 100644 --- a/bin/varnishd/mgt/mgt_vcl.c +++ b/bin/varnishd/mgt/mgt_vcl.c @@ -605,21 +605,6 @@ mcf_vcl_inline(struct cli *cli, const char * const *av, void *priv) static void v_matchproto_(cli_func_t) mcf_vcl_load(struct cli *cli, const char * const *av, void *priv) -{ - struct vclprog *vp; - const char *vcls[] = {av[3], NULL}; - - (void)priv; - if (!mcf_find_no_vcl(cli, av[2])) - return; - - vp = mgt_new_vcl(cli, av[2], NULL, vcls, av[4], NULL, 0); - if (vp != NULL && !MCH_Running()) - VCLI_Out(cli, "VCL compiled.\n"); -} - -static void v_matchproto_(cli_func_t) -mcf_vcl_load_files(struct cli *cli, const char * const *av, void *priv) { struct vclprog *vp; const struct parspec *pp; @@ -1150,7 +1135,6 @@ mgt_vcl_poker(const struct vev *e, int what) static struct cli_proto cli_vcl[] = { { CLICMD_VCL_LOAD, "", mcf_vcl_load }, - { CLICMD_VCL_LOAD_FILES, "", mcf_vcl_load_files }, { CLICMD_VCL_INLINE, "", mcf_vcl_inline }, { CLICMD_VCL_USE, "", mcf_vcl_use }, { CLICMD_VCL_STATE, "", mcf_vcl_state }, diff --git a/bin/varnishtest/tests/c00123.vtc b/bin/varnishtest/tests/c00123.vtc index 40ffc2825e7..3271334bbbb 100644 --- a/bin/varnishtest/tests/c00123.vtc +++ b/bin/varnishtest/tests/c00123.vtc @@ -27,9 +27,9 @@ shell { ) > ${tmpdir}/inc.vcl } -varnish v1 -cliexpect "No such file or directory" {vcl.load_files foo c00123.vcl} +varnish v1 -cliexpect "No such file or directory" {vcl.load foo c00123.vcl} -varnish v1 -cliok {vcl.load_files -p ${tmpdir} foo c00123.vcl} +varnish v1 -cliok {vcl.load -p ${tmpdir} foo c00123.vcl} varnish v1 -cliok {vcl.use foo} client c1 { diff --git a/bin/varnishtest/tests/c00124.vtc b/bin/varnishtest/tests/c00124.vtc index a206a347779..eaa8e7e3332 100644 --- a/bin/varnishtest/tests/c00124.vtc +++ b/bin/varnishtest/tests/c00124.vtc @@ -39,7 +39,7 @@ shell { ) > ${tmpdir}/file3.vcl } -varnish v1 -cliok {vcl.load_files -s cold foo ${tmpdir}/file1.vcl ${tmpdir}/file2.vcl ${tmpdir}/file3.vcl} +varnish v1 -cliok {vcl.load -s cold foo ${tmpdir}/file1.vcl ${tmpdir}/file2.vcl ${tmpdir}/file3.vcl} varnish v1 -cliexpect "VCL 'foo' is cold" {vcl.use foo} varnish v1 -cliok {vcl.state foo warm} varnish v1 -cliok {vcl.use foo} diff --git a/bin/varnishtest/tests/v00067.vtc b/bin/varnishtest/tests/v00067.vtc index 46c72c18a04..4f21ee90d81 100644 --- a/bin/varnishtest/tests/v00067.vtc +++ b/bin/varnishtest/tests/v00067.vtc @@ -8,14 +8,14 @@ shell { } # Load a cold VCL. This should not become the active VCL. -varnish v1 -cliok "vcl.load vcl_cold ${tmpdir}/f1 cold" +varnish v1 -cliok "vcl.load -s cold vcl_cold ${tmpdir}/f1" varnish v1 -cliexpect "available *cold *cold *- *vcl_cold" "vcl.list" # The cache should not start without a warm VCL. varnish v1 -clierr 300 "start" # Load a warm VCL and make it the active VCL. -varnish v1 -cliok "vcl.load vcl_warm ${tmpdir}/f1 warm" +varnish v1 -cliok "vcl.load -s warm vcl_warm ${tmpdir}/f1" varnish v1 -cliok "vcl.use vcl_warm" varnish v1 -cliexpect "active *warm *warm *- *vcl_warm" "vcl.list" @@ -25,7 +25,7 @@ varnish v1 -cliexpect "available *cold *cold *0 *vcl_cold" "vcl.list" varnish v1 -cliexpect "active *warm *warm *0 *vcl_warm" "vcl.list" # Load an automatically warming VCL, and set it as the active VCL. -varnish v1 -cliok "vcl.load vcl_auto ${tmpdir}/f1 warm" +varnish v1 -cliok "vcl.load -s warm vcl_auto ${tmpdir}/f1" varnish v1 -cliok "vcl.use vcl_auto" varnish v1 -cliexpect "available *warm *warm *0 *vcl_warm" "vcl.list" varnish v1 -cliexpect "active *warm *warm *0 *vcl_auto" "vcl.list" diff --git a/include/tbl/cli_cmds.h b/include/tbl/cli_cmds.h index 790864bffcb..d536b8c7268 100644 --- a/include/tbl/cli_cmds.h +++ b/include/tbl/cli_cmds.h @@ -75,18 +75,6 @@ CLI_CMD(VCL_LOAD, "vcl.load [auto|cold|warm]", "Compile and load the VCL file under the name provided.", "", - 2, 3 -) - -CLI_CMD(VCL_LOAD_FILES, - "vcl.load_files", - "vcl.load_files [-s auto|cold|warm] [-p vcl_path] [filename2, ...]", - "Compile and load multiple VCL files under the name provided.", - " When multiple files are specified, they are parsed in the order" - " they were provided and treated as if they were concatenated and merged into" - " a single vcl file." - " The optional ``-p`` argument specifies the path of the vcl files (and included files)," - " it is prepended to the ``VCL_PATH`` parameter.", 2, -1 )