#!/usr/bin/perl

use IO::File;

# Read a hash of per-testbed parameters from the local configurations.
$conf = new IO::File(shift) || 
    die "can't read testbed configutions from $tb_config: $!\n";
while (<$conf>) {
    next if /^#/;
    chomp;
    ($tb, $h, $d, $u, $p, $es, $gs, $mes, $mgs, $t, $i, $fs, $boss, $tun) = 
	split(":", $_);

    # Make sure the domain starts with a period
    $d = ".$d" unless $d =~ /^\./;

    print <<END;
[$tb]
OpsNode: $h
User: $u
Domain: $d
Project: $p
ConnectorType: $t
ConnectorImage: $i
SlaveNodeStartCmd: $es
SlaveConnectorStartCmd: $gs
MasterNodeStartCmd: $mes
MasterConnectorStartCmd: $mgs
FileServer: $fs
Boss: $boss
TunnelCfg: $tun

END
}
$conf->close();
