Scalr\Modules\Platforms\Cloudstack\CloudstackPlatformModule::RemoveServerSnapshot PHP Method

RemoveServerSnapshot() public method

See also: Scalr\Modules\PlatformModuleInterface::RemoveServerSnapshot()
public RemoveServerSnapshot ( Image $image )
$image Scalr\Model\Entity\Image
    public function RemoveServerSnapshot(Image $image)
    {
        if (!$image->getEnvironment()) {
            return true;
        }
        $cs = $image->getEnvironment()->cloudstack($this->platform);
        try {
            $cs->template->delete($image->id, $image->cloudLocation);
        } catch (Exception $e) {
            throw $e;
        }
        return true;
    }