tests.system.amazon.aws.utils.ec2

函数

get_default_vpc_id()

返回账户的默认 VPC 的 VPC ID。

create_address_allocation()

分配一个新的 IP 地址

create_nat_gateway(allocation_id, subnet_id)

创建一个 NAT 网关

create_route_table(vpc_id, nat_gateway_id, test_name)

为私有子网创建一个路由表。

create_private_subnets(vpc_id, route_table_id, test_name)

Fargate Profiles 需要两个不同可用区中的两个私有子网。

delete_subnets(subnets)

delete_route_table(route_table_id)

delete_nat_gateway(nat_gateway_id)

remove_address_allocation(allocation_id)

模块内容

tests.system.amazon.aws.utils.ec2.get_default_vpc_id()[source]

返回账户的默认 VPC 的 VPC ID。

tests.system.amazon.aws.utils.ec2.create_address_allocation()[source]

分配一个新的 IP 地址

tests.system.amazon.aws.utils.ec2.create_nat_gateway(allocation_id, subnet_id)[source]

创建一个 NAT 网关

tests.system.amazon.aws.utils.ec2.create_route_table(vpc_id, nat_gateway_id, test_name)[source]

为私有子网创建一个路由表。

tests.system.amazon.aws.utils.ec2.create_private_subnets(vpc_id, route_table_id, test_name, number_to_make=1, cidr_block=None)[source]

Fargate Profiles 需要两个不同可用区中的两个私有子网。这些子网还需要通过 NAT 网关实现一个到互联网的出口路由。

tests.system.amazon.aws.utils.ec2.delete_subnets(subnets)[source]
tests.system.amazon.aws.utils.ec2.delete_route_table(route_table_id)[source]
tests.system.amazon.aws.utils.ec2.delete_nat_gateway(nat_gateway_id)[source]
tests.system.amazon.aws.utils.ec2.remove_address_allocation(allocation_id)[source]

本条目有帮助吗?