nsmcp::AccessDiagnosticTool method execute (public)

 <instance of nsmcp::AccessDiagnosticTool[i]> execute context \
    arguments

Defined in /usr/local/ns/tcl/nsmcp/traffic-tools.tcl

Run a bounded access-routing diagnostic operation. Validate the configured mode, require scan permissions where appropriate and retain unknown routing evidence.

Parameters:
context (required)
Authenticated request context carrying the principal, grants and selected server.
arguments (required)
Rooted ns_json typed triples for the tool's JSON argument object.
Returns:
A rooted JSON tool-result object, including availability or job metadata as appropriate.

Testcases:
No testcase defined.
Source code:
set options [:options $arguments]
if {${:operation} eq "bot" && [dict get $options mode] eq "scan"} {
    ${:authorizer} require $context diagnostics.runtime.read
    if {[dict get $options includePeerAddresses]} {
        ${:authorizer} require $context diagnostics.logs.peers.read
    }
    if {${:service} eq ""} {
        error "Routing background service is not configured"
    }
    dict set options mode page
    dict unset options lastMinutes
    return [${:service} start $context routingSummary [dict create tool [self] options $options]]
}
if {[dict get $options aggregateTraffic]} {
    error "aggregateTraffic requires bot routing mode scan"
}
return [:page $context $arguments]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: