Commit 5015bb99 authored by Jonathon Duerig's avatar Jonathon Duerig

Checkpoint. Local nodes 80% implemented. Features implemented.

Still remaining: widearea nodes, links, osids, single-node mode.
parent d006ea1b
This diff is collapsed.
......@@ -11,19 +11,15 @@
use strict;
use English;
use Getopt::Std;
use Math::BigInt;
use List::Util 'shuffle';
#use Math::BigInt;
#use List::Util 'shuffle';
#use lib "@prefix@/lib";
use lib "/usr/testbed/lib";
use lib ".";
use libdb;
use libadminctrl;
#use libadminctrl;
use libptopnew;
use Experiment;
use Lan;
use Node;
use NodeType;
use GeniXML;
sub processArgs();
......@@ -31,17 +27,15 @@ sub consultDatabase();
sub process();
sub printResults();
libptopnew::Init();
#
# Turn off line buffering on output
#
$| = 1;
my $print_xml = 0;
my $print_format = "CRAPPY";
my $print_ns = $GeniXML::RSPEC_2_NS;
# Initialize permissions table for the current project
processArgs();
consultDatabase();
printResults();
......@@ -59,15 +53,29 @@ sub consultDatabase()
while ($row = $dbresult->fetchrow_hashref()) {
libptopnew::CreateNode($row);
}
# Bulk lookup on reserved table
$dbresult = DBQueryFatal("select * from reserved");
while ($row = $dbresult->fetchrow_hashref()) {
libptopnew::Nodes()->{$row->{"node_id"}}->node()->SetReservedRow($row);
}
# Bulk lookup of permissions table for project
libptopnew::LookupPermissions();
# Bulk lookup of global usage counts for shared nodes
libptopnew::LookupGlobalCounts();
# Bulk lookup of node and node_type auxtypes
libptopnew::LookupAuxtypes();
# Bulk lookup of node and node_type features
libptopnew::LookupFeatures();
# Process each node adding ptypes and features
foreach my $current (values(%{ libptopnew::Nodes() })) {
if ($current->willPrint()) {
$current->processTypeFeatures();
$current->processSwitch();
$current->processLocal();
$current->processWidearea();
......
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