'Set a cgroup parameter and return its value'

def cgroupSet(self, param, value, resource='cpu'):

    cmd = ('cgset    -r    %s.%s=%s    /%s' % (resource, param, value, self.name))
    quietRun(cmd)
    nvalue = int(self.cgroupGet(param, resource))
    if (nvalue != value):
        error(('***    error:    cgroupSet:    %s    set    to    %s    instead    of    %s\n' % (param, nvalue, value)))
    return nvalue
