Commit 479b9a4a authored by Yathindra Naik's avatar Yathindra Naik

Added few changes to link disk agent in parse.tcl and sim.tcl

parent 150079ce
......@@ -376,6 +376,7 @@ source ${GLOBALS::libdir}/timeline.tcl
source ${GLOBALS::libdir}/sequence.tcl
source ${GLOBALS::libdir}/console.tcl
source ${GLOBALS::libdir}/topography.tcl
source ${GLOBALS::libdir}/disk.tcl
##################################################
# Redifing Assignment
......
......@@ -67,6 +67,10 @@ Simulator instproc init {args} {
# Program list.
$self instvar prog_list;
array set prog_list {}
# Disk list.
$self instvar disk_list;
array set disk_list {}
# EventGroup list.
$self instvar eventgroup_list;
......@@ -395,6 +399,7 @@ Simulator instproc run {} {
$self instvar node_list
$self instvar event_list
$self instvar prog_list
$self instvar disk_list
$self instvar eventgroup_list
$self instvar firewall_list
$self instvar timeline_list
......@@ -616,6 +621,9 @@ Simulator instproc run {} {
foreach prog [array names prog_list] {
$prog updatedb "sql"
}
foreach disk [array names disk_list] {
$disk updatedb "sql"
}
foreach egroup [array names eventgroup_list] {
$egroup updatedb "sql"
}
......@@ -1013,6 +1021,12 @@ Simulator instproc rename_program {old new} {
set prog_list($new) {}
}
Simulator instproc rename_disk {old new} {
$self instvar disk_list
unset disk_list($old)
set disk_list($new) {}
}
Simulator instproc rename_eventgroup {old new} {
$self instvar eventgroup_list
unset eventgroup_list($old)
......@@ -1210,6 +1224,13 @@ Simulator instproc add_program {prog} {
set prog_list($prog) {}
}
# add_disk
# Link to a new disk object.
Simulator instproc add_disk {disk} {
$self instvar disk_list
set disk_list($disk) {}
}
# add_eventgroup
# Link to a EventGroup object.
Simulator instproc add_eventgroup {group} {
......
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