Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Elijah Grubb
emulab-devel
Commits
940c886b
Commit
940c886b
authored
Dec 07, 2010
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add method to get the stored value of an experiment environment variable.
parent
c803e17c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
db/Experiment.pm.in
db/Experiment.pm.in
+24
-0
No files found.
db/Experiment.pm.in
View file @
940c886b
...
...
@@ -1623,6 +1623,30 @@ sub WriteEnvVariables($)
return 0;
}
#
# Get value of a specific env variable
#
sub GetEnvVariable($$)
{
my ($self, $var) = @_;
# Must be a real reference.
return -1
if (! ref($self));
my $pid = $self->pid();
my $eid = $self->eid();
my $query_result =
DBQueryWarn("select value from virt_user_environment ".
"where pid='
$
pid
' and eid='
$
eid
' and name='
$
var
'");
return undef
if (!defined($query_result) || !$query_result->numrows);
my ($value) = $query_result->fetchrow_array();
return $value;
}
#
# Experiment locking and state changes.
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment