'Extract an identifier from the image'

def _get_image_ident(self, ident):

    if (not ident):
        return ''
    if ('@' in ident):
        return ident.split('@')[0].split('/')[(-1)]
    elif (ident.count(':') > 1):
        return ident.split(':')[1].split('/')[(-1)]
    else:
        return ident.split(':')[0].split('/')[(-1)]
