Merge pull request #3107 from ninhkd/add-region-response-vpc-peering-connections
Fix: Ec2 - add VPCPeeringConnections region response support.
This commit is contained in:
commit
1299fef8b8
@ -86,6 +86,7 @@ DESCRIBE_VPC_PEERING_CONNECTIONS_RESPONSE = (
|
|||||||
<ownerId>777788889999</ownerId>
|
<ownerId>777788889999</ownerId>
|
||||||
<vpcId>{{ vpc_pcx.vpc.id }}</vpcId>
|
<vpcId>{{ vpc_pcx.vpc.id }}</vpcId>
|
||||||
<cidrBlock>{{ vpc_pcx.vpc.cidr_block }}</cidrBlock>
|
<cidrBlock>{{ vpc_pcx.vpc.cidr_block }}</cidrBlock>
|
||||||
|
<region>{{ vpc_pcx.vpc.ec2_backend.region_name }}</region>
|
||||||
</requesterVpcInfo>
|
</requesterVpcInfo>
|
||||||
<accepterVpcInfo>
|
<accepterVpcInfo>
|
||||||
<ownerId>"""
|
<ownerId>"""
|
||||||
@ -98,6 +99,7 @@ DESCRIBE_VPC_PEERING_CONNECTIONS_RESPONSE = (
|
|||||||
<allowEgressFromLocalVpcToRemoteClassicLink>true</allowEgressFromLocalVpcToRemoteClassicLink>
|
<allowEgressFromLocalVpcToRemoteClassicLink>true</allowEgressFromLocalVpcToRemoteClassicLink>
|
||||||
<allowDnsResolutionFromRemoteVpc>false</allowDnsResolutionFromRemoteVpc>
|
<allowDnsResolutionFromRemoteVpc>false</allowDnsResolutionFromRemoteVpc>
|
||||||
</peeringOptions>
|
</peeringOptions>
|
||||||
|
<region>{{ vpc_pcx.peer_vpc.ec2_backend.region_name }}</region>
|
||||||
</accepterVpcInfo>
|
</accepterVpcInfo>
|
||||||
<status>
|
<status>
|
||||||
<code>{{ vpc_pcx._status.code }}</code>
|
<code>{{ vpc_pcx._status.code }}</code>
|
||||||
@ -128,6 +130,7 @@ ACCEPT_VPC_PEERING_CONNECTION_RESPONSE = (
|
|||||||
<ownerId>777788889999</ownerId>
|
<ownerId>777788889999</ownerId>
|
||||||
<vpcId>{{ vpc_pcx.vpc.id }}</vpcId>
|
<vpcId>{{ vpc_pcx.vpc.id }}</vpcId>
|
||||||
<cidrBlock>{{ vpc_pcx.vpc.cidr_block }}</cidrBlock>
|
<cidrBlock>{{ vpc_pcx.vpc.cidr_block }}</cidrBlock>
|
||||||
|
<region>{{ vpc_pcx.vpc.ec2_backend.region_name }}</region>
|
||||||
</requesterVpcInfo>
|
</requesterVpcInfo>
|
||||||
<accepterVpcInfo>
|
<accepterVpcInfo>
|
||||||
<ownerId>"""
|
<ownerId>"""
|
||||||
@ -140,6 +143,7 @@ ACCEPT_VPC_PEERING_CONNECTION_RESPONSE = (
|
|||||||
<allowEgressFromLocalVpcToRemoteClassicLink>false</allowEgressFromLocalVpcToRemoteClassicLink>
|
<allowEgressFromLocalVpcToRemoteClassicLink>false</allowEgressFromLocalVpcToRemoteClassicLink>
|
||||||
<allowDnsResolutionFromRemoteVpc>false</allowDnsResolutionFromRemoteVpc>
|
<allowDnsResolutionFromRemoteVpc>false</allowDnsResolutionFromRemoteVpc>
|
||||||
</peeringOptions>
|
</peeringOptions>
|
||||||
|
<region>{{ vpc_pcx.peer_vpc.ec2_backend.region_name }}</region>
|
||||||
</accepterVpcInfo>
|
</accepterVpcInfo>
|
||||||
<status>
|
<status>
|
||||||
<code>{{ vpc_pcx._status.code }}</code>
|
<code>{{ vpc_pcx._status.code }}</code>
|
||||||
|
@ -160,8 +160,26 @@ def test_vpc_peering_connections_cross_region_accept():
|
|||||||
VpcPeeringConnectionIds=[vpc_pcx_usw1.id]
|
VpcPeeringConnectionIds=[vpc_pcx_usw1.id]
|
||||||
)
|
)
|
||||||
acp_pcx_apn1["VpcPeeringConnection"]["Status"]["Code"].should.equal("active")
|
acp_pcx_apn1["VpcPeeringConnection"]["Status"]["Code"].should.equal("active")
|
||||||
|
acp_pcx_apn1["VpcPeeringConnection"]["AccepterVpcInfo"]["Region"].should.equal(
|
||||||
|
"ap-northeast-1"
|
||||||
|
)
|
||||||
|
acp_pcx_apn1["VpcPeeringConnection"]["RequesterVpcInfo"]["Region"].should.equal(
|
||||||
|
"us-west-1"
|
||||||
|
)
|
||||||
des_pcx_apn1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("active")
|
des_pcx_apn1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("active")
|
||||||
|
des_pcx_apn1["VpcPeeringConnections"][0]["AccepterVpcInfo"]["Region"].should.equal(
|
||||||
|
"ap-northeast-1"
|
||||||
|
)
|
||||||
|
des_pcx_apn1["VpcPeeringConnections"][0]["RequesterVpcInfo"]["Region"].should.equal(
|
||||||
|
"us-west-1"
|
||||||
|
)
|
||||||
des_pcx_usw1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("active")
|
des_pcx_usw1["VpcPeeringConnections"][0]["Status"]["Code"].should.equal("active")
|
||||||
|
des_pcx_usw1["VpcPeeringConnections"][0]["AccepterVpcInfo"]["Region"].should.equal(
|
||||||
|
"ap-northeast-1"
|
||||||
|
)
|
||||||
|
des_pcx_usw1["VpcPeeringConnections"][0]["RequesterVpcInfo"]["Region"].should.equal(
|
||||||
|
"us-west-1"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@mock_ec2
|
@mock_ec2
|
||||||
|
Loading…
Reference in New Issue
Block a user