ostinato.protocols.mld_pb2 module

To add and configure Mld in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kMldFieldNumber and access the Mld object from the Protocol object's Extensions dictionary using the key mld_pb2.mld

from ostinato.protocols import mld_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kMldFieldNumber
my_mld = proto.Extensions[mld_pb2.mld]

You can then set Mld attributes using my_mld.<attribute>

results matching ""

    No results matching ""