@@ -2902,7 +2902,7 @@ static Status set_chronicle_auth_token_validator(Cookie& cookie) {
29022902 return status;
29032903}
29042904
2905- Status delete_fusion_namespaces_validator (Cookie& cookie) {
2905+ Status delete_fusion_namespace_validator (Cookie& cookie) {
29062906 auto status = McbpValidator::verify_header (cookie,
29072907 0 ,
29082908 ExpectedKeyLen::Zero,
@@ -2921,67 +2921,57 @@ Status delete_fusion_namespaces_validator(Cookie& cookie) {
29212921 } catch (const nlohmann::json::exception& e) {
29222922 // Note: Don't log the full payload
29232923 const auto msg = fmt::format (
2924- " delete_fusion_namespaces_validator : Invalid json format {}" ,
2924+ " delete_fusion_namespace_validator : Invalid json format {}" ,
29252925 e.what ());
29262926 cookie.setErrorContext (msg);
29272927 return Status::Einval;
29282928 }
29292929
29302930 if (!json.contains (" logstore_uri" )) {
29312931 cookie.setErrorContext (
2932- " delete_fusion_namespaces_validator : Missing logstore_uri" );
2932+ " delete_fusion_namespace_validator : Missing logstore_uri" );
29332933 return Status::Einval;
29342934 }
29352935 if (!json[" logstore_uri" ].is_string ()) {
29362936 cookie.setErrorContext (
2937- " delete_fusion_namespaces_validator : logstore_uri not string" );
2937+ " delete_fusion_namespace_validator : logstore_uri not string" );
29382938 return Status::Einval;
29392939 }
29402940
29412941 if (!json.contains (" metadatastore_uri" )) {
29422942 cookie.setErrorContext (
2943- " delete_fusion_namespaces_validator : Missing "
2943+ " delete_fusion_namespace_validator : Missing "
29442944 " metadatastore_uri" );
29452945 return Status::Einval;
29462946 }
29472947 if (!json[" metadatastore_uri" ].is_string ()) {
29482948 cookie.setErrorContext (
2949- " delete_fusion_namespaces_validator : metadatastore_uri not "
2949+ " delete_fusion_namespace_validator : metadatastore_uri not "
29502950 " string" );
29512951 return Status::Einval;
29522952 }
29532953
29542954 if (!json.contains (" metadatastore_auth_token" )) {
29552955 cookie.setErrorContext (
2956- " delete_fusion_namespaces_validator : Missing "
2956+ " delete_fusion_namespace_validator : Missing "
29572957 " metadatastore_auth_token" );
29582958 return Status::Einval;
29592959 }
29602960 if (!json[" metadatastore_auth_token" ].is_string ()) {
29612961 cookie.setErrorContext (
2962- " delete_fusion_namespaces_validator : metadatastore_auth_token "
2962+ " delete_fusion_namespace_validator : metadatastore_auth_token "
29632963 " not string" );
29642964 return Status::Einval;
29652965 }
29662966
2967- if (!json.contains (" namespaces " )) {
2967+ if (!json.contains (" namespace " )) {
29682968 cookie.setErrorContext (
2969- " delete_fusion_namespaces_validator : Missing mountPaths " );
2969+ " delete_fusion_namespace_validator : Missing namespace " );
29702970 return Status::Einval;
29712971 }
2972- if (!json[" namespaces " ].is_array ()) {
2972+ if (!json[" namespace " ].is_string ()) {
29732973 cookie.setErrorContext (
2974- " delete_fusion_namespaces_validator: namespaces not an array" );
2975- return Status::Einval;
2976- }
2977- try {
2978- std::vector<std::string> paths = json[" namespaces" ];
2979- } catch (const std::exception& e) {
2980- const auto msg = fmt::format (
2981- " delete_fusion_namespaces_validator: Invalid json '{}' {}" ,
2982- value,
2983- e.what ());
2984- cookie.setErrorContext (msg);
2974+ " delete_fusion_namespace_validator: namespace not string" );
29852975 return Status::Einval;
29862976 }
29872977
@@ -3299,6 +3289,6 @@ McbpValidator::McbpValidator() {
32993289 stop_fusion_uploader_validator);
33003290 setup (cb::mcbp::ClientOpcode::SetChronicleAuthToken,
33013291 set_chronicle_auth_token_validator);
3302- setup (cb::mcbp::ClientOpcode::DeleteFusionNamespaces ,
3303- delete_fusion_namespaces_validator );
3292+ setup (cb::mcbp::ClientOpcode::DeleteFusionNamespace ,
3293+ delete_fusion_namespace_validator );
33043294}
0 commit comments