Commit 51693f7c authored by Leigh B Stoller's avatar Leigh B Stoller

Convert hardwired PLC URL to a (slightly less hard) sitevar.

parent 8004312d
......@@ -643,6 +643,7 @@ use Genixmlrpc;
use GeniResponse;
use GeniCertificate;
use GeniCredential;
use libEmulab;
use overload ('""' => 'Stringify');
#
......@@ -677,10 +678,15 @@ sub Create($;$$)
}
#
# XXX Hardwired to PLC.
# XXX Hardwired to PLC via sitevar.
#
my $plc_url;
if (!libEmulab::GetSiteVar('protogeni/plc_url', \$plc_url)) {
$plc_url = "https://www.planet-lab.org:12345";
}
my $self = {};
$self->{'url'} = "https://www.planet-lab.org:12345";
$self->{'url'} = $plc_url;
$self->{'urn'} = "";
$self->{'context'} = $context;
$self->{'credential'} = $credential;
......
......@@ -126,6 +126,7 @@ INSERT INTO sitevariables VALUES ('protogeni/wrapper_ch_debug_level',NULL,'0','W
INSERT INTO sitevariables VALUES ('protogeni/wrapper_cm_debug_level',NULL,'1','When set, send debugging email for CM wrapper calls',0);
INSERT INTO sitevariables VALUES ('protogeni/wrapper_am_debug_level',NULL,'1','When set, send debugging email for AM wrapper calls',0);
INSERT INTO sitevariables VALUES ('protogeni/wrapper_debug_sendlog',NULL,'1','When set, wrapper debugging email will send log files in addition to the metadata',0);
INSERT INTO sitevariables VALUES ('protogeni/plc_url',NULL,'https://www.planet-lab.org:12345','PlanetLab does not put a URL in their certificates.',0);
INSERT INTO sitevariables VALUES ('nodecheck/collect',NULL,'0','When set, collect and record node hardware info in /proj/<pid>/nodecheck/.',0);
INSERT INTO sitevariables VALUES ('nodecheck/check',NULL,'0','When set, perform nodecheck at swapin.',0);
......
#
# Add sitevar for PLC URL. Bogus.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBQueryFatal("INSERT INTO sitevariables VALUES ".
" ('protogeni/plc_url',NULL, ".
" 'https://www.planet-lab.org:12345', ".
" 'PlanetLab does not put a URL in their certificates.',0)")
if (!TBSiteVarExists("protogeni/plc_url"));
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
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