Validating and commiting configuration changes via the CLI.
It takes a sequence of round-trip RPCs to actually get some configuration committed.
Decode the reply from a load request. Takes a message constructor.
Commit the configuration that was loaded via load.
Config.commit Commit
|> Channel.sendRpc { model | commitResult = Loading }Whether a commit should actually change the configuration, or merely validate.
Decode the reply from a commit request. Takes a message constructor.
Retrieve any failures from a commit (whether actually committed or merely validated).
Config.getFailures
|> Channel.sendRpc { model | getFailuresResult = Loading }Decode the reply from a getFailures request. Takes a message constructor.
Retrieve any configuration items which could not be validated.
Config.getUnvalidated
|> Channel.sendRpc { model | getUnvalidatedResult = Loading }Decode the reply from a getUnvalidated request. Takes a message constructor.
Start a config feature instance. This represents the option to configure one router. This is an async request - use the connection state notifications to track progress.
Decode an up/down notification requested by passing SubscribeToConState to start. Takes a message constructor.
The result of a getFailures request is just a blob of text (as provided by the router). You can parse this into a more structured form using the following function.
Parse the result of a getFailures request. If there is anything awkward about the inputs, just return the empty list.
A line of configuration that has failed, and the error string that prevented the configuration commit from succeeding.
Enter some CLI-expressed configuration into the router's target buffer.