'Return the model for the vulnerabilities of the obj object.
It will be sorted alphabetically.'

def create_vuln_model(self, obj):

    def params_to_string(params):
        "Converts    params    to    a    string,    in    case    it    gets    here    as    a    list.\n                                                It's    pretty    anoyting,    but    needed    for    backwards    compatibility.\n                                                "
        if isinstance(params, basestring):
            params_string = params
        elif isinstance(params, list):
            params_string = '    '.join(params)
        elif (params is None):
            params_string = ''
        else:
            raise TypeError
        return params_string
    model = Gtk.ListStore(str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str)
    vulns = obj.getVulns()
    for vuln in vulns:
        _type = vuln.class_signature
        if (_type == 'Vulnerability'):
            model.append([_type, vuln.getName(), vuln.getDescription(), vuln.getData(), vuln.getSeverity(), ',    '.join([str(v) for v in vuln.getRefs() if v]), vuln.getStatus(), '', '', '', '', '', '', '', '', ''])
        elif (_type == 'VulnerabilityWeb'):
            model.append([_type, vuln.getName(), vuln.getDescription(), vuln.getData(), vuln.getSeverity(), ',    '.join([str(v) for v in vuln.getRefs() if v]), vuln.getPath(), vuln.getWebsite(), vuln.getRequest(), vuln.getResponse(), vuln.getMethod(), vuln.getPname(), params_to_string(vuln.getParams()), vuln.getQuery(), vuln.getStatus(), ''])
    sorted_model = Gtk.TreeModelSort(model=model)
    sorted_model.set_sort_column_id(1, Gtk.SortType.ASCENDING)
    return sorted_model
