Commit 6fe73ab1 authored by Mike Hibler's avatar Mike Hibler

Allow overriding of the event system experiment via setevexpt().

parent 8434963e
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group. # Copyright (c) 2006, 2007 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -28,6 +28,7 @@ our @EXPORT = qw ( ...@@ -28,6 +28,7 @@ our @EXPORT = qw (
time_all time_all
setcmdport setcmdport
setexpid setexpid
setevexpid
stopnode stopnode
stopnode_evsys stopnode_evsys
edittest edittest
...@@ -55,9 +56,7 @@ my $socket; ...@@ -55,9 +56,7 @@ my $socket;
my $sel = IO::Select->new(); my $sel = IO::Select->new();
my $port; my $port;
my $expid; my $expid;
my $evexpid = "__none";
sub setcmdport($) sub setcmdport($)
{ {
...@@ -71,6 +70,12 @@ sub setexpid($) ...@@ -71,6 +70,12 @@ sub setexpid($)
# print "libwanetmon: expid=$expid\n"; # print "libwanetmon: expid=$expid\n";
} }
sub setevexpid($)
{
$evexpid = $_[0];
# print "libwanetmon: evexpid=$evexpid\n";
}
# #
# Custom sub to turn a hash into a string. Hashes must not contain # Custom sub to turn a hash into a string. Hashes must not contain
...@@ -213,7 +218,7 @@ sub sendcmd_evsys($$$;$) ...@@ -213,7 +218,7 @@ sub sendcmd_evsys($$$;$)
%$tuple = ( objtype => "WANETMON", %$tuple = ( objtype => "WANETMON",
objname => $manType, objname => $manType,
eventtype => $cmdname, eventtype => $cmdname,
expt => "__none", expt => $evexpid,
); );
my $notification = event::event_notification_alloc($handle,$tuple); my $notification = event::event_notification_alloc($handle,$tuple);
......
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