Community discussions

MikroTik App
 
Megy
just joined
Topic Author
Posts: 22
Joined: Mon Feb 07, 2005 11:27 pm

another API bug, queue parent unknown!!!!!!!!!

Sun Jul 08, 2007 6:14 pm

Hi, found another bug, the API looks like a piece of crap,
or documentation not susficient.

I have a main queue in tree, name GLOBAL-OUT
when adding another queue to this by following command,
it appears in queue list, in API, it has correct name, but in
winbox, parent box shows: "unknown" and it's not working too

/queue/tree/add
=name=out925
=parent=GLOBAL-OUT
=packet-mark=out925
=limit-a=256000
=max-limit=2048000
=priority=5

response from getall

!re
=.id=*1000033
=disabled=no
=invalid=no
=name=out925
=parent=GLOBAL-OUT
=packet-mark=out925
=limit-at=256000
=queue=default
=priority=5
=max-limit=2048000
=burst-limit=0
=burst-threshold=0
=burst-time=0s

You should fix it ASAP. Development using this crappy API is impossible.
 
norg
just joined
Posts: 6
Joined: Sat Jan 17, 2009 2:16 pm

Re: another API bug, queue parent unknown!!!!!!!!!

Sun Jan 25, 2009 4:18 am

i have similar problem with php API
when I run this
  if (mklogin_clientgate($API)) {

	    $API->write('/queue/tree/add', false);
      $API->write('=name=user'.$csmlouva.$cpripbodu.'_d', false);
      $API->write('=parent=zakaznici', false);
      $API->write('=max-limit='.$pbethdown.'000', false);
	    $API->write('=packet-mark=1'.$csmlouva.$cpripbodu);
    
	    $API->write('/queue/tree/add', false);
      $API->write('=name=user'.$csmlouva.$cpripbodu.'_u', false);
      $API->write('=parent=servers', false);
      $API->write('=max-limit='.$pbethup.'000', false);
	    $API->write('=packet-mark=2'.$csmlouva.$cpripbodu);

      $vystup=serialize($API->read());   
      $API->disconnect();  
  } 
only the first queue is added
from debug I got
Connection attempt #1 to 80.250.30.15:8728... <<< [6] /login >>> [5, 39] !done >>> [37, 1] =ret=b1abd2c484ddb08942eaf004505d588e <<< [6] /login <<< [11] =name=admin <<< [44] =response=004d1b47e38668901ac14902cc62c5372b >>> [5, 1] !done Connected... <<< [15] /queue/tree/add <<< [17] =name=user00022_d <<< [17] =parent=zakaznici <<< [17] =max-limit=256000 <<< [19] =packet-mark=100022 <<< [15] /queue/tree/add <<< [17] =name=user00022_u <<< [15] =parent=servers <<< [17] =max-limit=256000 <<< [19] =packet-mark=200022 >>> [5, 119] !trap >>> [11, 107] =category=1 >>> [49, 57] =message=input does not match any value of parent >>> [5, 50] !trap >>> [20, 29] =message=interrupted >>> [5, 22] !done >>> [5, 15] !done Disconnected..
when I put between that two add
usleep(100000);	
the answer from api is correct like:
Connection attempt #1 to 80.250.30.15:8728... <<< [6] /login >>> [5, 39] !done >>> [37, 1] =ret=cc1a04795eb9bdfc90653b12a9404178 <<< [6] /login <<< [11] =name=admin <<< [44] =response=0004ca54dea520060c3a3d834e21b15efd >>> [5, 1] !done Connected... <<< [15] /queue/tree/add <<< [17] =name=user00022_d <<< [17] =parent=zakaznici <<< [17] =max-limit=256000 <<< [19] =packet-mark=100022 <<< [15] /queue/tree/add <<< [17] =name=user00022_u <<< [15] =parent=servers <<< [17] =max-limit=256000 <<< [19] =packet-mark=200022 >>> [5, 15] !doneDisconnected... 
but only the first queue is added

Who is online

Users browsing this forum: FurfangosFrigyes, GoogleOther [Bot], ianiovski and 175 guests