nsmcp::AccessDiagnosticTool method nativeClassify (public)
<instance of nsmcp::AccessDiagnosticTool> nativeClassify server \ record snapshot target
Defined in /usr/local/ns/tcl/nsmcp/traffic-tools.tcl
- Parameters:
- server (required)
- record (required)
- snapshot (required)
- target (required)
- Testcases:
- No testcase defined.
Source code: set result [dict create lookupMode native-context expectedPool unknown contextComplete [:contextComplete $record $snapshot] category unknown matchingRuleIndexes {} unknownRules 0 lookupError {}] if {![dict get $result contextComplete]} {return $result} if {[catch {${:routing} mapped $server $record} expected]} { # A row-specific lookup error must not silently become fallback # rule membership or a claim that the default pool is correct. dict set result lookupError {Native route lookup failed for this record.} return $result } dict set result expectedPool $expected set actual [dict get $record pool] if {$actual eq "unknown"} {return $result} if {$expected eq $target} { dict set result category [expr {$actual eq $target ? "native-target-in-target" : "native-target-other-pool-candidate"}] } elseif {[dict exists $record userAgent] && [regexp -nocase {bot|crawl|spider|baidu|knowledge} [dict get $record userAgent]] && $actual ne $target} { dict set result category bot-like-routed-elsewhere-heuristic } else { dict set result category native-other-pool } return $resultXQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)