ostinato.protocols.stp_pb2 module¶
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]
You can then set Stp attributes using my_stp.<attribute>
Stp class¶
Class attributes¶
protocol_id¶
Stp.protocol_id : long
Optional. If not set, defaults to 0.
protocol_version_id¶
Stp.protocol_version_id : long
Optional. If not set, defaults to 0.
bpdu_type¶
Stp.bpdu_type : long
Optional. If not set, defaults to 0.
flags¶
Stp.flags : long
Optional. If not set, defaults to 0.
root_id¶
Stp.root_id : long
Optional. If not set, defaults to 0.
root_path_cost¶
Stp.root_path_cost : long
Optional. If not set, defaults to 0.
bridge_id¶
Stp.bridge_id : long
Optional. If not set, defaults to 0.
port_id¶
Stp.port_id : long
Optional. If not set, defaults to 0.
message_age¶
Stp.message_age : long
Optional. If not set, defaults to 0.
max_age¶
Stp.max_age : long
Optional. If not set, defaults to 0.
hello_time¶
Stp.hello_time : long
Optional. If not set, defaults to 0.
forward_delay¶
Stp.forward_delay : long
Optional. If not set, defaults to 0.