This repository has been archived by the owner on Nov 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Getting Started
Łukasz Kostka edited this page Sep 23, 2015
·
9 revisions
This program has a master, slave device concept. Configuration is replicated from master to device. A master device is a static configuration file, slave device is a remote MikroTik device.
In this file (json UTF-8 encoded), you specify what will be replicated.
{
"paths":[
{
"path":"/ip/address",
"strategy":"ensure",
"rules":[
{"interface":"ether1", "disabled":false, "address":"10.0.0.1/24"},
{"interface":"ether1", "disabled":false, "address":"10.0.2.1/24"}
]
},
{
"path":"/queue/simple",
"strategy":"exact",
"rules":[
{"name":"test_client", "max-limit":"50000000/50000000"}
]
},
{
"path":"/system/ntp/client",
"strategy":"exact",
"rules":[
{"primary-ntp":"213.222.193.35", "secondary-ntp":"193.0.71.133", "enabled":true}
]
}
]
}
Each path is represented in a form similar to a directory structure in unix. In every path object you must specify a strategy. MikroTik sometimes represents some values in a different way than that read from console or winbox. For example in /queue/simple
specifying max-limit=50M/50M
via console results in max-limit=50000000/50000000
visable via API. Running program in verbose mode will print out helpful debugging information.
If you want to remove everything in a specific path use:
{
"path":"/queue/simple",
"strategy":"exact",
"rules":[]
}