添加被引用删除case
This commit is contained in:
@@ -313,3 +313,43 @@ Decryption_Profile_Namelong128-000017
|
|||||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
|
||||||
|
Decryption_Profile_Policy_references-000018
|
||||||
|
# 创建对象
|
||||||
|
${objectedit} Create Dictionary profileName=12311233333333333333333333333333333qweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee3333333333333333333333131312312321313
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
|
||||||
|
# 创建策略
|
||||||
|
Comment 创建fqdn
|
||||||
|
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||||
|
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||||
|
${objectids} set Variable ${object_fqdn_Id}
|
||||||
|
|
||||||
|
${rescode} ${policyId} AddPolicy {"opAction":"add","returnData":1,"policyList":{"policyId":"","policyName":"133131131","policyType":"tsg_security","action":"intercept","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","effectiveRange":{"tag_sets":[[]]},"userRegion":{"protocol":"SSL","keyring":1,"decryption":${profileId},"decrypt_mirror":{"enable":0,"mirror_profile":null}},"source":[{"objectId":14982,"protocolField":"TSG_SECURITY_SOURCE_ADDR"}],"destination":[],"filterList":[{"filter":[{"objectId":14985,"protocolField":"TSG_FIELD_SSL_SNI"}]}],"appIdObjects":[3],"isValid":0,"scheduleId":[]}}
|
||||||
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||||
|
|
||||||
|
# 删除对象 失败
|
||||||
|
${response} BaseDeleteRequest /${version}/policy/profile/decryption {"profileIds":[${profileId}]}
|
||||||
|
${response_code} Get From Dictionary ${response} code
|
||||||
|
#log aaaaaaaaaa:${response_code}
|
||||||
|
Should Be Equal As Strings ${response_code} 40090007
|
||||||
|
|
||||||
|
# 删除策略
|
||||||
|
DeletePolicyAndObject ${policyIds} ${objectids}
|
||||||
|
|
||||||
|
# 删除对象 成功
|
||||||
|
${response} BaseDeleteRequest /${version}/policy/profile/decryption {"profileIds":[${profileId}]}
|
||||||
|
${response_code} Get From Dictionary ${response} code
|
||||||
|
#log aaaaaaaaaa:${response_code}
|
||||||
|
Should Be Equal As Strings ${response_code} 200
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -158,3 +158,47 @@ TrafficMirrorPolicy_Namelong128-00007
|
|||||||
log ${aaa}
|
log ${aaa}
|
||||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||||
|
|
||||||
|
|
||||||
|
TrafficMirrorPolicy_Policy_references-00008
|
||||||
|
# 创建对象
|
||||||
|
${list} Create List 13:13:13:13:13:13 13:13:13:13:13:13
|
||||||
|
${objectedit} Create Dictionary profileName=1 addrType=mac addrArray=${list}
|
||||||
|
Comment 打印需要修改的json内容
|
||||||
|
log ${objectedit}
|
||||||
|
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||||
|
log ${objectDict}
|
||||||
|
${response} CreateRequest ${url} ${objectDict}
|
||||||
|
# 查询
|
||||||
|
log ${response}
|
||||||
|
${profileId} Get From Dictionary ${response} profileId
|
||||||
|
|
||||||
|
# 创建策略
|
||||||
|
Comment 创建fqdn
|
||||||
|
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||||
|
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||||
|
${objectids} set Variable ${object_fqdn_Id}
|
||||||
|
|
||||||
|
${rescode} ${policyId} AddPolicy {"opAction":"add","returnData":1,"policyList":{"policyId":"","policyName":"qewqeqwewqe","policyType":"tsg_security","action":"intercept","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","effectiveRange":{"tag_sets":[[]]},"userRegion":{"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":1,"mirror_profile":${profileId}}},"source":[{"objectId":14920,"protocolField":"TSG_SECURITY_SOURCE_ADDR"}],"destination":[],"filterList":[{"filter":[{"objectId":14985,"protocolField":"TSG_FIELD_SSL_SNI"}]}],"appIdObjects":[3],"isValid":1,"scheduleId":[]}}
|
||||||
|
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||||
|
# 删除对象 失败
|
||||||
|
${response} BaseDeleteRequest /${version}/policy/profile/trafficmirror {"profileIds":[${profileId}]}
|
||||||
|
${response_code} Get From Dictionary ${response} code
|
||||||
|
#log aaaaaaaaaa:${response_code}
|
||||||
|
Should Be Equal As Strings ${response_code} 40090030
|
||||||
|
|
||||||
|
# 删除策略
|
||||||
|
DeletePolicyAndObject ${policyIds} ${objectids}
|
||||||
|
|
||||||
|
# 删除对象 成功
|
||||||
|
${response} BaseDeleteRequest /${version}/policy/profile/trafficmirror {"profileIds":[${profileId}]}
|
||||||
|
${response_code} Get From Dictionary ${response} code
|
||||||
|
#log aaaaaaaaaa:${response_code}
|
||||||
|
Should Be Equal As Strings ${response_code} 200
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user