ostinato.protocols.svlan_pb2 module

To add and configure Svlan in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kSvlanFieldNumber and access the Svlan object from the Protocol object's Extensions dictionary using the key svlan_pb2.svlan

from ostinato.protocols import svlan_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kSvlanFieldNumber
my_svlan = proto.Extensions[svlan_pb2.svlan]

You can then set Svlan attributes using my_svlan.<attribute>

results matching ""

    No results matching ""