Make it easier to have deployment-specific db-config additions.
[myplc.git] / db-config
index 823fd50..f664044 100755 (executable)
--- a/db-config
+++ b/db-config
@@ -523,10 +523,9 @@ def main():
          'min_role_id': 10},
 
         # Delegation
-        {'tagname': "delegations",
-         'description': "Coma seperated list of slices to give delegation authority to.",
-         'category' : 'slice/rspec',
-         'min_role_id': 10}
+        {'name': "delegations",
+         'description': "Comma-seperated list of slices to give delegation authority to.",
+         'min_role_id': 10},
 
         ]
 
@@ -1038,6 +1037,19 @@ message, please reply so that we may investigate the problem.
             for ptype in protocol_types:
                 AddPCUProtocolType(id, ptype)
 
+    # Run local db-config snippets
+    try:
+        dir = "/etc/planetlab/db-config.d"
+        files = os.listdir(dir)
+        for file in files:
+            if (file.endswith(".bak") or file.endswith("~") or
+                file.endswith(".rpmsave") or file.endswith(".rpmnew") or
+                file.endswith(".orig")):
+                continue
+            execfile(os.path.join(dir, file))
+    except:
+        pass
+
 
 if __name__ == '__main__':
     main()