Commit 0a321ae7 authored by Leigh B Stoller's avatar Leigh B Stoller

Minor tweaks so I can add switches easily.

parent 1270ab88
......@@ -291,8 +291,12 @@ sub Create($$$$)
print STDERR "*** No virtnode_capacity for $type! Using zero.\n";
$virtnode_capacity = 0;
}
if ($isremote) {
$osid = 0;
if ($typeinfo->isswitch()) {
$osid = "NULL";
$opmode = "ALWAYSUP";
}
elsif ($isremote) {
$osid = "NULL";
$opmode = "";
if (defined($typeinfo->default_osid())) {
......@@ -330,7 +334,7 @@ sub Create($$$$)
}
}
else {
$osid = 0;
$osid = "NULL";
$opmode = "";
}
$state = $STATE_INITIAL;
......@@ -370,7 +374,7 @@ sub Create($$$$)
" phys_nodeid='$node_id', role='$role', ".
" priority=$priority, " .
" eventstate='$state', op_mode='$opmode', " .
" def_boot_osid='$osid', " .
" def_boot_osid=$osid, " .
" inception=now(), uuid=$uuid, ".
" state_timestamp=unix_timestamp(NOW()), " .
" op_mode_timestamp=unix_timestamp(NOW())")) {
......
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