Commit d60b923e authored by Leigh Stoller's avatar Leigh Stoller

Continuing the assign_wrapper rewrite

parent 113d2b3f
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005-2009 University of Utah and the Flux Group.
# All rights reserved.
#
package libmapper;
use strict;
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK);
@ISA = "Exporter";
@EXPORT = qw( );
use libdb;
use libtblog;
use libtestbed;
use Experiment;
use VirtExperiment;
use Node;
use NodeType;
use Lan;
use OSinfo;
use English;
use Data::Dumper;
use Carp;
use POSIX;
use XML::LibXML;
# Configure variables
my $TB = "@prefix@";
my $BOSSNODE = "@BOSSNODE@";
1;
......@@ -141,6 +141,10 @@ sub addfixed($$) { push(@{$_[0]->results()->{"fixed"}}, $_[1]); }
# Caller will want these.
sub minimum_nodes($) { return $_[0]->counter("minimum_nodes"); }
sub maximum_nodes($) { return $_[0]->counter("maximum_nodes"); }
sub plabcount($) { return $_[0]->counter("plabcount"); }
sub virtnodecount($) { return $_[0]->counter("virtcount"); }
sub simnodecount($) { return $_[0]->counter("simcount"); }
sub remotenodecount($) { return $_[0]->counter("remotecount"); }
###############################################################################
# Virtual Nodes. A separate package so we can create objects for each one
......@@ -1048,12 +1052,6 @@ sub PrintSummaryStats($)
$self->counters()->{'minimum_nodes'} = $minimum_nodes;
$self->counters()->{'maximum_nodes'} = $maximum_nodes;
if (0) {
$self->experiment()->Update({"maximum_nodes" => $maximum_nodes,
"minimum_nodes" => $minimum_nodes})
== 0 or return -1
}
my $virtnode_count = $self->counters()->{'virtcount'};
my $simnode_count = $self->counters()->{'simcount'};
my $reserved_virtcount = $self->counters()->{'reserved_virtcount'};
......@@ -1991,6 +1989,13 @@ sub CreateVtop($)
'maxlinks' => 0,
};
# Initialize counters.
$self->{'COUNTERS'}->{'simcount'} = 0;
$self->{'COUNTERS'}->{'remotecount'} = 0;
$self->{'COUNTERS'}->{'virtcount'} = 0;
$self->{'COUNTERS'}->{'plabcount'} = 0;
$self->{'COUNTERS'}->{'physcount'} = 0;
#
# Experiment wide options.
#
......
This diff is collapsed.
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