def _create_cg_with_member(vnx_gf):
    """ Helper function to create a cg with a lun

    :param vnx_gf: the vnx general test fixture
    :return: created cg
    """
    lun_name = vnx_gf.add_lun_name()
    lun = vnx_gf.pool.create_lun(lun_name)

    cg_name = vnx_gf.add_cg_name()
    cg = vnx_gf.vnx.create_cg(cg_name)
    cg.add_member(lun)
    return cg