luqasz / librouteros

Python implementation of MikroTik RouterOS API
GNU General Public License v2.0
224 stars 50 forks source link

Arbitrary command implementation #117

Closed NikolayDachev closed 4 years ago

NikolayDachev commented 4 years ago

I'm working on ansible module for routeros api, so far everything work as expected however I have specific question about arbitrary command

If is used for path like /system script run number=0 is ok however I'm not sure how to implement it for situation like /ip service disable telent which lead to

script = api.path('ip', 'service')
tuple(script('disable', **{'telent': ???????}))

let me know if I did not explain my question well

luqasz commented 4 years ago
tuple(script('disable', name=telnet))

MikroTik always has a key value pair.

ip service print detail (or any other print with detail) reveals this "secret"