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

Is there a more compact way to start() traffic? #67

Open
chrispsommers opened this issue May 12, 2021 · 0 comments
Open

Is there a more compact way to start() traffic? #67

chrispsommers opened this issue May 12, 2021 · 0 comments

Comments

@chrispsommers
Copy link

In this section: https://github.com/open-traffic-generator/athena/blob/dev-mon-ist/docs/hello-snappi.md#start-traffic
you show this snippet:

# start transmitting configured flows
ts = api.transmit_state()
ts.state = ts.START
api.set_transmit_state(ts)

This is a lot of lines of code to start the traffic. Is there a more compact way? For example:

api.set_transmit_state(api.transmit_state(ts.START))

This is still pedantic. How about something even easier, e.g.

api.transmit_state.start()

The same comment goes for stopping traffic, and starting capture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant