launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28009
[Merge] ~cjwatson/launchpad:more-mirror-speeds into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:more-mirror-speeds into launchpad:master.
Commit message:
Add a couple of faster MirrorSpeed entries
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1946310 in Launchpad itself: "Can't set a bandwidth value on Mirrors over 20Gbps"
https://bugs.launchpad.net/launchpad/+bug/1946310
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/414500
The previous list hadn't been updated since 2007.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:more-mirror-speeds into launchpad:master.
diff --git a/lib/lp/registry/browser/distribution.py b/lib/lp/registry/browser/distribution.py
index 025e405..4f11395 100644
--- a/lib/lp/registry/browser/distribution.py
+++ b/lib/lp/registry/browser/distribution.py
@@ -1262,6 +1262,10 @@ class DistributionMirrorsView(LaunchpadView):
throughput += 10000000
elif mirror.speed == MirrorSpeed.S20G:
throughput += 20000000
+ elif mirror.speed == MirrorSpeed.S50G:
+ throughput += 50000000
+ elif mirror.speed == MirrorSpeed.S100G:
+ throughput += 100000000
else:
# need to be made aware of new values in
# interfaces/distributionmirror.py MirrorSpeed
diff --git a/lib/lp/registry/doc/distribution-mirror.txt b/lib/lp/registry/doc/distribution-mirror.txt
index 2c7cac5..232db03 100644
--- a/lib/lp/registry/doc/distribution-mirror.txt
+++ b/lib/lp/registry/doc/distribution-mirror.txt
@@ -893,7 +893,7 @@ the possible mirror speeds.
... a.speed = speed
... mirrors.append(a)
>>> print(view._sum_throughput(mirrors))
- 37 Gbps
+ 187 Gbps
Changing mirror owners
diff --git a/lib/lp/registry/interfaces/distributionmirror.py b/lib/lp/registry/interfaces/distributionmirror.py
index 55e7c13..0910046 100644
--- a/lib/lp/registry/interfaces/distributionmirror.py
+++ b/lib/lp/registry/interfaces/distributionmirror.py
@@ -167,6 +167,19 @@ class MirrorSpeed(DBEnumeratedType):
The upstream link of this mirror can make up to 20 gigabits per second.
""")
+ S50G = DBItem(130, """
+ 50 Gbps
+
+ The upstream link of this mirror can make up to 50 gigabits per second.
+ """)
+
+ S100G = DBItem(140, """
+ 100 Gbps
+
+ The upstream link of this mirror can make up to 100 gigabits per
+ second.
+ """)
+
class MirrorFreshness(DBEnumeratedType):
"""The freshness of a given mirror's content."""