'Update the name, description and metadata for volume type.'

def handle_update(self, json_snippet, tmpl_diff, prop_diff):

    update_args = {}
    is_public = self.properties[self.IS_PUBLIC]
    if (self.DESCRIPTION in prop_diff):
        update_args['description'] = prop_diff.get(self.DESCRIPTION)
    if (self.NAME in prop_diff):
        update_args['name'] = prop_diff.get(self.NAME)
    if (self.IS_PUBLIC in prop_diff):
        is_public = prop_diff.get(self.IS_PUBLIC)
        update_args['is_public'] = is_public
    if update_args:
        self.client().volume_types.update(self.resource_id, **update_args)
    if (self.METADATA in prop_diff):
        volume_type = self.client().volume_types.get(self.resource_id)
        old_keys = volume_type.get_keys()
        volume_type.unset_keys(old_keys)
        new_keys = prop_diff.get(self.METADATA)
        if (new_keys is not None):
            volume_type.set_keys(new_keys)
    if ((self.PROJECTS in prop_diff) and (not is_public)):
        old_access_list = self.client().volume_type_access.list(self.resource_id)
        old_projects = [ac.to_dict()['project_id'] for ac in old_access_list]
        new_projects = prop_diff.get(self.PROJECTS)
        for project_id in (set(old_projects) - set(new_projects)):
            self.client().volume_type_access.remove_project_access(self.resource_id, project_id)
        self._add_projects_access((set(new_projects) - set(old_projects)))
