source/sysconf.tcl
| Procedure Summary |
authmode { sid op {mode {}} }Operations on Authmodes. |
compute_fa { name NO node }Get a Finate Automaton (::grammar::fa) from embedded specifications. |
confmode { sid op {mode {}} }Operations on Confmodes Supported: init, set, get, parent, list, exists, getstring, setstring, exit, |
execute { sid cmdline }This command attempts to find if a given command is a mikroconf command and if so, it executes |
inuse { name }Check if a module is in use by some session (user or background or remote), or |
isArgFinal { NO node argList prefix count types values names startstate finalstates curstate prevFinal }When the cursor is placed on an argument, find whether the command line up and including the word where the cursor is placed, can be executed as it |
isCmdFinal { NO node }When the cursor is placed on a path or command, find whether the command line up and including the word where the cursor is placed, can be executed as it |
loadConf { {text {}} }Apply Startup Config, resulting in Running Config == Startup Config. |
loadspecs { filepath }Load command specifications from an XML file into the internal data representation. |
match { sid options cmdline wordIndex }It looks for MikroConf commands and arguments that can be placed in the word that the cursor is pointing at, and have as prefix the existing word part. |
nextState { NO node curstate symbol }Returns the state of the automaton after consuming $symbol from |
print { {arguments {}} {query {}} }Return the running configuration as XML, or a subparts of it, depetermined by a XPath |
remove { name }Remove all command specifications associated with a module |
runningConf { {parent root} }Generate the Running |
saveConf { }Write Running Config to Startup Config |
startupConf { }Retrieve Startup |
| Procedure Detail |
proc authmode { sid op {mode {}} }
sid - Session Id.
op - Operation.
mode - The authentication mode name or string, depending on the operation.
@error
proc compute_fa { name NO node }
name - Command name.
NO - Set if looking for the finate automaton that describes the negative form of the command.
node - The DOM node of the command.
proc confmode { sid op {mode {}} }
sid - Session Id.
op - Operation.
mode - The configuration mode name or string, depending on the operation.
@error
proc execute { sid cmdline }
command - The command name and arguments to execute.
proc inuse { name }
proc isArgFinal { NO node argList prefix count types values names startstate finalstates curstate prevFinal }
NO - Boolean. Whether we have a negation command or not.
node - The node of the command the argument belongs to.
argList - List of arguments that match with the prefix: {type name values} ....
prefix - The prefix of the word the cursor is placed.
count - The number of matching arguments (or valid arguments).
types - The types of all valid arguments concatenated.
values - The matching values of all valid arguments concatenated.
names - The names of all valid arguments concatenated.
startstate - The name of the start state of the automaton.
finalstates - The names of final states of the automaton.
curstate - The name of the current state.
prevFinal - Whether the previous word was a command (-1), a final state (1) or else (0).
proc isCmdFinal { NO node }
NO - Boolean. Whether we have a negation command or not.
node - The command node in the DOM tree.
proc loadConf { {text {}} }
text - Configuration text to apply. If not provided then the startup-config is applied.
@error
proc loadspecs { filepath }
filepath - The source file itself.
@error
proc match { sid options cmdline wordIndex }
sid - Session Id.
options - A combination of: "-count", "-names", "-values", "-help", "-final"
cmdline - The command line string to operate on.
wordIndex - The word index the cursor is pointing at in the cmdline list.
proc nextState { NO node curstate symbol }
NO - Boolean. Whether we have a negation command or not.
node - The node of the command the argument belongs to.
curstate - The name of the current state.
symbol - The symbol to consume.
proc print { {arguments {}} {query {}} }
arguments - The arguments accepted by the 'asXML' sub-command of domDoc/domNode.
query - XPath query to determine the nodes whose subtrees will be concatanated and printed.
proc remove { name }
name - The module name.
proc runningConf { {parent root} }
parent - The mainconf section to generate the running configuration for.
proc saveConf { }
proc startupConf { }