Commit a7659c66 authored by Leigh Stoller's avatar Leigh Stoller

Minor fix to blockstores. Add feature/desire support.

parent b18ef666
......@@ -283,12 +283,13 @@ foreach my $noderef (GeniXML::FindNodes("n:node", $rspec)->get_nodelist()) {
if ($class eq "remote") {
Add("Blockstores['$bsname'] = Nodes['$client_id']");
# Reset cause we did not know it above.
Add("Blockstores['$bsname'].mountpount = '$mount'");
# Reset cause we did not know it above. Note that the setter
# is not working, not sure why.
Add("Blockstores['$bsname']._bs.mount = '$mount'");
}
else {
Add("Blockstores['$bsname'] = " .
"IG.Blockstore('$bsname', '$mount')");
"Nodes['$client_id'].Blockstore('$bsname', '$mount')");
}
if (defined($readonly) && $readonly) {
Add("Blockstores['$bsname'].readonly = True");
......@@ -303,6 +304,16 @@ foreach my $noderef (GeniXML::FindNodes("n:node", $rspec)->get_nodelist()) {
Add("Blockstores['$bsname'].dataset = '$dataset'");
}
}
#
# Desires.
#
foreach my $desire (GeniXML::FindNodesNS("n:fd", $noderef,
$GeniXML::EMULAB_NS)->get_nodelist()) {
my $name = GeniXML::GetText("name", $desire);
my $weight = GeniXML::GetText("weight", $desire);
Add("Nodes['${client_id}'].Desire('$name','$weight')");
}
Add("Rspec.addResource(Nodes['${client_id}'])\n");
}
#
......
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