General cleanup.
This commit is contained in:
parent
6c9bba2ca1
commit
c0d19ab178
@ -1308,7 +1308,7 @@ class SecurityGroupIngress(object):
|
||||
from_port = properties.get("FromPort")
|
||||
source_security_group_id = properties.get("SourceSecurityGroupId")
|
||||
source_security_group_name = properties.get("SourceSecurityGroupName")
|
||||
source_security_owner_id = properties.get("SourceSecurityGroupOwnerId") # IGNORED AT THE MOMENT
|
||||
# source_security_owner_id = properties.get("SourceSecurityGroupOwnerId") # IGNORED AT THE MOMENT
|
||||
to_port = properties.get("ToPort")
|
||||
|
||||
assert group_id or group_name
|
||||
@ -1328,7 +1328,6 @@ class SecurityGroupIngress(object):
|
||||
else:
|
||||
ip_ranges = []
|
||||
|
||||
|
||||
if group_id:
|
||||
security_group = ec2_backend.describe_security_groups(group_ids=[group_id])[0]
|
||||
else:
|
||||
|
@ -339,7 +339,7 @@ def test_vpc_single_instance_in_subnet():
|
||||
eip.domain.should.equal('vpc')
|
||||
eip.instance_id.should.equal(instance.id)
|
||||
|
||||
security_group = ec2_conn.get_all_security_groups()[0]
|
||||
security_group = ec2_conn.get_all_security_groups(filters={'vpc_id': [vpc.id]})[0]
|
||||
security_group.vpc_id.should.equal(vpc.id)
|
||||
|
||||
stack = conn.describe_stacks()[0]
|
||||
@ -1014,7 +1014,7 @@ def test_vpc_peering_creation():
|
||||
|
||||
@mock_cloudformation
|
||||
@mock_ec2
|
||||
def test_security_group_ingress_separate_from_security_group_by_id():
|
||||
def test_multiple_security_group_ingress_separate_from_security_group_by_id():
|
||||
template = {
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
"Resources": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
# Ensure 'assert_raises' context manager support for Python 2.6
|
||||
import tests.backport_assert_raises
|
||||
import tests.backport_assert_raises # flake8: noqa
|
||||
from nose.tools import assert_raises
|
||||
|
||||
import boto
|
||||
@ -72,7 +72,7 @@ def test_vpc_get_by_id():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
vpc2 = conn.create_vpc("10.0.0.0/16")
|
||||
vpc3 = conn.create_vpc("10.0.0.0/16")
|
||||
conn.create_vpc("10.0.0.0/16")
|
||||
|
||||
vpcs = conn.get_all_vpcs(vpc_ids=[vpc1.id, vpc2.id])
|
||||
vpcs.should.have.length_of(2)
|
||||
@ -86,7 +86,7 @@ def test_vpc_get_by_cidr_block():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
vpc2 = conn.create_vpc("10.0.0.0/16")
|
||||
vpc3 = conn.create_vpc("10.0.0.0/24")
|
||||
conn.create_vpc("10.0.0.0/24")
|
||||
|
||||
vpcs = conn.get_all_vpcs(filters={'cidr': '10.0.0.0/16'})
|
||||
vpcs.should.have.length_of(2)
|
||||
@ -101,7 +101,7 @@ def test_vpc_get_by_dhcp_options_id():
|
||||
dhcp_options = conn.create_dhcp_options(SAMPLE_DOMAIN_NAME, SAMPLE_NAME_SERVERS)
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
vpc2 = conn.create_vpc("10.0.0.0/16")
|
||||
vpc3 = conn.create_vpc("10.0.0.0/24")
|
||||
conn.create_vpc("10.0.0.0/24")
|
||||
|
||||
conn.associate_dhcp_options(dhcp_options.id, vpc1.id)
|
||||
conn.associate_dhcp_options(dhcp_options.id, vpc2.id)
|
||||
@ -196,7 +196,7 @@ def test_vpc_get_by_tag_value_subset():
|
||||
conn = boto.connect_vpc()
|
||||
vpc1 = conn.create_vpc("10.0.0.0/16")
|
||||
vpc2 = conn.create_vpc("10.0.0.0/16")
|
||||
vpc3 = conn.create_vpc("10.0.0.0/24")
|
||||
conn.create_vpc("10.0.0.0/24")
|
||||
|
||||
vpc1.add_tag('Name', 'TestVPC')
|
||||
vpc1.add_tag('Key', 'TestVPC2')
|
||||
|
Loading…
Reference in New Issue
Block a user