Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

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

@praveenasb
Copy link

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()

cdm-work pushed a commit to cdm-work/ostinato that referenced this issue Dec 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant