Code Monkey home page Code Monkey logo

mcm's Introduction

Build Status

This is beta version

This software is still under developement. Things may change. There are still some command path specifications missing. If you see an error Could not find path specification for ..., please contact author or create an issue with exact error message.

Mikrotik Configuration Manager

MCM is a radically simple automation system. It handles configuration management and multiple devices orchestration. For more information read this.

Requirements

  • python3
  • All config files must be utf-8 encoded

Usage

./mcm.py -u USERNAME IP_ADDRESS CONFIG_FILE

By default program will issue a password prompt. If you don't want that, store it in MCM_HOST_PASSWORD environment variable.

For more help run ./mcm.py --help

mcm's People

Contributors

luqasz avatar requires avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mcm's Issues

add attributes to config file

attributes such as:
for witch version of software specified rule will apply.
what to do with rules that are not present in config file but are on mikrotik (propositions: disable existing, remove existing, do nothing)
what to do with newly added rules. (mark them as disabled or enabled ?)

Menu types and their properties

Mikrotik has various menu level types:

  • unordered with unique key value (/queue/simple value of 'name')
  • unordered with duplicates (/ip/firewall/address-list)
  • ordered without unique key value (/ip/firewall/filter, /routing/filter)
  • single (/system/ntp/client)
  • may depend on packages (dhcp-server,dhcp-client depends on dhcp package)

Properties:

  • some have default entries (best would be to disable them if possible)
  • some entries are not removable (with default flag, but not necesary)
  • some menus have dynamic entries. those will not be managed
  • various modification order (ADD,DELETE,SET)
  • attribute values may change in routeros releases (/user/group policy=api only in versions 5.x and above)
  • some attribute values may be split in order to ease comparison (/user/group policy= split by ',')
  • some may need aditional arguments to 'print' (/interface/wireless needs advanced=true to get all attributes)

To check:

  • entries that are not default and can not be removed. (/user/group ?)
  • entries that are default and can not be disabled (/routing/bfd/interface interface=all)

Add dry-run

Provide a dry-run option per program execution (not host). This will only display what may be done (add,set,del), without any modification on a remote device.

ASCII encoding in API

API (and telnet/ssh) only accepts ASCII characters. Program should break configuration run when receiving/sending non ASCII characters.

Validate strategy in config file.

Before program runs, validate strategy for command paths.

  • single may only have exact
  • unique may have one of exact,ensure
  • ordered may only have one of exact,ensure

This will prevent errors when user provided wrong strategy.

change yes/no = true/false

this is specific in mikrotik.
if you specify enabled=true/yes it will work. for comparision use true/false not yes/no. yes/no couses mcm to set for example enabled=yes even when there already is enabled=true

in short true if not the same as yes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.