コード例 #1
0
def describe_uredis_backup_06(client: utest.Client, variables: dict):
    d = {"Region": variables.get("Region")}

    try:
        resp = client.umem().describe_uredis_backup(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #2
0
def delete_uredis_group_09(client: utest.Client, variables: dict):
    d = {
        "Region": variables.get("Region"),
        "GroupId": variables.get("group_id"),
    }

    try:
        resp = client.umem().delete_uredis_group(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #3
0
def describe_uredis_backup_url_07(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Region": variables.get("Region"),
        "BackupId": variables.get("backup_id"),
    }

    try:
        resp = client.umem().describe_uredis_backup_url(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #4
0
def modify_uredis_group_name_02(client: utest.Client, variables: dict):
    d = {
        "Region": variables.get("Region"),
        "Name": "Redis_Change",
        "GroupId": variables.get("group_id"),
    }

    try:
        resp = client.umem().modify_uredis_group_name(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #5
0
def restart_umem_cache_group_06(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Region": variables.get("Region"),
        "GroupId": variables.get("group_id"),
    }

    try:
        resp = client.umem().restart_umem_cache_group(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #6
0
def delete_umem_space_08(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "SpaceId": variables.get("Space_Id"),
        "Region": variables.get("Region"),
    }

    try:
        resp = client.umem().delete_umem_space(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #7
0
def describe_uredis_group_10(client: utest.Client, variables: dict):
    d = {
        "Region": variables.get("Region"),
        "Offset": 0,
        "Limit": 100,
        "GroupId": variables.get("group_id"),
    }

    try:
        resp = client.umem().describe_uredis_group(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #8
0
def modify_umem_space_name_03(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "SpaceId": variables.get("Space_Id"),
        "Region": variables.get("Region"),
        "Name": "Rename_FBS",
    }

    try:
        resp = client.umem().modify_umem_space_name(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #9
0
def resize_uredis_group_04(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Size": 2,
        "Region": variables.get("Region"),
        "GroupId": variables.get("group_id"),
    }

    try:
        resp = client.umem().resize_uredis_group(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #10
0
def describe_umem_cache_upgrade_price_04(client: utest.Client,
                                         variables: dict):
    d = {
        "Size": 2,
        "Region": variables.get("Region"),
        "GroupId": variables.get("group_id"),
    }

    try:
        resp = client.umem().describe_umem_cache_upgrade_price(d)
    except exc.RetCodeException as e:
        resp = e.json()

    variables["UpgradePrice"] = utest.value_at_path(resp, "Price")
    return resp
コード例 #11
0
def describe_umem_space_05(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "SpaceId": variables.get("Space_Id"),
        "Region": variables.get("Region"),
        "Offset": 0,
        "Limit": 100,
    }

    try:
        resp = client.umem().describe_umem_space(d)
    except exc.RetCodeException as e:
        resp = e.json()

    return resp
コード例 #12
0
def describe_umem_upgrade_price_04(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Type": "double",
        "SpaceId": variables.get("Space_Id"),
        "Size": 18,
        "Region": variables.get("Region"),
    }

    try:
        resp = client.umem().describe_umem_upgrade_price(d)
    except exc.RetCodeException as e:
        resp = e.json()

    variables["UpgradePrice"] = utest.value_at_path(resp, "Price")
    return resp
コード例 #13
0
def describe_umem_cache_price_02(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Size": 1,
        "Region": variables.get("Region"),
        "Quantity": 1,
        "ChargeType": "Month",
    }

    try:
        resp = client.umem().describe_umem_cache_price(d)
    except exc.RetCodeException as e:
        resp = e.json()

    variables["GetPrice"] = utest.value_at_path(resp, "DataSet.0.Price")
    return resp
コード例 #14
0
def create_umem_cache_group_00(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Size": 1,
        "Region": variables.get("Region"),
        "Quantity": 1,
        "Name": "umem_charge",
        "ChargeType": "Month",
    }

    try:
        resp = client.umem().create_umem_cache_group(d)
    except exc.RetCodeException as e:
        resp = e.json()

    variables["group_id"] = utest.value_at_path(resp, "GroupId")
    return resp
コード例 #15
0
def create_umem_space_00(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Size": 8,
        "Region": variables.get("Region"),
        "Quantity": 1,
        "Protocol": variables.get("Protocol"),
        "Name": variables.get("Name"),
        "ChargeType": "Month",
    }

    try:
        resp = client.umem().create_umem_space(d)
    except exc.RetCodeException as e:
        resp = e.json()

    variables["Space_Id"] = utest.value_at_path(resp, "SpaceId")
    return resp
コード例 #16
0
def create_uredis_group_01(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Size": 1,
        "Region": variables.get("Region"),
        "Quantity": 1,
        "Protocol": "redis",
        "Name": "Redis_zb",
        "HighAvailability": "disable",
        "ChargeType": "Month",
    }

    try:
        resp = client.umem().create_uredis_group(d)
    except exc.RetCodeException as e:
        resp = e.json()

    variables["group_id"] = utest.value_at_path(resp, "GroupId")
    return resp
コード例 #17
0
def create_uredis_group_00(client: utest.Client, variables: dict):
    d = {
        "Zone": variables.get("Zone"),
        "Version": variables.get("Version"),
        "Size": 1,
        "Region": variables.get("Region"),
        "Quantity": 1,
        "Protocol": variables.get("Protocol"),
        "Name": variables.get("Name"),
        "HighAvailability": variables.get("HighAvailability"),
        "ConfigId": variables.get("ConfigId"),
        "ChargeType": "Month",
        "BackupTime": 3,
        "AutoBackup": "enable",
    }

    try:
        resp = client.umem().create_uredis_group(d)
    except exc.RetCodeException as e:
        resp = e.json()

    variables["group_id"] = utest.value_at_path(resp, "GroupId")
    return resp