动态加速接口
更新时间:2023-05-16
配置动态加速服务
def test_set_dsa(c):
"""
test set dsa
"""
action = "enable"
response = c.set_dsa(action)
print(response)
查询动态加速域名列表
def test_get_dsa_domains(c):
"""
get dsa domain list
"""
response = c.get_dsa_domains()
print(response)
配置域名动态加速规则
def test_set_domain_dsa(c):
"""
test set domain dsa
"""
dsa = {
"enabled":True,
"rules":[
{
"type":"suffix",
"value":".mp4;.jpg;.php"
},
{
"type":"path",
"value":"/path"
},
{
"type":"exactPath",
"value":"/path/to/file.mp4"
}
],
"comment":"test"
}
domain = 'test-sdk.sys-qa.com'
response = c.set_domain_dsa(domain, dsa);
print(response)