Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.
This repository was 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

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions