Commit 51e4c143 authored by Jonathon Duerig's avatar Jonathon Duerig

ptopgen now handles the RHL-STD OS gracefully when printing disk image info.

parent 3533283b
......@@ -415,6 +415,10 @@ if ($pid) {
$osidquery .= " or'$pid'";
my $defaultosidquery = 'select distinct o.osid, t.type, o.osname,, o.OS, o.version, o.description, o.protogeni_export '.
'from os_info as o left join node_type_attributes as t '.
'on (o.osid=t.attrvalue) where t.attrkey="default_osid"';
# For subOS support (i.e., vnode OSes running atop vhost OSes), we have to
# check both the subosid and all the parent_osid it can run on.
......@@ -434,19 +438,28 @@ if ($pid) {
$subosidquery .= ")";
my %node_type_osids;
my %osid_node_types;
my %osid_subosids;
my %osid_name;
my %osid_pid;
my %osid_os;
my %osid_version;
my %osid_description;
my %node_countries;
my %node_latitudes;
my %node_longitudes;
our %node_type_osids;
our %osid_node_types;
our %osid_subosids;
our %osid_name;
our %osid_pid;
our %osid_os;
our %osid_version;
our %osid_description;
our %node_countries;
our %node_latitudes;
our %node_longitudes;
$result = DBQueryFatal($osidquery);
while (my ($osid,$type,$osname,$ospid,$osos,
$result = DBQueryFatal($defaultosidquery);
sub processOs
my $result = shift(@_);
while (my ($osid,$type,$osname,$ospid,$osos,
$osversion,$osdescription,$geni) = $result->fetchrow()) {
if ($typemap{$type}) {
my $default = $typemap{$type}->{'OSID'};
......@@ -474,6 +487,7 @@ while (my ($osid,$type,$osname,$ospid,$osos,
} else {
$osid_node_types{$osid} = [$type];
# XXX Note below that for now, subosids cannot redirect to other subosids.
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