ensoft/entrance/1.0.1

NOTE: the latest version is 1.0.5

EnTrance.Feature.Target.Netconf

Invoke Netconf operations.

This module presents two APIs, and you can pick whichever suits your app the best:

Functionality is identical across these two API options. Also, the decoder for reply notifications is decodeRequest either way.

Notifications are of type netconf and have a String success type.

Standalone API

get : String -> Request

Standalone Netconf get

getConfig : String -> Request

Standalone Netconf get config

editConfig : String -> Request

Standalone Netconf edit config

Standalone Netconf validate

Standalone Netconf commit

Data type API

type Op
= Get String
| GetConfig String
| EditConfig String
| Validate
| Commit

All possible Netconf operations.

Encode a Netconf Request

decodeRequest : (RpcData String -> msg) -> Decoder msg

Decode the reply from any Netconf operation. This always has String type, but for some operations, the success/failure bit is really all that's being communicated and the string will be empty. Takes a message constructor.

Feature start/stop

Start a Netconf feature instance. This represents the option to connect to one router. This is an async request - use the connection state notifications to track progress.

Stop a Netconf feature instance. This is an async request.

decodeIsUp : (Bool -> msg) -> Decoder msg

Decode an up/down notification requested by passing SubscribeToConState to start. Takes a message constructor.