Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

[RFR] Added latency DA #37

wants to merge 4 commits into from

Conversation

grafuls
Copy link
Owner

@grafuls grafuls commented Jul 1, 2018

#36

@grafuls grafuls added the enhancement New feature or request label Jul 1, 2018
@grafuls grafuls added this to the P1 milestone Jul 1, 2018
@grafuls grafuls self-assigned this Jul 1, 2018
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
Copy link
Collaborator

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")
Copy link
Collaborator

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"
Copy link
Collaborator

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

@grafuls grafuls changed the title Added latency DA [RFR] Added latency DA Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants