changeset 463:977a6c122205

Make slave names available for use in target platform rules, and added some documentation to the admin panel. Closes #190.
author cmlenz
date Mon, 24 Sep 2007 15:30:29 +0000
parents 8d7091819913
children 894b0b0721da
files bitten/build/config.py bitten/htdocs/admin.css bitten/master.py bitten/templates/bitten_admin_configs.cs
diffstat 4 files changed, 29 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/build/config.py
+++ b/bitten/build/config.py
@@ -49,7 +49,7 @@
 
     def _merge_sysinfo(self, parser, properties):
         """Merge the platform information properties into the configuration."""
-        system, node, release, version, machine, processor = platform.uname()
+        system, _, release, version, machine, processor = platform.uname()
         system, release, version = platform.system_alias(system, release,
                                                          version)
         self.properties['machine'] = machine
--- a/bitten/htdocs/admin.css
+++ b/bitten/htdocs/admin.css
@@ -1,3 +1,6 @@
 table.form th { text-align: right; }
 div.platforms h3 { margin-top: 3em; }
 table#platformlist td ul { list-style: none; margin: 0; padding: 0; }
+
+dl.help { color: #666; font-size: 90%; margin: 1em .5em; }
+dl.help dt { font-weight: bold; }
--- a/bitten/master.py
+++ b/bitten/master.py
@@ -99,7 +99,7 @@
             raise HTTPBadRequest('XML parser error')
 
         slavename = elem.attr['name']
-        properties = {Build.IP_ADDRESS: req.remote_addr}
+        properties = {'name': slavename, Build.IP_ADDRESS: req.remote_addr}
         self.log.info('Build slave %r connected from %s', slavename,
                       req.remote_addr)
 
--- a/bitten/templates/bitten_admin_configs.cs
+++ b/bitten/templates/bitten_admin_configs.cs
@@ -21,7 +21,7 @@
    </fieldset></td>
   </tr><tr>
    <td colspan="2"><fieldset class="iefix">
-    <label for="recipe">Recipe</label>
+    <label for="recipe">Recipe:</label>
     <p><textarea id="recipe" name="recipe" rows="8" cols="78"><?cs
      var:admin.config.recipe ?></textarea></p>
    </fieldset></td>
@@ -93,6 +93,29 @@
     </tr><?cs /each ?>
    </tbody></table>
   </fieldset>
+  <p class="help">
+   The property name can be any of a set of standard default properties, or
+   custom properties defined in slave configuration files. The default
+   properties are:
+  </p>
+  <dl class="help">
+   <dt><code>os<code>:</dt>
+   <dd>The name of the operating system (for example "Darwin")</dd>
+   <dt><code>family<code>:</dt>
+   <dd>The type of operating system (for example "posix" or "nt")</dd>
+   <dt><code>version<code>:</dt>
+   <dd>The operating system version (for example "8.10.1)</dd>
+   <dt><code>machine<code>:</dt>
+   <dd>The hardware architecture (for example "i386")</dd>
+   <dt><code>processor<code>:</dt>
+   <dd>The CPU model (for example "i386", this may be empty or the same as for
+     <code>machine</code>)</dd>
+   <dt><code>name<code>:</dt>
+   <dd>The name of the slave</dd>
+   <dt><code>ipnr<code>:</dt>
+   <dd>The IP address of the slave</dd>
+  </dl>
+  <p class="help">The match pattern is a regular expression.</p>
   <div class="buttons">
    <form method="get" action=""><div>
     <input type="hidden" name="<?cs
Copyright (C) 2012-2017 Edgewall Software