Commit 70396a70 authored by Christopher Alfeld's avatar Christopher Alfeld

New Vtype class.

parent 2eed47f6
######################################################################
# vtype.tcl
#
# This defines the Vtype class. Unlike other classes, Vtypes are
# testbed specific. They are generated by the tb-make-*-vtype
# command. A Vtype contains a list of types. Nodes can also have
# Vtypes as their types. Finally, a Vtype has a weight.
######################################################################
Class Vtype
Vtype instproc init {w t} {
$self set types $t
$self set weight $w
}
Vtype instproc updatedb {DB} {
var_import ::GLOBALS::pid
var_import ::GLOBALS::eid
$self instvar name
$self instvar types
$self instvar weight
sql exec $DB "insert into virt_vtypes (pid,eid,name,weight,members) values (\"$pid\",\"$eid\",\"$self\",$weight,\"$types\");"
}
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