add an entry for the monitor server. this value will be needed at the nodes.
[myplc.git] / db-config
index aa76bb0..376019b 100755 (executable)
--- a/db-config
+++ b/db-config
@@ -12,6 +12,7 @@
 
 from plc_config import PLCConfiguration
 import sys
+import resource
 
 def main():
     cfg = PLCConfiguration()
@@ -240,7 +241,7 @@ def main():
          'category' : 'slice/rspec',
          'min_role_id': 10},
 
-               # Vsys
+        # Vsys
         {'tagname': "vsys",
          'description': "Bind vsys script fd's to a slice's vsys directory.",
          'category' : 'slice/rspec',
@@ -254,6 +255,20 @@ def main():
 
         ]
 
+    # add in the platform supported rlimits to the default_attribute_types
+    for entry in resource.__dict__.keys():
+        if entry.find("RLIMIT_")==0:
+            rlim = entry[len("RLIMIT_"):]
+            rlim = rlim.lower()
+            for ty in ("min","soft","hard"):
+                attribute = {
+                    'tagname': "%s_%s"%(rlim,ty),
+                    'description': "Per sliver RLIMIT %s_%s."%(rlim,ty),
+                    'category': 'slice/limit',
+                    'min_role_id': 40 #admin
+                    }
+                default_attribute_types.append(attribute)
+
     # Get list of existing tag types
     known_tag_types = [tag_type['tagname'] for tag_type in GetTagTypes()]
 
@@ -357,16 +372,27 @@ def main():
 
         # YUM configuration
         {'enabled': True,
-         'source': 'PlanetLabConf/yum.conf.php?gpgcheck=1',
+         'source': 'yum/myplc.repo.php?gpgcheck=1',
+         'dest': '/etc/yum.myplc.d/myplc.repo',
+         'file_permissions': '644', 'file_owner': 'root', 'file_group': 'root',
+         'preinstall_cmd': '', 'postinstall_cmd': '', 'error_cmd': '',
+         'ignore_cmd_errors': False,
+         'always_update': False},
+        {'enabled': True,
+         'source': 'yum/yum.conf',
          'dest': '/etc/yum.conf',
-         'file_permissions': '644',
-         'file_owner': 'root',
-         'file_group': 'root',
-         'preinstall_cmd': '',
-         'postinstall_cmd': '',
-         'error_cmd': '',
+         'file_permissions': '644', 'file_owner': 'root', 'file_group': 'root',
+         'preinstall_cmd': '', 'postinstall_cmd': '', 'error_cmd': '',
          'ignore_cmd_errors': False,
          'always_update': False},
+        {'enabled': True,
+         'source': 'yum/stock.repo',
+         'dest': '/etc/yum.myplc.d/stock.repo',
+         'file_permissions': '644', 'file_owner': 'root', 'file_group': 'root',
+         'preinstall_cmd': '', 'postinstall_cmd': '', 'error_cmd': '',
+         'ignore_cmd_errors': False,
+         'always_update': False},
+
         {'enabled': True,
          'source': 'PlanetLabConf/delete-rpm-list-production',
          'dest': '/etc/planetlab/delete-rpm-list',
@@ -660,11 +686,11 @@ def main():
         if slice['slice_attribute_ids']:
             # Delete unknown attributes
             for slice_attribute in GetSliceAttributes(slice['slice_attribute_ids']):
-                if (slice_attribute['name'], slice_attribute['value']) \
+                if (slice_attribute['tagname'], slice_attribute['value']) \
                    not in default_slice['attributes']:
                     DeleteSliceAttribute(slice_attribute['slice_attribute_id'])
                 else:
-                    slice_attributes.append((slice_attribute['name'], slice_attribute['value']))
+                    slice_attributes.append((slice_attribute['tagname'], slice_attribute['value']))
 
         for (name, value) in default_slice['attributes']:
             if (name, value) not in slice_attributes:
@@ -695,6 +721,8 @@ username %(email)s by visiting:
 
 https://%(PLC_WWW_HOST)s:%(PLC_WWW_SSL_PORT)d/db/persons/register.php?id=%(person_id)d&key=%(verification_key)s
 
+You must wait for this account to be approved before you can begin using it, please be patient.
+
 If you did not register for a %(PLC_NAME)s account, please ignore this
 message, or contact %(PLC_NAME)s Support <%(PLC_MAIL_SUPPORT_ADDRESS)s>.
 """