public function RemoveServerSnapshot(DBRole $DBRole)
{
foreach ($DBRole->getImageId(SERVER_PLATFORMS::OPENSTACK) as $location => $imageId) {
$osClient = $this->getOsClient($DBRole->getEnvironmentObject(), $location);
try {
$osClient->imageDelete($imageId);
} catch (Exception $e) {
if (stristr($e->getMessage(), "Cannot destroy a destroyed snapshot")) {
return true;
} else {
throw $e;
}
}
}
return true;
}