Commit a1931c6b authored by juga's avatar juga
Browse files

Add doc for v3bw clasess

also complete classes docstring
parent 516af314
......@@ -36,6 +36,13 @@ sbws.lib.resultdump module
sbws.lib.v3bwfile module
.. automodule:: sbws.lib.v3bwfile
Module contents
......@@ -104,6 +104,7 @@ class V3BwHeader(object):
:param str software: the name of the software that generates this
:param str software_version: the version of the software
:param dict kwargs: extra headers. Currently supported:
- earliest_bandwidth: str, ISO 8601 timestamp in UTC time zone
when the first bandwidth was obtained
- generator_started: str, ISO 8601 timestamp in UTC time zone
......@@ -231,11 +232,13 @@ class V3BwHeader(object):
class V3BWLine(object):
def __init__(self, node_id, bw, **kwargs):
Create a Bandwidth List line following the spec version 1.1.0.
:param str node_id:
:param int bw:
Currently accepted KeyValues:
:param dict kwargs: extra headers. Currently supported:
- nickname, str
- master_key_ed25519, str
- rtt, int
......@@ -245,6 +248,7 @@ class V3BWLine(object):
- error_circ, int
- error_misc, int
def __init__(self, node_id, bw, **kwargs):
assert isinstance(node_id, str)
assert isinstance(bw, int)
self.node_id = node_id
......@@ -335,11 +339,13 @@ class V3BWLine(object):
class V3BwFile(object):
def __init__(self, v3bwheader, v3bwlines):
:param V3BWHeader v3bwheader:
:param list v3bwlines:
Create a Bandwidth List file following spec version 1.1.0
:param V3BWHeader v3bwheader: header
:param list v3bwlines: V3BWLines
def __init__(self, v3bwheader, v3bwlines):
self.header = v3bwheader
self.bw_lines = v3bwlines
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment