Commit 617dabc7 authored by David Johnson's avatar David Johnson

Add a default group option in TBConfig.pm, and push that into various

things.  Might be the wrong thing to do, but it works...
parent 62069c30
......@@ -12,7 +12,8 @@ our $XMLRPC_VERSION = "0.1";
our $SSL_CLIENT_CERT = glob("~/.ssl/emulab.cert");
our $SSL_CLIENT_KEY = glob("~/.ssl/emulabkeyout.pem");
our $EMULAB_USER = get_emulab_user();
our $DEFAULT_PID = 'tbres';
our $DEFAULT_PID = 'tbtest';
our $DEFAULT_GID = '';
our $DEBUG_XML_CLIENT = $ENV{TBTS_DEBUG} || 0;
sub get_emulab_user {
......
......@@ -7,7 +7,7 @@ use Tools;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(e ep dpe CartProd CartProdRunner concretize defaults);
our @EXPORT = qw(e ep dpe dpge CartProd CartProdRunner concretize defaults);
=head1 NAME
......@@ -58,6 +58,14 @@ CartProdRunner(\&VNodeTest::VNodeTest, $config);
sub ep { TestBed::TestSuite::Experiment->new }
sub e { TestBed::TestSuite::Experiment->new('pid'=> shift, 'eid' => shift) }
sub dpe { TestBed::TestSuite::Experiment->new('pid'=> $TBConfig::DEFAULT_PID, 'eid' => shift) }
sub dpge {
my $gid = (!defined($TBConfig::DEFAULT_GID)
|| $TBConfig::DEFAULT_GID eq '')
? $TBConfig::DEFAULT_PID : $TBConfig::DEFAULT_GID;
TestBed::TestSuite::Experiment->new('pid' => $TBConfig::DEFAULT_PID,
'gid' => $gid,
'eid' => shift)
}
sub CartProd {
my ($config, %options) = @_;
......
......@@ -8,13 +8,20 @@ use TestBed::XMLRPC::Client::NodeInfo;
extends 'TestBed::XMLRPC::Client';
has 'pid' => ( isa => 'Str', is => 'rw');
has 'gid' => ( isa => 'Str', is => 'rw');
has 'eid' => ( isa => 'Str', is => 'rw');
#autoloaded/autogenerated/method_missings/etc batchexp swapexp endexp waitforactive getlist expinfo
sub args {
my $self = shift;
{ 'pid' => $self->pid, 'eid' => $self->eid, @_ };
if (defined($self->gid) && $self->gid ne '') {
return { 'pid' => $self->pid, 'gid' => $self->gid,
'eid' => $self->eid, @_ };
}
else {
return { 'pid' => $self->pid, 'eid' => $self->eid, @_ };
}
}
sub echo { shift->augment_output( 'str' => shift ); }
......@@ -82,6 +89,10 @@ TestBed::XMLRPC::Client::Experiment
experiment pid
=item C<gid>
experiment gid
=item C<eid>
experiment eid
......
......@@ -18,7 +18,7 @@ $ns run
NSEND
my $eid='simple';
my $e = dpe($eid);
my $e = dpge($eid);
$e->startrunkill($ns,
sub {
my ($e) = @_;
......
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