77__status__ = "Production"
88__license__ = "MIT"
99
10+ import warnings
1011import requests
1112import urllib3
1213import requests .exceptions
@@ -52,6 +53,7 @@ def create_cicd_pass_criteria(self, severity, max_allowed=None, max_introduced=N
5253 :param max_allowed: The maximum number of vulnerabilities allowed for the Pass Criteria. If no value is specified there is no limit.
5354 :param max_introduced: The maximum number of new vulnerabilities in a scan for the Pass Criteria. If no value is specified there is no limit.
5455 """
56+ warnings .warn ('This function has been deprecated in ThreadFix 2.8' , DeprecationWarning )
5557 params = {'severity' : severity }
5658 if max_allowed :
5759 params ['maxAllowed' ] = max_allowed
@@ -67,6 +69,7 @@ def update_ci_cd_pass_criteria(self, cicd_id, severity, max_allowed=None, max_in
6769 :param max_allowed: The maximum number of vulnerabilities allowed for the Pass Criteria. If no value is specified there is no limit.
6870 :param max_introduced: The maximum number of new vulnerabilities in a scan for the Pass Criteria. If no value is specified there is no limit.
6971 """
72+ warnings .warn ('This function has been deprecated in ThreadFix 2.8' , DeprecationWarning )
7073 params = {'severity' : severity }
7174 if max_allowed :
7275 params ['maxAllowed' ] = max_allowed
@@ -78,20 +81,23 @@ def list_cicd_pass_criteria(self):
7881 """
7982 Lists CI/CD pass criteria
8083 """
84+ warnings .warn ('This function has been deprecated in ThreadFix 2.8' , DeprecationWarning )
8185 return self ._request ('GET' , 'rest/cicd/passCriteria' )
8286
8387 def get_cicd_pass_criteria_details (self , cicd_id ):
8488 """
8589 Returns detailed information about the specified CI/CD pass criteria
8690 :param cicd_id: CI/CD identifier
8791 """
92+ warnings .warn ('This function has been deprecated in ThreadFix 2.8' , DeprecationWarning )
8893 return self ._request ('GET' , 'rest/cicd/passCriteria/' + str (cicd_id ) + '/detail' )
8994
9095 def delete_cicd_pass_criteria (self , cicd_id ):
9196 """
9297 Deletes the specified CI/CD pass criteria
9398 :param cicd_id: CI/CD identifier
9499 """
100+ warnings .warn ('This function has been deprecated in ThreadFix 2.8' , DeprecationWarning )
95101 return self ._request ('DELETE' , 'rest/cicd/passCriteria/' + str (cicd_id ) + '/delete' )
96102
97103 def add_application_to_cicd_pass_criteria (self , pass_criteria_id , application_id ):
@@ -100,6 +106,7 @@ def add_application_to_cicd_pass_criteria(self, pass_criteria_id, application_id
100106 :param pass_criteria_id: Pass Criteria identifier
101107 :param application_id: Application identifier
102108 """
109+ warnings .warn ('This function has been deprecated in ThreadFix 2.8' , DeprecationWarning )
103110 return self ._request ('PUT' , 'rest/cicd/passCriteria/' + str (pass_criteria_id ) + '/addApplication/' + str (application_id ))
104111
105112 def remove_application_from_cicd_pass_criteria (self , pass_criteria_id , application_id ):
@@ -108,6 +115,7 @@ def remove_application_from_cicd_pass_criteria(self, pass_criteria_id, applicati
108115 :param pass_criteria_id: Pass Criteria identifier
109116 :param application_id: Application identifier
110117 """
118+ warnings .warn ('This function has been deprecated in ThreadFix 2.8' , DeprecationWarning )
111119 return self ._request ('DELETE' , 'rest/cicd/passCriteria/' + str (pass_criteria_id ) + '/removeApplication/' + str (application_id ))
112120
113121 def evaluate_cicd_pass_criteria (self , application_id , from_date = None , to_date = None ):
0 commit comments