Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2166)

Unified Diff: scripts/master/slaves_list.py

Issue 12300004: Build scripts refactor to support multislave (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/master/master_utils.py ('k') | scripts/slave/bootstrap.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/slaves_list.py
diff --git a/scripts/master/slaves_list.py b/scripts/master/slaves_list.py
index ea30fc5daf84509b205f7389d09a90e26d2a082e..412909754e6c12153c02f4923d33747ec7eeeb10 100755
--- a/scripts/master/slaves_list.py
+++ b/scripts/master/slaves_list.py
@@ -11,13 +11,6 @@ from common import chromium_utils
START_WITH_LETTER, NUMBER_ONLY = range(2)
-def EntryToSlaveName(entry):
- """Extracts the buildbot slave name from the slaves list entry.
-
- The slave list entry is a dict."""
- return entry.get('slavename', None) or entry.get('hostname', None)
-
-
def EntryToHostName(entry):
"""Extracts the buildbot host name from the slaves list entry.
@@ -82,7 +75,8 @@ class BaseSlavesList(object):
def __init__(self, slaves, default_master=None):
self.slaves = slaves
self.default_master = default_master
- _CheckDupes([EntryToSlaveName(x).lower() for x in self.slaves])
+ _CheckDupes(
+ [chromium_utils.EntryToSlaveName(x).lower() for x in self.slaves])
def GetSlaves(self, master=None, builder=None, os=None, tester=None,
bits=None, version=None):
@@ -112,14 +106,14 @@ class BaseSlavesList(object):
bits=None, version=None):
"""Similar to GetSlaves() except that it only returns the slave names."""
return [
- EntryToSlaveName(e)
+ chromium_utils.EntryToSlaveName(e)
for e in self.GetSlaves(master, builder, os, tester, bits, version)
]
def GetSlaveName(self, master=None, builder=None, os=None, tester=None,
bits=None, version=None):
"""Similar to GetSlave() except that it only returns the slave name."""
- return EntryToSlaveName(
+ return chromium_utils.EntryToSlaveName(
self.GetSlave(master, builder, os, tester, bits, version))
def GetHostName(self, master=None, builder=None, os=None, tester=None,
« no previous file with comments | « scripts/master/master_utils.py ('k') | scripts/slave/bootstrap.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698