Merge 8527:8572 from trunk into the cli branch
Merge changes from trunk (8219:8527) to cli project.
freenas8-plugins -> cli.