Beispiel #1
0
def switch_ucdn_charge_type_19(client: utest.Client, variables: dict):
    d = {"ChargeType": "traffic"}

    try:
        resp = client.ucdn().switch_ucdn_charge_type(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #2
0
def get_ucdn_domain_traffic_17(client: utest.Client, variables: dict):
    d = {"AccountType": "top"}

    try:
        resp = client.ucdn().get_ucdn_domain_traffic(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #3
0
def get_ucdn_domain_prefetch_enable_18(client: utest.Client, variables: dict):
    d = {"DomainId": variables.get("domainId")}

    try:
        resp = client.ucdn().get_ucdn_domain_prefetch_enable(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #4
0
def get_ucdn_pass_bandwidth_13(client: utest.Client, variables: dict):
    d = {"Type": variables.get("time_granule_type")}

    try:
        resp = client.ucdn().get_ucdn_pass_bandwidth(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #5
0
def get_ucdn_traffic_16(client: utest.Client, variables: dict):
    d = {}

    try:
        resp = client.ucdn().get_ucdn_traffic(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #6
0
def batch_describe_new_ucdn_domain_04(client: utest.Client, variables: dict):
    d = {}

    try:
        resp = client.ucdn().batch_describe_new_ucdn_domain(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #7
0
def prefetch_new_ucdn_domain_cache_08(client: utest.Client, variables: dict):
    d = {"UrlList": [funcs.concat("http://", variables.get("domain"), "/")]}

    try:
        resp = client.ucdn().prefetch_new_ucdn_domain_cache(d)
    except exc.RetCodeException as e:
        resp = e.json()

    variables["PrefetchCache_TaskId"] = utest.value_at_path(resp, "TaskId")
    return resp
Beispiel #8
0
def describe_new_ucdn_refresh_cache_task_10(
    client: utest.Client, variables: dict
):
    d = {"TaskId": [variables.get("PrefetchCache_TaskId")]}

    try:
        resp = client.ucdn().describe_new_ucdn_refresh_cache_task(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #9
0
def get_ucdn_domain_log_15(client: utest.Client, variables: dict):
    d = {
        "Type": variables.get("time_granule_type"),
        "DomainId": [variables.get("domainId")],
    }

    try:
        resp = client.ucdn().get_ucdn_domain_log(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #10
0
def refresh_new_ucdn_domain_cache_11(client: utest.Client, variables: dict):
    d = {
        "UrlList": [funcs.concat("http://", variables.get("domain"), "/")],
        "Type": "file",
    }

    try:
        resp = client.ucdn().refresh_new_ucdn_domain_cache(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #11
0
def get_new_ucdn_domain_http_code_07(client: utest.Client, variables: dict):
    d = {
        "Type": variables.get("time_granule_type"),
        "EndTime": funcs.get_timestamp(10),
        "BeginTime": funcs.get_timestamp(10) - 10000,
    }

    try:
        resp = client.ucdn().get_new_ucdn_domain_http_code(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
Beispiel #12
0
def get_ucdn_domain_request_num_v2_14(client: utest.Client, variables: dict):
    d = {
        "Type": variables.get("time_granule_type"),
        "EndTime": funcs.get_timestamp(10),
        "DomainId": [variables.get("domainId")],
        "BeginTime": funcs.get_timestamp(10) - 1000,
    }

    try:
        resp = client.ucdn().get_ucdn_domain_request_num_v2(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp