Community discussions

MikroTik App
 
Gabool
just joined
Topic Author
Posts: 17
Joined: Fri Nov 11, 2016 5:24 am

Editing Interface Entry,

Mon Aug 07, 2017 12:35 am

So I am using the Python3 tikapy for the api, and I want to edit something based off the results I get.
So I write interface/print, I get back a bunch of data I parse it then want it to send back an edit for the comment,
how would I go about using the id to edit a vlan to have the comment room404?
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Editing Interface Entry,

Mon Aug 07, 2017 1:37 am

In terms of protocol flow:
/interface/set
=numbers=*01
=comment=room404
(replace *01 with the actual ID you get from the print)
 
Gabool
just joined
Topic Author
Posts: 17
Joined: Fri Nov 11, 2016 5:24 am

Re: Editing Interface Entry,

Mon Aug 07, 2017 7:42 am

Thank you,
Now that I have that we are trying to set the dhcp-server lease to static we tried this
client.talk(['/ip/dhcp-server/lease/set', '=.id=*1A1', '=dynamic=false' ])

Are we going about it the wrong? Also tried no.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Editing Interface Entry,

Mon Aug 07, 2017 2:48 pm

There's a separate command called "make-static". e.g.
client.talk(['/ip/dhcp-server/lease/make-static, '=numbers=*1A1'])

Who is online

Users browsing this forum: No registered users and 28 guests