public function isPending()
{
$this->requiresValidImage(__METHOD__);
// what are we doing?
$log = usingLog()->startAction("make sure EC2 image '{$this->amiId}' is pending");
// get the state of the image
$imageState = $this->image['State'];
if ($imageState != 'pending') {
$log->endAction("image state is '{$imageState}'");
throw new E5xx_ExpectFailed(__METHOD__, "state is 'pending'", "state is '{$imageState}'");
}
// if we get here, all is well
$log->endAction();
}