diff --git a/02-Keyword/tsg_bfapi/policy_object/Object.robot b/02-Keyword/tsg_bfapi/policy_object/Object.robot index e14ba07..ccfc058 100644 --- a/02-Keyword/tsg_bfapi/policy_object/Object.robot +++ b/02-Keyword/tsg_bfapi/policy_object/Object.robot @@ -106,6 +106,7 @@ ImportObject ... objectType对象类型 ... objectSubType对象子类型 ... objectName对象名称 + ... jira CHON-12导入限制需求支持 [Arguments] ${filePath} ${fileName} ${objectType} ${objectSubType} ${objectName} Directory Should Exist ${path} File Should Exist ${path}/${filePath}/${fileName} @@ -118,6 +119,7 @@ ImportObject ${lines} CountLines ${path}/${filePath}/${fileName} #总数超过一定数据量测试不通过 ${total1} Evaluate ${total}+${lines} + #jira CHON-12导入限制需求支持 Run Keyword If "${objectType}"=="url" and ${total1}>1000000 Fail 当前已经存在item个数${total},待导入个数${lines},总数超过100万条! ... ELSE IF ${total1}>100000 Fail 当前已经存在item个数${total},待导入个数${lines},总数超过10万条! ${objectSubType} Run Keyword If "${objectType}"=="ip" and "${objectSubType}"=="${EMPTY}" Set Variable endpoint diff --git a/02-Keyword/tsg_bfapi/policy_object/Policy.robot b/02-Keyword/tsg_bfapi/policy_object/Policy.robot index bb8e113..aa96408 100644 --- a/02-Keyword/tsg_bfapi/policy_object/Policy.robot +++ b/02-Keyword/tsg_bfapi/policy_object/Policy.robot @@ -106,6 +106,7 @@ DeletePolicy1 ImportPolicy [Documentation] ... 策略导入 + ... jira CHON-12导入限制需求支持 [Arguments] ${filePath} ${fileName} ${policyType} Directory Should Exist ${path} File Should Exist ${path}/${filePath}/${fileName} @@ -118,6 +119,7 @@ ImportPolicy #查询已经导入的非内置策略的数量 ${totalExists} GetPolicyTotal 2 ${calTotal} Evaluate ${totalNum} + ${totalExists} + #jira CHON-12导入限制需求支持 Run Keyword If ${calTotal}>1000000 Fail 当前已经存在策略条数${totalExists},待导入条数${totalNum},总数超过100万条! ${binFile} Evaluate (r'import_policy.json',open(r"${path}/${filePath}/${fileName}",'rb'),'application/json') Log ${binFile}