Commit 49a9940e authored by Leigh B Stoller's avatar Leigh B Stoller

Add a routine to look up an elabinelab role.

parent 48d278b1
# -*- tcl -*-
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -2054,6 +2054,22 @@ proc tb-set-elabinelab-role-attribute {role key value {order 0}} {
}
}
proc tb-get-elabinelab-role-attribute {role key} {
var_import ::TBCOMPAT::EINEROLE;
var_import ::TBCOMPAT::EINEKEY;
var_import ::TBCOMPAT::EINEVALUE;
var_import ::TBCOMPAT::EINEORDER;
var_import ::TBCOMPAT::elabinelab_attributes;
set ret {}
set i [lsearch -glob $elabinelab_attributes "$role,$key,*,0"]
if {$i > -1} {
set values [split [lindex $elabinelab_attributes $i] ","]
set ret [lindex $values 2]
}
return $ret
}
proc tb-unset-elabinelab-role-attribute {role key} {
var_import ::TBCOMPAT::EINEROLE;
var_import ::TBCOMPAT::EINEKEY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment