'Get cgroup\'s index in cgroups
:param: cgroup: cgroup name
:return: index of cgroup'

def get_cgroup_index(self, cgroup):

    try:
        if (self.__get_cgroup_pwd(cgroup) not in self.cgroups):
            raise error.TestFail(('%s    not    exists!' % cgroup))
        cgroup_pwd = self.__get_cgroup_pwd(cgroup)
        return self.cgroups.index(cgroup_pwd)
    except error.CmdError:
        raise error.TestFail('Find    index    failed!')
