Commit a0b1c88a authored by Mike Hibler's avatar Mike Hibler

Changes to make API calls work on 11.1-U1.

parent 7ceb76d4
#!/usr/bin/perl -wT
#
# Copyright (c) 2013-2017 University of Utah and the Flux Group.
# Copyright (c) 2013-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -513,26 +513,19 @@ sub freenasVolumeCreate($$$;$)
"POST", undef,
{"name" => "$volname",
"volsize" => "${size}M",
"compression" => "off",
"sparse" => $sparsearg },
undef, \$msg);
202, \$msg);
if (!$res) {
if ($msg) {
warn("*** ERROR: freenasVolumeCreate: ".
"volume creation failed:\n$msg");
"volume '$pool/$volname' creation failed:\n$msg");
} else {
warn("*** ERROR: freenasVolumeCreate: volume creation failed");
}
return -1;
}
# Make sure compression is disabled. Could be an option?
$res =
freenasRequest("$FREENAS_API_RESOURCE_VOLUME/${pool}/zvols/${volname}",
"PUT", undef, { "compression" => "off" });
if (!$res) {
warn("*** ERROR: freenasVolumeCreate: could not disable compression");
}
return 0;
}
......
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