RIPE-NCC / ripe-atlas-cousteau

Python client for RIPE ATLAS API
GNU General Public License v3.0
65 stars 26 forks source link

modified to add packets count for traceroute #38

Closed antranigv closed 8 years ago

antranigv commented 8 years ago

hi! during my research I needed to specify the packets count, so made little fast changes, hope its right! thanks!

astrikos commented 8 years ago

Hi @antranigv . Thanks for the contribution. You can specify packets without these changes.

traceroute = Traceroute(
    af=4,
    target="www.ripe.net",
    description="testing",
    protocol="ICMP",
    packets=13
)

The above should specify packets for you and send it as specification to the server. For the metadata you can have:

measurement = Measurement(id=1000002)
print(measurement.meta_data.get("packets"))

BTW, your change for packets on the creation part would make packets option required when creating a traceroute, which is wrong. You don't have to specify packets, instead a default value of 3 will be used on the server side.

antranigv commented 8 years ago

Hey! Yes, I noticed my not-so-good changes after the commit :) thanks! :+1: