Commit 2e1d8d2f authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Don't hardwire to placement=ANY.

parent c3698d92
......@@ -6823,6 +6823,7 @@ sub HandleBlockstore($$$$$$@)
my $readonly = GeniXML::GetText("readonly", $blockref);
my $leasename = GeniXML::GetText("persistent", $blockref);
my $dataset_id= GeniXML::GetText("dataset", $blockref);
my $placement = GeniXML::GetText("placement", $blockref);
my $type = "";
my $fixed = $nodename;
my $size = 0;
......@@ -6848,6 +6849,16 @@ sub HandleBlockstore($$$$$$@)
else {
$readonly = ($readonly eq "true" ? 1 : 0);
}
if (defined($placement)) {
if (lc($placement) !~ /^(any|sysvol|nonsysvol)$/i) {
$message = "Improper placement: $placement";
goto bad;
}
$placement = uc($placement);
}
else {
$placement = "ANY";
}
#
# If ephemeral, size must be given. Else we get it below from the lease,
# or we get it from the image if its an image backed blockstore.
......@@ -6936,7 +6947,7 @@ sub HandleBlockstore($$$$$$@)
}
}
push(@attributes, ["mountpoint", $mount, 0]);
push(@attributes, ["placement", "ANY", 0]);
push(@attributes, ["placement", $placement, 0]);
push(@attributes, ["readonly", $readonly, 0]);
push(@attributes, ["class", ($class eq "local" ? "local" : "SAN"), 1]);
......
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