def delete_vpc_16(client: utest.Client, variables: dict): d = {"VPCId": variables.get("vpc_id"), "Region": variables.get("Region")} try: resp = client.vpc().delete_vpc(d) except exc.RetCodeException as e: resp = e.json() return resp
def delete_subnet_15(client: utest.Client, variables: dict): d = { "SubnetId": variables.get("subnet_id"), "Region": variables.get("Region"), } try: resp = client.vpc().delete_subnet(d) except exc.RetCodeException as e: resp = e.json() return resp
def create_vpc_00(client: utest.Client, variables: dict): d = { "Region": variables.get("Region"), "Network": ["192.168.0.0/16"], "Name": "ulb-ssl-vpc", } try: resp = client.vpc().create_vpc(d) except exc.RetCodeException as e: resp = e.json() variables["vpc_id"] = utest.value_at_path(resp, "VPCId") return resp
def create_subnet_01(client: utest.Client, variables: dict): d = { "VPCId": variables.get("vpc_id"), "SubnetName": "ulb-ssl-subnet", "Subnet": "192.168.111.0", "Region": variables.get("Region"), } try: resp = client.vpc().create_subnet(d) except exc.RetCodeException as e: resp = e.json() variables["subnet_id"] = utest.value_at_path(resp, "SubnetId") return resp