'Delete all cgroups in the module'

def cgdelete_all_cgroups(self):

    try:
        for cgroup_pwd in self.cgroups:
            cgroup = self.get_cgroup_name(cgroup_pwd)
            if (cgroup.count('/') > 0):
                continue
            self.cgdelete_cgroup(cgroup, True)
    except error.CmdError:
        raise error.TestFail(('cgdelete    all    cgroups    in    %s    failed!' % self.module))
