Commit 41412a58 authored by Leigh Stoller's avatar Leigh Stoller

Insert the default_osid node_type_attributes when creating the type.

parent fc5354e2
......@@ -151,6 +151,7 @@ exit(0);
sub CreateType($$)
{
my ($type, $isvirt) = @_;
my $osid = ($isvirt ? $osinfo_vm->osid() : $osinfo->osid());
#
# Defaults work for almost everything.
......@@ -171,6 +172,8 @@ sub CreateType($$)
if ($debug || $impotent) {
print "Adding false attributes rebootable/imageable\n";
print "Adding true attribute fakenode\n";
print "Setting default osid: " .
($isvirt ? $osinfo_vm->osname() : $osinfo->osname()) . "\n";
}
if (!$impotent) {
DBQueryFatal("replace into node_type_attributes values ".
......@@ -179,6 +182,8 @@ sub CreateType($$)
" ('$type','imageable','0','boolean')");
DBQueryFatal("replace into node_type_attributes values ".
" ('$type','fakenode','1','boolean')");
DBQueryFatal("replace into node_type_attributes values ".
" ('$type','default_osid','$osid','integer')");
}
return 0;
}
......
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