accept_risk rule_type, rule_value, port, proto, plugin_id, comment
        Creates an accept rick rule based on information provided.

        UN-DOCUMENTED CALL: This function is not considered stable.

        :param rule_type: Valid options: ip, asset, all.
        :type rule_type: string
        :param rule_value: IP Addresses, or assetID if not the type is not all.
        :type tule_value: string
        :param port: Port number
        :type port: string
        :param proto: Either the protocol ID or any. TCP = 6, UDP = 17, ICMP = 1
        :type proto: string
        :param plugin_id: The plugin ID
        :type plugin_id: string
        :param repo_ids: List of repository ids that the rule pertains to.
        :type repo_ids: string
        :param comment: General purpose comment field.
        :type comment: string
        :param expires: epoch time for expiration.
        :type expires: string
        :param severity: New severity rating.

def risk_rule(self, rule_type, rule_value, port, proto, plugin_id,
                  repo_ids, comment='', expires='-1', severity=None):
        '''accept_risk rule_type, rule_value, port, proto, plugin_id, comment
        Creates an accept rick rule based on information provided.

        UN-DOCUMENTED CALL: This function is not considered stable.

        :param rule_type: Valid options: ip, asset, all.
        :type rule_type: string
        :param rule_value: IP Addresses, or assetID if not the type is not all.
        :type tule_value: string
        :param port: Port number
        :type port: string
        :param proto: Either the protocol ID or any. TCP = 6, UDP = 17, ICMP = 1
        :type proto: string
        :param plugin_id: The plugin ID
        :type plugin_id: string
        :param repo_ids: List of repository ids that the rule pertains to.
        :type repo_ids: string
        :param comment: General purpose comment field.
        :type comment: string
        :param expires: epoch time for expiration.
        :type expires: string
        :param severity: New severity rating.
        '''
        data = {
            'hostType': rule_type,
            'port': port,
            'comments': comment,
            'protocol': proto,
            'pluginID': plugin_id,
            'repIDs': [{'id': i} for i in repo_ids]
        }
        if rule_type != 'all':
            data['hostValue'] = rule_value
        if severity is None:
            data['expires'] = expires
            return self.raw_query('acceptRiskRule', 'add', data=data)
        else:
            sevlevels = {'info': 0, 'low': 1, 'medium': 2, 'high': 3, 'critical': 4}
            data['severity'] = sevlevels[severity]
            return self.raw_query('recastRiskRule', 'add', data=data)