'Function used to add or remove volumes from consistency group.
It will update the consistency group with given volumes
:param uri: URI of the consistency group
:param project: Name of the project path
:param tenant: Container tenant name
:param add_volumes: volumes to be added to the consistency group
:param remove_volumes: volumes to be removed from CG
:param sync: synchronous request
:param synctimeout: Query for task status for \'synctimeout\' secs.
If the task doesn\'t complete in synctimeout
secs, an exception is thrown
:returns: status of creation'

def update(self, uri, project, tenant, add_volumes, remove_volumes, sync, synctimeout=0):

    if (tenant is None):
        tenant = ''
    parms = []
    add_voluris = []
    remove_voluris = []
    from cinder.volume.drivers.coprhd.helpers.volume import Volume
    volobj = Volume(self.ipaddr, self.port)
    if add_volumes:
        for volname in add_volumes:
            full_project_name = ((tenant + '/') + project)
            add_voluris.append(volobj.volume_query(full_project_name, volname))
        volumes = {'volume': add_voluris}
        parms = {'add_volumes': volumes}
    if remove_volumes:
        for volname in remove_volumes:
            full_project_name = ((tenant + '/') + project)
            remove_voluris.append(volobj.volume_query(full_project_name, volname))
        volumes = {'volume': remove_voluris}
        parms = {'remove_volumes': volumes}
    body = oslo_serialization.jsonutils.dumps(parms)
    (s, h) = common.service_json_request(self.ipaddr, self.port, 'PUT', self.URI_CONSISTENCY_GROUPS_INSTANCE.format(uri), body)
    o = common.json_decode(s)
    if sync:
        return self.check_for_sync(o, sync, synctimeout)
    else:
        return o
