]> xenbits.xensource.com Git - osstest.git/commitdiff
Executive: Abolish use of the `configdb' flight-61994 flight-62072 flight-62127 flight-62128 flight-62129 flight-62131 flight-62132 flight-62139 flight-62140 flight-62141 flight-62142 flight-62144 flight-62145 flight-62146 flight-62147 flight-62148 flight-62149 flight-62150 flight-62151 flight-62152 flight-62153 flight-62154 flight-62155 flight-62156 flight-62157 flight-62158 flight-62159 flight-62161 flight-62163 flight-62164 flight-62167 flight-62168 flight-62169 flight-62170 flight-62171 flight-62172 flight-62173 flight-62174 flight-62175 flight-62176 flight-62177 flight-62178 flight-62179 flight-62180 flight-62181 flight-62182 flight-62183 flight-62184 flight-62185 flight-62186 flight-62187 flight-62188 flight-62189 flight-62190 flight-62191 flight-62192 flight-62193 flight-62194 flight-62195 flight-62196 flight-62197 flight-62198 flight-62199 flight-62200 flight-62201 flight-62202 flight-62203 flight-62204 flight-62205 flight-62206 flight-62207 flight-62208 flight-62209 flight-62210 flight-62211 flight-62212 flight-62213 flight-62214 flight-62215 flight-62216 flight-62218 flight-62219 flight-62220 flight-62221 flight-62222 flight-62223 flight-62224 flight-62225 flight-62226 flight-62227 flight-62228 flight-62229 flight-62230
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 14 Sep 2015 10:55:08 +0000 (11:55 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 14 Sep 2015 11:21:02 +0000 (12:21 +0100)
This was a database used by networking infrastructure on the
now-obsolete XenClient network in the Citrix Cambridge office (which
used some management tools developed by Mythic Beasts).

The production database in Cambridge no longer has the configdb, and
both instances have `HostDB_Executive_NoConfigDB 1' in the
configuration.  We think it very unlikely that anyone has as similar
arrangement.

Remove all the code for accessing this database.  We leave the config
settings `NoConfigDB' for now, for the benefit of ad-hoc trees which
are not immediately updated but which use their site's official
production-config.  They can be deleted later.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Osstest/HostDB/Executive.pm

index 3fa99823c883bbf399c9a3d24add1973097cc65b..3e5eca26277204ae964cb26c9f10375ae04d6a0f 100644 (file)
@@ -98,34 +98,8 @@ END
 sub default_methods ($$) {
     my ($hd, $ho) = @_;
 
-    return if $ho->{Flags}{'no-reinstall'};
-    return if $ho->{Ether} && $ho->{Power};
-
-    return if $c{HostDB_Executive_NoConfigDB};
-
-    my $dbh_config= opendb('configdb');
-    my $selname= $ho->{Fqdn};
-    my $sth= $dbh_config->prepare(<<END);
-            SELECT * FROM ips WHERE reverse_dns = ?
-END
-    $sth->execute($selname);
-    my $row= $sth->fetchrow_hashref();
-    my $name= $ho->{Name};
-    die "$ho->{Ident} $name $selname ?" unless $row;
-    die if $sth->fetchrow_hashref();
-    $sth->finish();
-    my $get= sub {
-       my ($k,$nowarn) = @_;
-       my $v= $row->{$k};
-       defined $v or $nowarn or
-           warn "host $name: undefined $k in configdb::ips\n";
-       return $v;
-    };
-    $ho->{Asset}= $get->('asset',1);
-    $ho->{Ether} ||= $get->('hardware');
-    $ho->{Power} ||= "statedb $ho->{Asset}";
-    push @{ $ho->{Info} }, "(asset=$ho->{Asset})" if defined $ho->{Asset};
-    $dbh_config->disconnect();
+    # We used to look things up in the Mythic Beasts style configdb
+    # here.  But that is gone now.
 }
 
 1;