[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at 3d6c90f34a0c1823c949e0ff1138098115b86e22

Scott Seago sseago at redhat.com
Thu Jun 7 17:02:11 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  3d6c90f34a0c1823c949e0ff1138098115b86e22 (commit)
      from  617bf7096444bd9c32c5eb6faa97f4b3a01c7d00 (commit)

- Log -----------------------------------------------------------------
commit 3d6c90f34a0c1823c949e0ff1138098115b86e22
Author: Scott Seago <sseago at redhat.com>
Date:   Thu Jun 7 12:54:58 2007 -0400

    upgrade for initial version should include the dummy (-1) rows and fedora
    user
-----------------------------------------------------------------------

Diffstat:
 service/db/schema/upgrade/0001.py |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/service/db/schema/upgrade/0001.py b/service/db/schema/upgrade/0001.py
index 6641c38..7aeab59 100644
--- a/service/db/schema/upgrade/0001.py
+++ b/service/db/schema/upgrade/0001.py
@@ -158,10 +158,32 @@ tables.append(Table('events', meta,
     useexisting=True,
 ))
 
+#
+# provides a static dictionary of tables.
+#
+table = dict([(t.name, t) for t in tables])
+
+def initial_inserts():
+    table['users'].insert().execute({'username':'admin', 'password':'fedora',
+                                     'first':'', 'last':'',
+                                     'description':'default admin account',
+                                     'email':'root at localhost'},
+                                    {'id':-1,'username':'system', 'password':'locked',
+                                     'first':'?', 'last':'?',
+                                     'description':'system account', 'email':'?'})
+    table['distributions'].insert().execute(id = -1, name = '*Unassigned*')
+    table['profiles'].insert().execute(id = -1, name = '*Unassigned*', version = '0.00',
+                                       distribution_id = -1)
+    table['machines'].insert().execute(id = -1, name = '*Unassigned*', profile_id = -1)
+    table['regtokens'].insert().execute(id = -1, profile_id = -1)
+    table['deployments'].insert().execute(id = -1, hostname = '*Unassigned*',
+                                          display_name = '*Unassigned*',
+                                          profile_id = -1, machine_id = -1)
+        
 def upgrade():
     for t in tables:
         t.create(checkfirst=True)
-    
+    initial_inserts()
 
 def downgrade():
     mylist = list(tables)

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  617bf7096444bd9c32c5eb6faa97f4b3a01c7d00 \
  3d6c90f34a0c1823c949e0ff1138098115b86e22




More information about the Et-mgmt-commits-list mailing list