From 3445487383131f26b96a3a4403d5499af0d699d1 Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Thu, 30 Oct 2008 07:38:44 +0000 Subject: [PATCH] add in RLIMIT default attribute types --- db-config | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/db-config b/db-config index 1778cce..dba3dc9 100755 --- 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()] -- 2.43.0