No longer force user_ at start of machine name on machine creation.
authorEric Price <ecprice@mit.edu>
Wed, 10 Oct 2007 02:19:05 +0000 (22:19 -0400)
committerEric Price <ecprice@mit.edu>
Wed, 10 Oct 2007 02:19:05 +0000 (22:19 -0400)
Modify already doesn't enforce this.

People seem to prefer this convention, and we used transactions to
create and modify machines, so we don't think there are likely to be
problems.  It should result in nicer hostnames.

(tabbott ghosting as ecprice again)

svn path=/trunk/web/; revision=162

templates/list.tmpl
templates/main.py

index a27fe0b..e300f61 100644 (file)
@@ -71,7 +71,7 @@ $has_vnc[$machine]
       <table>
        <tr>
          <td>Name</td>
-         <td>${user.username}_<input type="text" name="name" value=""/></td>
+         <td><input type="text" name="name" value=""/></td>
        </tr>
        <tr>
          <td>Memory</td>
index e5dae26..36ea239 100755 (executable)
@@ -353,7 +353,7 @@ def create(user, fields):
     name = fields.getfirst('name')
     if not validMachineName(name):
         raise InvalidInput('name', name)
-    name = user.username + '_' + name.lower()
+    name = name.lower()
 
     if Machine.get_by(name=name):
         raise InvalidInput('name', name,