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

Python-Binding: Python Script created for a stream containing Variable field is not woking #158

Closed
praveenasb opened this Issue Sep 30, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@praveenasb

Describe -

  1. What is the problem ?
    Python Script created for a stream containing Variable field is not woking
  2. What is your use case?
    Wanted to vary the TCP src/dst port using the "Variable Fields" feature supported.
  3. What steps will reproduce the problem?
    a)Create any stream containing and use the "Variable Fields" feature to modify desired field
    b) Save stream as Pythons Script
    c) Execute the Python Script
  1. what is the Error observed?
    $>./Tcp_Stream_varying_tcp_port.py
    Traceback (most recent call last):
    File "./Tcp_Stream_varying_tcp_port.py", line 17, in
    from ostinato.protocols.protocol_pb2 import VariableField, variable_field
    ImportError: cannot import name variable_field

  2. What is the proposed enhancement/feature to solve the problem?
    Save as python script feature needs to be enhanced to handle stream containing variable field

6). Any other relevant details
Workaround Suggested by Srivats:
a)Manually remove variable_field from the below line
from ostinato.protocols.protocol_pb2 import VariableField, variable_field
b) Replace the line
variable_field = p.Extensions[variable_field].add()
with
variable_field = p.variable_field.add()

@pstavirs pstavirs closed this in 7f224f6 Oct 2, 2015

cdm-work pushed a commit to cdm-work/ostinato that referenced this issue Dec 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment