aboutsummaryrefslogtreecommitdiff
path: root/src/zen/cmds/cache_cmd.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-05-04 12:48:50 +0200
committerGitHub Enterprise <[email protected]>2026-05-04 12:48:50 +0200
commitac8711e10eb19eada27c1d8eb58487dfb3199af9 (patch)
treedce7ca871ad4fcc44880b18cecd7a5436ba4e27b /src/zen/cmds/cache_cmd.cpp
parentOplog commands -> oplog subcommands (#1025) (diff)
downloadarchived-zen-ac8711e10eb19eada27c1d8eb58487dfb3199af9.tar.xz
archived-zen-ac8711e10eb19eada27c1d8eb58487dfb3199af9.zip
zen CLI: project-* commands → 'project <sub>' subcommands (#1026)
- Refactors the five `project-*` top-level commands into a `project <sub>` subcommand structure, mirroring the existing `cache <sub>` pattern. New surface: `project create | drop | info | op-details | stats`. - Legacy `project-create`, `project-drop`, `project-info`, `project-op-details`, `project-stats` remain functional as hidden deprecated shims that forward through `project_legacy_shim::RunAs`, so existing scripts (e.g. `scripts/test_scripts/oplog-import-export-test.py`) keep working unchanged.
Diffstat (limited to 'src/zen/cmds/cache_cmd.cpp')
-rw-r--r--src/zen/cmds/cache_cmd.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/zen/cmds/cache_cmd.cpp b/src/zen/cmds/cache_cmd.cpp
index f93a5318c..5deebeb4b 100644
--- a/src/zen/cmds/cache_cmd.cpp
+++ b/src/zen/cmds/cache_cmd.cpp
@@ -98,16 +98,6 @@ CacheSubCmdBase::CacheSubCmdBase(std::string_view Name, std::string_view Descrip
m_SubOptions.add_option("", "u", "hosturl", ZenCmdBase::kHostUrlHelp, cxxopts::value(m_HostName)->default_value(""), "<hosturl>");
}
-void
-CacheSubCmdBase::ResolveHost()
-{
- m_HostName = ZenCmdBase::ResolveTargetHostSpec(m_HostName);
- if (m_HostName.empty())
- {
- throw OptionParseException("Unable to resolve server specification", m_SubOptions.help());
- }
-}
-
////////////////////////////////////////////////////////////////////////////////
// Legacy shim dispatcher
@@ -170,7 +160,6 @@ CacheDropSubCmd::CacheDropSubCmd() : CacheSubCmdBase("drop", "Drop cache namespa
void
CacheDropSubCmd::Run(const ZenCliOptions& /*GlobalOptions*/)
{
- ResolveHost();
ZenServiceClient Service({.HostSpec = m_HostName, .CommandName = "drop"});
HttpClient& Http = Service.Http();
@@ -225,7 +214,6 @@ CacheInfoSubCmd::CacheInfoSubCmd() : CacheSubCmdBase("info", "Info on cache, nam
void
CacheInfoSubCmd::Run(const ZenCliOptions& /*GlobalOptions*/)
{
- ResolveHost();
ZenServiceClient Service({.HostSpec = m_HostName, .CommandName = "info"});
HttpClient& Http = Service.Http();
@@ -296,7 +284,6 @@ CacheStatsSubCmd::CacheStatsSubCmd() : CacheSubCmdBase("stats", "Stats on cache"
void
CacheStatsSubCmd::Run(const ZenCliOptions& /*GlobalOptions*/)
{
- ResolveHost();
ZenServiceClient Service({.HostSpec = m_HostName, .CommandName = "stats"});
HttpClient& Http = Service.Http();
@@ -334,7 +321,6 @@ CacheDetailsSubCmd::CacheDetailsSubCmd() : CacheSubCmdBase("details", "Details o
void
CacheDetailsSubCmd::Run(const ZenCliOptions& /*GlobalOptions*/)
{
- ResolveHost();
ZenServiceClient Service({.HostSpec = m_HostName, .CommandName = "details"});
HttpClient& Http = Service.Http();
@@ -433,7 +419,6 @@ CacheGenSubCmd::CacheGenSubCmd() : CacheSubCmdBase("gen", "Generates cache value
void
CacheGenSubCmd::Run(const ZenCliOptions& /*GlobalOptions*/)
{
- ResolveHost();
ZenServiceClient Service({.HostSpec = m_HostName, .CommandName = "gen"});
HttpClient& Http = Service.Http();
@@ -670,7 +655,6 @@ CacheGetSubCmd::Run(const ZenCliOptions& /*GlobalOptions*/)
{
using namespace std::literals;
- ResolveHost();
ZenServiceClient Service({.HostSpec = m_HostName, .CommandName = "get"});
HttpClient& Http = Service.Http();
@@ -796,7 +780,6 @@ CacheRecordSubCmd::CacheRecordSubCmd()
void
CacheRecordSubCmd::Run(const ZenCliOptions& /*GlobalOptions*/)
{
- ResolveHost();
ZenServiceClient Service({.HostSpec = m_HostName, .CommandName = "record"});
HttpClient& Http = Service.Http();