Commit 2202a059 authored by Shashi Guruprasad's avatar Shashi Guruprasad

A fix to correctly update the virt_agents table. Some hacks to allow

the NSE scheduler slop factor to be controlled from the user-specified
make-simulated code. Also added a null tb_compat file so we can
ignore any tb-* commands that get specified inside make-simulated.
These commands are anyway evaluated during the initial parse.
parent 46f7fe16
......@@ -15,7 +15,7 @@ SUBDIR = tbsetup/nseparse
include $(OBJDIR)/Makeconf
LIB_STUFF = nse.node.tcl nse.sim.tcl nse.null.tcl \
nse.agent.tcl nse.parse.tcl
nse.agent.tcl nse.parse.tcl tb_compat.tcl
BOSSLIBEXEC = parse-nse
USERLIBEXEC = nse.parse.proxy
......
......@@ -274,6 +274,7 @@ proc punsup {msg} {
source ${GLOBALS::libnsedir}/nse.sim.tcl
source ${GLOBALS::libnsedir}/nse.node.tcl
source ${GLOBALS::libnsedir}/nse.agent.tcl
source ${GLOBALS::libnsedir}/tb_compat.tcl
##################################################
# Redifing Assignment
......@@ -404,6 +405,9 @@ namespace eval GLOBALS {
real_set sim [lindex [Simulator info instances] 0]
foreach pnode [array names p2vmapsim] {
real_set nseconfig($pnode) {}
if { [$sim info vars rtslop] != {} } {
append nseconfig($pnode) "Scheduler/RealTime set maxslop_ [$sim set rtslop]\n\n"
}
append nseconfig($pnode) "set [$sim set objname] [$sim set createcmd]\n"
# Since we will be adding IP address based routes, any ns default
# routing causes problems
......@@ -411,6 +415,9 @@ namespace eval GLOBALS {
append nseconfig($pnode) \
"\$[$sim set objname] set tbname \{$v2vmap([$sim set objname])\}\n"
append nseconfig($pnode) "[$sim set nseconfig]\n\n"
# XXX temporary hack
append nseconfig($pnode) "Agent/TCP set QOption_ 1\n\n"
}
real_set ignore_class_vars(id_counter) {}
......@@ -614,6 +621,12 @@ namespace eval GLOBALS {
# We don't want duplicate entries in the virt_agents
# table
real_set virt_agents_list($vname) {}
real_set agt [$vname set agent]
if { ! [info exists virt_agents_list($agt)] } {
$sim spitxml_data "virt_agents" [list "vnode" "vname" "objecttype"] [list $pnode [$agt set objname] $otype]
real_set virt_agents_list($agt) {}
}
}
$sim spitxml_data "eventlist" [list "time" "vnode" "vname" "objecttype" "eventtype" "arguments" "atstring" ] [list $time $pnode [$vname set objname] $otype $etype $args $atstring]
}
......@@ -622,6 +635,11 @@ namespace eval GLOBALS {
}
array donesearch event_list $searchid
}
real_set otype $objtypes(NSE)
foreach pnode [array names p2vmapsim] {
$sim spitxml_data "virt_agents" [list "vnode" "vname" "objecttype"] [list $pnode $pnode $otype]
}
$sim spitxml_finish
}
......
# -*- tcl -*-
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
# This is a nop tb_compact.tcl file that should be used when running scripts
# under ns.
proc tb-set-ip {node ip} {}
proc tb-set-ip-interface {src dst ip} {}
proc tb-set-ip-link {src link ip} {}
proc tb-set-ip-lan {src lan ip} {}
proc tb-set-hardware {node type args} {}
proc tb-set-node-os {node os} {}
proc tb-set-link-loss {src args} {}
proc tb-set-lan-loss {lan rate} {}
proc tb-set-node-rpms {node args} {}
proc tb-set-node-startup {node cmd} {}
proc tb-set-node-cmdline {node cmd} {}
proc tb-set-node-tarfiles {node args} {}
proc tb-set-node-lan-delay {node lan delay} {}
proc tb-set-node-lan-bandwidth {node lan bw} {}
proc tb-set-node-lan-loss {node lan loss} {}
proc tb-set-node-lan-params {node lan delay bw loss} {}
proc tb-set-node-failure-action {node type} {}
proc tb-set-ip-routing {type} {}
proc tb-fix-node {v p} {}
proc tb-make-weighted-vtype {name weight types} {}
proc tb-make-soft-vtype {name types} {}
proc tb-make-hard-vtype {name types} {}
proc tb-set-lan-simplex-params {lan node todelay tobw toloss fromdelay frombw fromloss} {}
proc tb-set-link-simplex-params {link src delay bw loss} {}
proc tb-set-uselatestwadata {onoff} {}
proc tb-set-usewatunnels {onoff} {}
proc tb-set-wasolver-weights {delay bw plr} {}
proc tb-use-endnodeshaping {onoff} {}
proc tb-force-endnodeshaping {onoff} {}
proc tb-set-multiplexed {link onoff} {}
proc tb-set-endnodeshaping {link onoff} {}
proc tb-set-noshaping {link onoff} {}
proc tb-set-useveth {link onoff} {}
proc tb-set-allowcolocate {lanlink onoff} {}
proc tb-set-colocate-factor {factor} {}
proc tb-set-node-startcmd {node cmd} {}
proc tb-set-encapsulate {onoff} {}
proc tb-set-jail-os {os} {}
proc tb-set-delay-os {os} {}
proc tb-use-ipassign {onoff} {}
proc tb-set-ipassign-args {args} {}
proc tb-set-lan-protocol {lanlink protocol} {}
proc tb-set-lan-accesspoint {lanlink node} {}
proc tb-set-lan-setting {lanlink capkey capval} {}
proc tb-set-node-lan-setting {lanlink node capkey capval} {}
Class Program
Program instproc init {args} {
}
Program instproc unknown {m args} {
}
# We are just syntax checking the NS file
Simulator instproc run {args} {
}
Simulator instproc nsenode {args} {
return [new NSENode]
}
Simulator instproc make-simulated {args} {
uplevel 1 eval $args
}
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