Commit 01ceaf86 authored by Leigh Stoller's avatar Leigh Stoller

More powder fixed node target system support. Very close to being

complete.
parent cbff36ce
...@@ -7132,6 +7132,7 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -7132,6 +7132,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
install/load-descriptors install/dump-descriptors \ install/load-descriptors install/dump-descriptors \
install/newnode_sshkeys/GNUmakefile install/smb.conf.head \ install/newnode_sshkeys/GNUmakefile install/smb.conf.head \
install/clrhouse-install install/genirack/GNUmakefile \ install/clrhouse-install install/genirack/GNUmakefile \
install/powder-fixed/GNUmakefile \
install/libinstall.pm install/update-install install/update-testbed \ install/libinstall.pm install/update-install install/update-testbed \
mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \ mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \
mote/sgtools/GNUmakefile \ mote/sgtools/GNUmakefile \
......
...@@ -1446,6 +1446,7 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -1446,6 +1446,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
install/load-descriptors install/dump-descriptors \ install/load-descriptors install/dump-descriptors \
install/newnode_sshkeys/GNUmakefile install/smb.conf.head \ install/newnode_sshkeys/GNUmakefile install/smb.conf.head \
install/clrhouse-install install/genirack/GNUmakefile \ install/clrhouse-install install/genirack/GNUmakefile \
install/powder-fixed/GNUmakefile \
install/libinstall.pm install/update-install install/update-testbed \ install/libinstall.pm install/update-install install/update-testbed \
mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \ mote/GNUmakefile mote/tbuisp mote/tbsgmotepower mote/newmote \
mote/sgtools/GNUmakefile \ mote/sgtools/GNUmakefile \
......
#
# This is the powder-fixed specific parts of target system setup
#
use strict;
use English;
use libinstall;
use installvars;
use libtestbed;
use EmulabConstants;
use emutil;
use libEmulab;
use emdb;
use NodeType;
use Node;
use Interface;
use Image;
my $CONFIGVARS = "$PREFIX/configvars.txt";
my $TARGETSYSVARS= "$PREFIX/etc/targetsys/variables.txt";
my $NODEFILE = "$PREFIX/etc/targetsys/nodes.txt";
my $ADDNODETYPE = "$PREFIX/bin/editnodetype";
my $ADDNODE = "$PREFIX/sbin/addnode";
my $ADDINTERFACE = "$PREFIX/sbin/addinterface";
my $TARGETSYS_DIR= lc($TARGETSYS_TARGET);
my $RUNCAPTURE = "$TOP_SRCDIR/install/$TARGETSYS_DIR/run_capture";
my $SQLSTUFF = "$TOP_SRCDIR/install/$TARGETSYS_DIR/tbdb.sql";
my %TYPEFILES = ("nuc8650" =>
"$TOP_SRCDIR/install/$TARGETSYS_DIR/nuc8650.xml",
"iris030" =>
"$TOP_SRCDIR/install/$TARGETSYS_DIR/iris030.xml");
sub Install($$$)
{
my ($server, $isupdate, $impotent) = @_;
my %configvars = ();
# Replace if this script does an update for ip/domain.
return 0
if ($isupdate);
SET_TESTBED_VERSION($TARGETSYS_TARGET);
Phase "fixednode", "Doing additional fixed node tasks", sub {
PhaseSkip("Not a target system")
if (!$CONFIG_TARGETSYS);
Phase "config", "Reading in Emulab config variables", sub {
PhaseFail("No config file")
if (! -e $CONFIGVARS);
open(CN, $CONFIGVARS)
or PhaseFail("Could not open $CONFIGVARS: $!");
while (<CN>) {
if ($_ =~ /^([-\w]*)\s*=\s*(.*)$/) {
my $key = $1;
my $val = $2;
if ($val =~ /^'(.*)'$/) {
$val = $1;
}
$configvars{$key} = "$val";
}
}
close(CN);
};
Phase "targetconfig", "Reading in targetsys config variables", sub {
PhaseFail("No config file")
if (! -e $TARGETSYSVARS);
open(CN, $TARGETSYSVARS)
or PhaseFail("Could not open $TARGETSYSVARS: $!");
while (<CN>) {
if ($_ =~ /^([-\w]*)\s*=\s*(.*)$/) {
my $key = $1;
my $val = $2;
if ($val =~ /^'(.*)'$/) {
$val = $1;
}
$configvars{$key} = "$val";
}
}
close(CN);
};
if (0) {
Phase "unifi5", "Installing unifi5 package", sub {
DoneIfPackageInstalled("unifi", 0);
# Oh, this is clever.
$ENV{"ASSUME_ALWAYS_YES"} = "true";
ExecQuietFatal("pkg install unifi5");
};
Phase "fstab", "Adding extras to $FSTAB", sub {
DoneIfEdited($FSTAB);
AppendToFileFatal($FSTAB,
"proc\t\t/proc\tprocfs\trw\t0\t0",
"fdesc\t\t/dev/fd\tfdescfs\trw\t0\t0");
};
#
# Add /etc/hosts entries for the switches.
#
Phase "etchosts", "Adding hosts entries for switches", sub {
my @strings = ();
foreach my $switch (keys(%HOSTNAMES)) {
my $ip = $HOSTNAMES{$switch};
push(@strings, "$ip\t$switch");
}
DoneIfEdited($HOSTS);
AppendToFileFatal($HOSTS, @strings);
};
}
#
# Add in the extra stuff which is all hard coded sql.
#
Phase "sql", "Adding addtional stuff to the database", sub {
PhaseSkip("No addtional SQL")
if (! -e $SQLSTUFF);
ExecQuietFatal("$MYSQL $DBNAME < $SQLSTUFF");
};
#
# Extra install
#
Phase "extra", "Installing extra scripts", sub {
ExecQuietFatal("cd $TOP_OBJDIR/install/$TARGETSYS_DIR; ".
"$GMAKE install");
};
#
# Add the node types to the DB.
#
foreach my $type (keys(%TYPEFILES)) {
my $file = $TYPEFILES{$type};
Phase $type, "Adding node type $type to the database", sub {
PhaseSkip("already added")
if (NodeType->Lookup($type));
ExecQuietFatal("$SUDO -u $PROTOUSER $WAP ".
"$ADDNODETYPE $file");
};
}
#
# Need to go back and update all the images to the correct
# architecture, since that was ignored when the images were
# imported (cause no types defined that had an architecture).
#
Phase "images", "Setting architecture on all images", sub {
my @images = Image->ListAll(undef, TBOPSPID());
foreach my $imagename (@images) {
Phase $imagename, $imagename, sub {
my $image = Image->Lookup($imagename);
PhaseFail("lookup failure")
if (!defined($image));
PhaseSucceed("$imagename Done");
};
}
PhaseSucceed("Images Done");
};
#
# Add the nodes to the DB.
#
Phase "nodes", "Adding nodes to the database", sub {
PhaseFail("No node file")
if (! -e $NODEFILE);
open(NODE, $NODEFILE)
or PhaseFail("Could not open $NODEFILE: $!");
while (<NODE>) {
if ($_ =~ /^([-\w]+)\s*([-\w]+)\s*([-\w]+)\s*([\.\d]+)$/) {
my $nodeid = $1;
my $type = $2;
my $MAC = $3;
my $IP = $4;
Phase $nodeid, "Adding $nodeid", sub {
PhaseSkip("already done")
if (Node->Lookup($nodeid));
ExecQuietFatal("$SUDO -u $PROTOUSER $WAP ".
" $ADDNODE -t $type $nodeid");
};
Phase "$nodeid interface", "Adding $nodeid interface", sub {
my $node = Node->Lookup($nodeid);
PhaseFail("lookup failure")
if (!defined($node));
PhaseSkip("already done")
if (Interface->LookupControl($node));
ExecQuietFatal("$SUDO -u $PROTOUSER $WAP ".
" $ADDINTERFACE -b 1Gb -I $IP ".
" -M 255.255.255.248 -e ctrl ".
" -m $MAC $nodeid eth0");
};
}
}
close(CN);
Phase "named", "Restarting named", sub {
ExecQuietFatal($NAMED_SETUP);
};
Phase "dhcpd", "Restarting dhcpd", sub {
ExecQuietFatal("$DHCPD_MAKECONF -r -i");
};
PhaseSucceed("Nodes Done");
};
# We need tiplines and tipserver entries.
Phase "tip", "Adding tiplines and tipservers to DB", sub {
DBQueryWarn("replace into tipservers ".
" values ('$BOSSNODE')") or
PhaseFail("inserting tipserver");
DBQueryWarn("replace into `tiplines` set ".
" tipname='powduino',node_id='powduino',".
" server='$BOSSNODE',disabled=0") or
PhaseFail("inserting tipline");
};
Phase "capture", "Installing capture startup file", sub {
ExecQuietFatal("$GMAKE -C $TOP_OBJDIR/rc.d tipserv-install");
};
Phase "run_capture", "Installing capture run file", sub {
DoneIfExists("$PREFIX/sbin/run_capture");
ExecQuietFatal("/bin/cp -f $RUNCAPTURE $PREFIX/sbin");
};
Phase "tiplogs", "Creating tiplogs directory", sub {
DoneIfExists("$PREFIX/log/tiplogs");
mkdir "$PREFIX/log/tiplogs", 0755 or
PhaseFail("Unable to create tiplogs: $!");
};
#
# Fix NAT rule for ops jail.
#
my $NATCONF = "/etc/pf.nat";
Phase "nat", "Updating NAT configuration", sub {
my $bossip = $configvars{"TARGETSYS_BOSSIP"};
my $opsip = $configvars{"TARGETSYS_OPSIP"};
Phase "delete", "Deleting old configuration", sub {
DeleteFileFatal($NATCONF);
};
Phase "create", "Creating new configuration", sub {
CreateFileFatal($NATCONF,
"# Packet normalization",
"scrub in all",
"",
"# Allow outbound connections from the jail",
"nat on xn0 from $opsip to any -> $bossip");
};
Phase "restart", "Restarting NAT", sub {
ExecQuietFatal("service pf restart");
};
PhaseSucceed("NAT Done");
};
#
# Munge /etc/rc.conf for real boot.
#
Phase "rcconf", "Updating rcconf for actual boot", sub {
my @strings = ();
my @ifaces = ();
my @patterns = ();
my $outerctrl;
my ($status,@output) =
ExecQuiet("egrep '^ifconfig_xn0=' $RCCONF");
PhaseFail("egrep failed")
if ($status);
if ($output[0] =~ /^ifconfig_xn0=(.*)$/) {
$outerctrl = $1;
}
else {
PhaseFail("Bad ifconfig_xn0 in $RCCONF");
}
# unifi.
#push(@strings, 'unifi_enable="YES"');
push(@strings,
"ifconfig_xn0=\"inet ". $configvars{"TARGETSYS_BOSSIP"} .
" netmask " . $configvars{"TARGETSYS_NETMASK"} . " -tso\"");
# Jail network.
push(@strings,
"ifconfig_xn0_alias0=\"inet 172.17.254.254 ".
"netmask 255.240.0.0\"");
# Jail network.
push(@strings,
"ifconfig_xn0_alias1=\"inet 10.10.10.2 ".
"netmask 255.255.255.248\"");
# Actual default router.
push(@strings,
"defaultrouter=\"" . $configvars{"TARGETSYS_ROUTER"} . "\"");
# Going to lose all static routes below, so add this back.
push(@strings,
"static_routes=\"\$static_routes frisbee vnodes\"");
#
# This stuff is for development inside the Mothership.
#
# Outer Emulab control network.
push(@strings,
"ifconfig_xn0_alias2=$outerctrl");
# Route to outer boss and outer control networks
push(@strings,
"route_outeremulab=\"-net 155.98.36.0 ".
"-netmask 255.255.252.0 155.98.36.1\"");
push(@strings,
"route_outerboss=\"155.98.32.70 155.98.36.1\"");
push(@strings,
"static_routes=\"\$static_routes outerboss outerboss\"");
#
# Okay, we want to comment out a bunch of stuff.
#
@patterns = (qr(^natd),
qr(^firewall),
qr(^defaultrouter),
qr(^static_routes),
qr(^route_targetsys),
qr(^route_outerboss),
qr(^route_vnodes),
qr(^ifconfig_xn0),
qr(^ifconfig_xn0_alias),
);
DoneIfEdited($RCCONF);
UpdateFileFatal($RCCONF, \@patterns, @strings);
};
PhaseSucceed("Powder Fixed Setup Done");
};
return 0;
}
# Local Variables:
# mode:perl
# End:
#
# Additional stuff for setting up a powder fixed node.
#
use strict;
use libinstall;
use installvars;
my $CONFIGVARS = "$PREFIX/configvars.txt";
sub Install($$$)
{
my ($server, $isupdate, $impotent) = @_;
my %configvars = ();
# Replace if this script does an update for ip/domain.
return 0
if ($isupdate);
SET_TESTBED_VERSION($TARGETSYS_TARGET);
Phase "targetsys", "Doing additional target system tasks", sub {
PhaseSkip("Not a target system")
if (!$CONFIG_TARGETSYS);
Phase "config", "Reading in Emulab config variables", sub {
PhaseFail("No config file")
if (! -e $CONFIGVARS);
open(CN, $CONFIGVARS)
or PhaseFail("Could not open $CONFIGVARS: $!");
while (<CN>) {
if ($_ =~ /^([-\w]*)\s*=\s*(.*)$/) {
my $key = $1;
my $val = $2;
if ($val =~ /^'(.*)'$/) {
$val = $1;
}
$configvars{$key} = "$val";
}
}
close(CN);
};
Phase "rcconf", "Updating rcconf for actual boot", sub {
my @strings = ();
push(@strings,
"syslogd_flags=\"-a " .
$configvars{"TARGETSYS_NETWORK"} . "/24\"");
#
# Okay, we want to comment out a bunch of stuff.
#
my @patterns = (qr(^syslogd_flags),
);
DoneIfEdited($RCCONF);
UpdateFileFatal($RCCONF, \@patterns, @strings);
};
PhaseSucceed("Powder Fixed Setup Done");
};
return 0;
}
# Local Variables:
# mode:perl
# End:
#
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = install/powder-fixed
include $(OBJDIR)/Makeconf
TARGETS = dhcpd.conf.frag.one
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: $(TARGETS)
include $(TESTBED_SRCDIR)/GNUmakerules
install: $(INSTALL_ETCDIR)/dhcpd.conf.frag.one
clean:
rm -f $(TARGETS)
subnet 10.10.10.0 netmask 255.255.255.248 {
option subnet-mask 255.255.255.248;
option routers 10.10.10.2;
option domain-name-servers 10.10.10.2;
option domain-name "@OURDOMAIN@";
next-server 10.10.10.2;
# Iris is on a private subnet.
group {
#
# For every PC nodetype, include a line like the one below.
# These lines will be replaced with auto-generated entries for
# nodes of that type. You can also use the class field from the
# node_types table
#
%%nodetype=iris030
}
}
<nodetype>
<attribute name="node_type"> <value>iris030</value></attribute>
<attribute name="new_type"> <value>1</value></attribute>
<attribute name="class"> <value>iris</value></attribute>
<attribute name="isvirtnode"> <value>0</value></attribute>
<attribute name="isjailed"> <value>0</value></attribute>
<attribute name="isdynamic"> <value>0</value></attribute>
<attribute name="isremotenode"> <value>0</value></attribute>
<attribute name="issubnode"> <value>0</value></attribute>
<attribute name="isplabdslice"> <value>0</value></attribute>
<attribute name="issimnode"> <value>0</value></attribute>
<attribute name="isgeninode"> <value>0</value></attribute>
<attribute name="isfednode"> <value>0</value></attribute>
<attribute name="isswitch"> <value>0</value></attribute>
<attribute name="attr_boolean_explicit_request"> <value>1</value></attribute>
<attribute name="attr_boolean_imageable"> <value>0</value></attribute>
<attribute name="attr_boolean_noshowfreenodes"> <value>1</value></attribute>
<attribute name="attr_boolean_rebootable"> <value>1</value></attribute>
<attribute name="attr_integer_power_delay"> <value>60</value></attribute>
<attribute name="attr_string_default_osid"> <value>emulab-ops,GENERICDEV-NOVLANS</value></attribute>
</nodetype>
<nodetype>
<attribute name="node_type"> <value>nuc8650</value></attribute>
<attribute name="new_type"> <value>1</value></attribute>
<attribute name="class"> <value>pc</value></attribute>
<attribute name="isvirtnode"> <value>0</value></attribute>
<attribute name="isjailed"> <value>0</value></attribute>
<attribute name="isdynamic"> <value>0</value></attribute>
<attribute name="isremotenode"> <value>0</value></attribute>
<attribute name="issubnode"> <value>0</value></attribute>
<attribute name="isplabdslice"> <value>0</value></attribute>
<attribute name="issimnode"> <value>0</value></attribute>
<attribute name="isgeninode"> <value>0</value></attribute>
<attribute name="isfednode"> <value>0</value></attribute>
<attribute name="isswitch"> <value>0</value></attribute>
<attribute name="attr_string_architecture"> <value>x86_64</value></attribute>
<attribute name="attr_integer_bios_waittime"> <value>60</value></attribute>
<attribute name="attr_integer_bootdisk_unit"> <value>0</value></attribute>
<attribute name="attr_string_control_interface"> <value>eth0</value></attribute>
<attribute name="attr_integer_control_network"> <value>0</value></attribute>
<attribute name="attr_integer_delay_capacity"> <value>0</value></attribute>
<attribute name="attr_float_disksize"> <value>250.0</value></attribute>
<attribute name="attr_string_disktype"> <value>nvd</value></attribute>
<attribute name="attr_integer_frequency"> <value>2100</value></attribute>
<attribute name="attr_boolean_imageable"> <value>1</value></attribute>
<attribute name="attr_integer_max_interfaces"> <value>2</value></attribute>
<attribute name="attr_integer_memory"> <value>32768</value></attribute>
<attribute name="attr_integer_power_delay"> <value>60</value></attribute>
<attribute name="attr_string_processor"> <value>i7-8650</value></attribute>
<attribute name="attr_integer_num_processors"> <value>1</value></attribute>
<attribute name="attr_integer_num_cores"> <value>4</value></attribute>
<attribute name="attr_integer_num_cpus"> <value>8</value></attribute>
<attribute name="attr_boolean_rebootable"> <value>1</value></attribute>
<attribute name="attr_integer_simnode_capacity"> <value>0</value></attribute>
<attribute name="attr_integer_trivlink_maxspeed"> <value>10000000</value></attribute>
<attribute name="attr_integer_virtnode_capacity"> <value>0</value></attribute>
<attribute name="attr_string_console_type"> <value>vga</value></attribute>
<attribute name="attr_string_adminmfs_osid"> <value>emulab-ops,FREEBSD-MFS</value></attribute>
<attribute name="attr_string_default_osid"> <value>emulab-ops,UBUNTU18-64-STD</value></attribute>
<attribute name="attr_string_delay_osid"> <value>emulab-ops,FBSD103-64-STD</value></attribute>
<attribute name="attr_string_diskloadmfs_osid"> <value>emulab-ops,FRISBEE-MFS</value></attribute>
<attribute name="attr_string_default_imageid"> <value>emulab-ops:UBUNTU18-64-STD</value></attribute>
</nodetype>
source tb_compat.tcl
set ns [new Simulator]
tb-elab-in-elab 1
tb-elabinelab-singlenet
tb-elab-in-elab-topology xenopsvm
tb-set-elabinelab-attribute CONFIG_WINDOWS 0
tb-set-elabinelab-attribute CONFIG_MAILMAN 1
tb-set-elabinelab-attribute LOAD_PROTOGENI 1
tb-set-elabinelab-attribute CONFIG_PROTOGENI 1
tb-set-elabinelab-attribute CONFIG_NODBINIT 1
tb-set-elabinelab-attribute CONFIG_ADMINUSERS 1
tb-set-elabinelab-attribute CONFIG_NOSETUP 0
tb-set-elabinelab-attribute CONFIG_PORTAL 1
tb-set-elabinelab-attribute CONFIG_TARGETSYS 1
tb-set-elabinelab-attribute TARGETSYS_TARGET POWDER-FIXED
tb-set-elabinelab-attribute TARGETSYS_DOMAIN elab-nuc20.testbed.emulab.net
tb-set-elabinelab-attribute TARGETSYS_NETWORK 155.98.47.64
tb-set-elabinelab-attribute TARGETSYS_NETMASK 255.255.255.248
tb-set-elabinelab-attribute TARGETSYS_ROUTER 155.98.47.65
tb-set-elabinelab-attribute TARGETSYS_BOSSIP 155.98.47.66
tb-set-elabinelab-attribute TARGETSYS_OPSIP 10.10.10.3
# Added Utah boss to avoid timeouts during setup.
tb-set-elabinelab-attribute NAMED_FORWARDERS "155.98.32.70"
#tb-set-elabinelab-attribute NAMED_ALSONOTIFY 155.98.32.70
# Turn this on to federate with the MotherShip.
#tb-set-elabinelab-attribute CONFIG_FEDERATED 1
# Reset to admin email later.
tb-set-elabinelab-attribute TARGETSYS_TBOPS "stoller@flux.utah.edu"
tb-set-elabinelab-attribute TARGETSYS_TBLOGS "stoller@flux.utah.edu"
tb-set-elabinelab-attribute TARGETSYS_TBSTATED "stoller@flux.utah.edu"
# We make this stuff up for the site.
tb-set-elabinelab-attribute TARGETSYS_HOMEBASE POWDERFIXED
tb-set-elabinelab-attribute TARGETSYS_TIMEZONE America/Denver
tb-set-elabinelab-attribute SSLCERT_COUNTRY US
tb-set-elabinelab-attribute SSLCERT_STATE "Utah"
tb-set-elabinelab-attribute SSLCERT_LOCALITY "Utah Powder Fixed"
tb-set-elabinelab-attribute SSLCERT_ORGNAME "Utah Powder Fixed Test"
# New way of getting a routable control address for initial XEN VMs.
tb-set-elabinelab-role-attribute boss ROUTABLE_IP "routable"
tb-set-elabinelab-role-attribute boss XEN_MEMSIZE 6144
tb-set-elabinelab-role-attribute boss XEN_CORES 2
# Nucs need the latest.
tb-set-elabinelab-attribute MFSVERSION "11-64"
# Extra stuff for devel in elabinelab.
tb-set-elabinelab-role-attribute boss XEN_NOANTISPOOFING yes
tb-set-elabinelab-role-attribute boss XEN_STARTUPSCRIPT "/proj/testbed/exp/elab-opsvm/rc.powder 155.98.47.65 10.10.10.1"
tb-set-elabinelab-role-attribute boss XEN_LVMNOTHINPOOL yes
# Remember that /q is on boss not ops (boss is the FS node).
tb-set-elabinelab-role-attribute "boss" "EXTRADISKS" "ada1:/usr/testbed,ada2:/q"
tb-set-elabinelab-role-attribute boss XEN_EXTRADISKS "disk1:50G,disk2:50G"
namespace eval TBCOMPAT {
set elabinelab_maxpcs 0
set elabinelab_hardware("boss") nuc7100-vm
set elabinelab_nodeos("boss") FBSD112-64-STD
set elabinelab_source_tarfile "/proj/testbed/exp/elab-opsvm/emulab-src.tar.gz"
set elabinelab_nodeos("xenhost") XEN49-64-POWD
set elabinelab_hardware("xenhost") nuc7100
set elabinelab_fixnodes("xenhost") nuc20
}
$ns run
#!/bin/sh
#
# This should be auto-generated, but isn't yet.
#
/usr/testbed/sbin/capture -T 15 -r -s 9600 powduino cuaU0 >/dev/null 2>&1 &
exit 0
INSERT INTO `node_types`
VALUES ('power','powduino',NULL,NULL,NULL,0,0,0,0,0,0,0,0,0,0,0,0);
INSERT INTO `node_type_attributes`
VALUES ('powduino','rebootable','0','boolean');
INSERT INTO `node_type_attributes`
VALUES ('powduino','imageable','0','boolean');
INSERT into `nodes` set
node_id='powduino',phys_nodeid='powduino',
type='powduino',role='powerctrl';
INSERT into `outlets` set
node_id='nuc1',power_id='powduino',outlet='0';
INSERT into `outlets` set
node_id='nuc2',power_id='powduino',outlet='1';
INSERT into `outlets` set
node_id='iris1',power_id='powduino',outlet='2';
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