'Returns the UID of the varray specified by the name.'

def varray_query(self, name):

    if common.is_uri(name):
        return name
    uris = self.varray_list()
    for uri in uris:
        varray = self.varray_show(uri)
        if (varray and (varray['name'] == name)):
            return varray['id']
    raise common.CoprHdError(common.CoprHdError.NOT_FOUND_ERR, (_('varray    %s:    not    found') % name))
