ostinato.protocols.stp_pb2 module¶
Setup STP in Ostinato for network testing. Access and adjust STP attributes via the provided API to manage network loop prevention
To add and configure Stp in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kStpFieldNumber
and access the Stp object from the Protocol object's Extensions
dictionary using the key stp_pb2.stp
from ostinato.protocols import stp_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kStpFieldNumber
my_stp = proto.Extensions[stp_pb2.stp]
my_stp.<attribute>
Stp class¶
Class attributes¶
protocol_id¶
Stp.protocol_id : long
protocol_version_id¶
Stp.protocol_version_id : long
bpdu_type¶
Stp.bpdu_type : long
flags¶
Stp.flags : long
root_id¶
Stp.root_id : long
root_path_cost¶
Stp.root_path_cost : long
bridge_id¶
Stp.bridge_id : long
port_id¶
Stp.port_id : long
message_age¶
Stp.message_age : long
max_age¶
Stp.max_age : long
hello_time¶
Stp.hello_time : long
forward_delay¶
Stp.forward_delay : long