def split_parent(name):
    """
    Split hostgroup name in parent part and name:

    >>> split_parent("a/b/c")
    ('c', 'a/b')
    """
    if '/' in name:
        parent, name = name.rsplit('/', 1)
    else:
        return name, None
    return name, parent