Commit 542603fc authored by Leigh Stoller's avatar Leigh Stoller

Minor shuffling of Geni library includes.

parent 8030b89f
......@@ -31,7 +31,6 @@ use Carp;
use POSIX;
use XML::LibXML;
use XML::Simple;
use GeniXML;
# Configure variables
my $TB = "@prefix@";
......@@ -47,9 +46,7 @@ my $OURDOMAIN = "@OURDOMAIN@";
my $cmid = '';
if ($PGENISUPPORT) {
require libGeni;
require GeniHRN;
$cmid = GeniHRN::Generate($OURDOMAIN, "authority", "cm");
}
# Flags.
......@@ -1012,6 +1009,7 @@ sub LoadCurrentResources($)
sub LoadVirtNodes($)
{
my ($self) = @_;
my $gotgeninodes = 0;
$self->printdb("Loading virtual nodes\n");
......@@ -1083,6 +1081,9 @@ sub LoadVirtNodes($)
# Mark this as being a virtual typed node.
$vnode->_isvtyped($isvtyped);
# dynamic inclusion below.
$gotgeninodes++ if ($isgeni);
# All this info is stashed in our local object.
$vnode->_nodeweight(undef);
$vnode->_isremotenode($isremote);
......@@ -1267,6 +1268,18 @@ sub LoadVirtNodes($)
# Add to the list.
$self->vnodes()->{$vname} = $vnode;
}
if ($gotgeninodes) {
if ($PGENISUPPORT) {
require libGeni;
require GeniXML;
import GeniXML;
$cmid = GeniHRN::Generate($OURDOMAIN, "authority", "cm");
}
else {
tberror("Using geni nodes but PROTOGENI_SUPPORT is not defined\n");
return -1;
}
}
#
# Go back and look for any VMs that were fixed to nodes. Need to make
......
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