git://git.onelab.eu
/
myplc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4eeb5b
)
add in RLIMIT default attribute types
author
Marc Fiuczynski
<mef@cs.princeton.edu>
Thu, 30 Oct 2008 07:38:24 +0000
(07:38 +0000)
committer
Marc Fiuczynski
<mef@cs.princeton.edu>
Thu, 30 Oct 2008 07:38:24 +0000
(07:38 +0000)
db-config
patch
|
blob
|
history
diff --git
a/db-config
b/db-config
index
419fbae
..
4f95439
100755
(executable)
--- a/
db-config
+++ b/
db-config
@@
-12,6
+12,7
@@
from plc_config import PLCConfiguration
import sys
from plc_config import PLCConfiguration
import sys
+import resource
def main():
cfg = PLCConfiguration()
def main():
cfg = PLCConfiguration()
@@
-523,6
+524,19
@@
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 = {
+ 'name': "%s_%s'%(rlim,ty)",
+ 'description': "Per sliver RLIMIT %s_%s."%(rlim,ty),
+ 'min_role_id': 40 #admin
+ }
+ default_attribute_types.append(attribute)
+
# Get list of existing attribute types
attribute_types = GetSliceAttributeTypes()
attribute_types = [attribute_type['name'] for attribute_type in attribute_types]
# Get list of existing attribute types
attribute_types = GetSliceAttributeTypes()
attribute_types = [attribute_type['name'] for attribute_type in attribute_types]