mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

- This gives the cluster controller and agent the common name "Management framework" and changes the start directory of the sources from "policy/frameworks/cluster" to "policy/frameworks/management". This avoids ambiguity with the existing cluster framework. - It renames the "ClusterController" and "ClusterAgent" script modules to "Management::Controller" and "Management::Agent", respectively. This allows us to anchor tooling common to both controller and agent at the "Management" module. - It moves common configuration settings, logging, requests, types, and utilities to the common "Management" module. - It removes the explicit "::Types" submodule (so a request/response result is now a Management::Result, not a Management::Types::Result), which makes typenames more readable. - It updates tests that depend on module naming and full set of scripts.
25 lines
517 B
Text
25 lines
517 B
Text
##! Utility functions for the Management framework, available to agent
|
|
##! and controller.
|
|
|
|
module Management::Util;
|
|
|
|
export {
|
|
## Renders a set of strings to an alphabetically sorted vector.
|
|
##
|
|
## ss: the string set to convert.
|
|
##
|
|
## Returns: the vector of all strings in ss.
|
|
global set_to_vector: function(ss: set[string]): vector of string;
|
|
}
|
|
|
|
function set_to_vector(ss: set[string]): vector of string
|
|
{
|
|
local res: vector of string;
|
|
|
|
for ( s in ss )
|
|
res[|res|] = s;
|
|
|
|
sort(res, strcmp);
|
|
|
|
return res;
|
|
}
|