def test_set_302(client, variables): scenario.initial(variables) scenario.variables["tag"] = "tag_api_test" scenario.variables["remark"] = "remark_api_test" scenario.variables["fw_name_1"] = funcs.concat( "fw_A_", funcs.get_timestamp(13), "_" ) scenario.variables["fw_rule_1_protocol"] = "TCP" scenario.variables["fw_rule_1_port"] = 1111 scenario.variables["fw_rule_1_srcip"] = "0.0.0.0/0" scenario.variables["fw_rule_1_action"] = "ACCEPT" scenario.variables["fw_rule_1_priority"] = "HIGH" scenario.variables["uhost_name_1"] = "firewall_api_test" scenario.variables["fw_rule_2_protocol"] = "UDP" scenario.variables["fw_rule_2_port"] = 2222 scenario.variables["fw_rule_2_srcip"] = "10.0.0.0/8" scenario.variables["fw_rule_2_action"] = "DROP" scenario.variables["fw_rule_2_priority"] = "LOW" scenario.variables["fw_name_2"] = funcs.concat( "fw_B_", funcs.get_timestamp(13), "_" ) scenario.variables["tag_2"] = "tag_api_test_3" scenario.variables["remark_2"] = "remark_api_test_3" scenario.variables["Image_Id"] = "#{u_get_image_resource($Region,$Zone)}" scenario.variables["recommend_web"] = "recommend web" scenario.variables["fw_rule_1"] = "TCP|1111|0.0.0.0/0|ACCEPT|HIGH" scenario.variables["fw_rule_2"] = "UDP|2222|10.0.0.0/8|DROP|LOW" scenario.run(client)
def test_scenario_5292(ustack_client, variables): scenario.store.update(variables) scenario.store["Region"] = "cn" scenario.store["Zone"] = "zone-01" scenario.store["BeginTime"] = funcs.get_timestamp(10) - 3600 scenario.store["EndTime"] = funcs.get_timestamp(10) describe_vpc_00(ustack_client) describe_security_group_01(ustack_client) describe_vm_type_02(ustack_client) describe_storage_type_03(ustack_client) describe_image_04(ustack_client) create_vm_instance_05(ustack_client) create_vm_instance_06(ustack_client) describe_vm_instance_07(ustack_client) describe_vm_instance_08(ustack_client) create_certificate_09(ustack_client) create_certificate_10(ustack_client) describe_certificate_11(ustack_client) describe_certificate_12(ustack_client) create_lb_13(ustack_client) describe_lb_14(ustack_client) create_vs_15(ustack_client) create_rs_16(ustack_client) describe_rs_17(ustack_client) update_vs_18(ustack_client) delete_rs_19(ustack_client) delete_vs_20(ustack_client) describe_op_logs_21(ustack_client) delete_lb_22(ustack_client) delete_certificate_23(ustack_client) delete_certificate_24(ustack_client) poweroff_vm_instance_25(ustack_client) poweroff_vm_instance_26(ustack_client) delete_vm_instance_27(ustack_client) delete_vm_instance_28(ustack_client)
def get_new_ucdn_domain_http_code_07(client, variables): 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
def get_ucdn_domain_request_num_v2_14(client, variables): 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
def describe_order_detail_info_03(client, variables): d = { "ResourceIds": [variables.get("group_id")], "QueryAll": True, "OrderTypes": ["OT_BUY"], "OrderStates": ["OS_FINISHED"], "EndTime": funcs.get_timestamp(10), "BeginTime": funcs.get_timestamp(10) - 1200, } try: resp = client.invoke("DescribeOrderDetailInfo", d) except exc.RetCodeException as e: resp = e.json() return resp
def describe_order_detail_info_09(client: utest.Client, variables: dict): d = { "ResourceIds": [variables.get("Space_Id")], "QueryAll": True, "OrderTypes": ["OT_RENEW"], "OrderStates": ["OS_FINISHED"], "EndTime": funcs.get_timestamp(10), "ChargeTypes": ["Month"], "BeginTime": funcs.get_timestamp(10) - 1200, } try: resp = client.invoke("DescribeOrderDetailInfo", d) except exc.RetCodeException as e: resp = e.json() return resp
def test_set_4140(client: utest.Client, variables: dict): scenario.initial(variables) scenario.variables["BucketName_test"] = funcs.concat( "ucdntest-", funcs.get_timestamp(10) ) scenario.variables["time_granule_type"] = 1 scenario.run(client)
def create_bandwidth_package_04(client, variables): d = { "TimeRange": 2, "Region": variables.get("Region"), "EnableTime": 30 + funcs.get_timestamp(10), "EIPId": variables.get("eip_id"), "Bandwidth": variables.get("bwp1_bw"), } try: resp = client.unet().create_bandwidth_package(d) except exc.RetCodeException as e: resp = e.json() variables["bwp_id1"] = utest.value_at_path(resp, "BandwidthPackageId") return resp
def test_scenario_5292(ustack_client, variables): scenario.store.update(variables) scenario.store["Region"] = "cn" scenario.store["Zone"] = "zone-01" scenario.store["BeginTime"] = funcs.get_timestamp(10, ) - 3600 scenario.store["EndTime"] = funcs.get_timestamp(10, ) # 查询VPC信息 describe_vpc_00(ustack_client) # 查询安全组信息 describe_security_group_01(ustack_client) # 查询主机机型 describe_vm_type_02(ustack_client) # 查询存储类型 describe_storage_type_03(ustack_client) # 获取镜像信息,包括默认镜像和自制镜像。 describe_image_04(ustack_client) # 创建虚拟机 create_vm_instance_05(ustack_client) # 创建虚拟机 create_vm_instance_06(ustack_client) # 查询虚拟机 describe_vm_instance_07(ustack_client) # 查询虚拟机 describe_vm_instance_08(ustack_client) # 创建证书 create_certificate_09(ustack_client) # 创建证书 create_certificate_10(ustack_client) # 查询证书 describe_certificate_11(ustack_client) # 查询证书 describe_certificate_12(ustack_client) # 创建负载均衡 create_lb_13(ustack_client) # 获取负载均衡信息 describe_lb_14(ustack_client) # 创建负载均衡VServer create_vs_15(ustack_client) # 添加服务节点 create_rs_16(ustack_client) # 获取服务节点信息 describe_rs_17(ustack_client) # 修改负载均衡VServer update_vs_18(ustack_client) # 移除服务节点 delete_rs_19(ustack_client) # 删除VServer delete_vs_20(ustack_client) # 查询操作日志 describe_op_logs_21(ustack_client) # 删除负载均衡 delete_lb_22(ustack_client) # 删除证书 delete_certificate_23(ustack_client) # 删除证书 delete_certificate_24(ustack_client) # 断电虚拟机 poweroff_vm_instance_25(ustack_client) # 断电虚拟机 poweroff_vm_instance_26(ustack_client) # 删除虚拟机 delete_vm_instance_27(ustack_client) # 删除虚拟机 delete_vm_instance_28(ustack_client)
def test_scenario_5183(ustack_client, variables): scenario.store.update(variables) scenario.store["Region"] = "cn" scenario.store["Zone"] = "zone-01" scenario.store["BeginTime"] = funcs.get_timestamp(10,) - 3600 scenario.store["EndTime"] = funcs.get_timestamp(10,) # 查询VPC信息 describe_vpc_00(ustack_client) # 查询安全组信息 describe_security_group_01(ustack_client) # 查询存储类型 describe_storage_type_02(ustack_client) # 查询主机机型 describe_vm_type_03(ustack_client) # 获取镜像信息,包括默认镜像和自制镜像。 describe_image_04(ustack_client) # 获取镜像信息,包括默认镜像和自制镜像。 describe_image_05(ustack_client) # 创建虚拟机 create_vm_instance_06(ustack_client) # 查询虚拟机 describe_vm_instance_07(ustack_client) # 申请外网IP allocate_eip_08(ustack_client) # 创建负载均衡 create_lb_09(ustack_client) # 获取负载均衡信息 describe_lb_10(ustack_client) # 创建负载均衡VServer create_vs_11(ustack_client) # 修改负载均衡VServer update_vs_12(ustack_client) # 添加服务节点 create_rs_13(ustack_client) # 修改服务节点 update_rs_14(ustack_client) # 获取服务节点信息 describe_rs_15(ustack_client) # 禁用服务节点 disable_rs_16(ustack_client) # 获取服务节点信息 describe_rs_17(ustack_client) # 启用服务节点 enable_rs_18(ustack_client) # 获取服务节点信息 describe_rs_19(ustack_client) # 创建内容转发规则 create_vs_policy_20(ustack_client) # 获取内容转发规则信息 describe_vs_policy_21(ustack_client) # 更新内容转发规则 update_vs_policy_22(ustack_client) # 删除内容转发规则 delete_vs_policy_23(ustack_client) # 移除服务节点 delete_rs_24(ustack_client) # 断电虚拟机 poweroff_vm_instance_25(ustack_client) # 删除虚拟机 delete_vm_instance_26(ustack_client) # 删除负载均衡 delete_lb_27(ustack_client)