-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFR] Added latency DA #37
base: master
Are you sure you want to change the base?
Conversation
cmd_add = "tc qdisc add dev eth0 root netem delay" | ||
cmd_del = "tc qdisc del dev eth0 root netem delay" | ||
result = await self.run_client(cmd_add) | ||
wait = self.action.wait if self.action.wait else 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an use case for getattr. Also, I thank that the default wait time (10) should be either configurable or better expose. At least put it to coroutine docstring pls.
if result: | ||
rollback = await self.run_client(cmd_del) | ||
if not rollback: | ||
logger.info("Rollback was not successful") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not this be logger as a warning? Maybe ever error?
result (bool): True if successful, False otherwise | ||
""" | ||
cmd_add = "tc qdisc add dev eth0 root netem delay" | ||
cmd_del = "tc qdisc del dev eth0 root netem delay" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device eth0 should be configurable
#36