LB:get_valid_routing()
Returns a list of backend names configured on the current Virtual Server in the form of a Lua table (number as key, string as value).
Since there must be at least one backend, the returned value cannot be nil or empty. In case of a single routing with zero or one content routing configured, the pool name will be returned.
Syntax
LB:get_valid_routing();
Arguments
N/A
Events
Applicable in the following events:
-
HTTP_REQUEST
-
HTTP_DATA_REQUEST
-
AUTH_RESULT
Example
when HTTP_REQUEST {
t=LB:get_valid_routing()
for k, v in pairs(t) do
debug("Key: %d Value: %s\n", k, v)
end
}
Supported Version
FortiADC version 7.4.2 and later.