Skip to content

Commit

Permalink
Fix "VPC Only" for t2.nano and shorten content
Browse files Browse the repository at this point in the history
Fixes #148
  • Loading branch information
powdahound committed Jan 2, 2016
1 parent 85ee2dd commit 1731914
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion in/index.html.mako
Expand Up @@ -229,7 +229,7 @@
${'Yes' if inst['enhanced_networking'] else 'No'}
</td>
<td class="vpc-only">
${'VPC only' if inst['vpc_only'] else 'VPC and EC2Classic'}
${'Yes' if inst['vpc_only'] else 'No'}
</td>
<td class="linux-virtualization">
% if inst['linux_virtualization_types']:
Expand Down
13 changes: 5 additions & 8 deletions render.py
Expand Up @@ -75,14 +75,11 @@ def add_cpu_detail(i):

def add_vpconly_detail(i):
# specific instances can be lanuched in VPC only
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html
# https://github.com/powdahound/ec2instances.info/issues/115
instance_types = ()
instance_types += ('c4.large', 'c4.xlarge', 'c4.2xlarge', 'c4.4xlarge')
instance_types += ('m4.large', 'm4.xlarge', 'm4.2xlarge', 'm4.4xlarge', 'm4.10xlarge')
instance_types += ('t2.micro', 't2.small', 't2.medium', 't2.large')
if i['instance_type'] in instance_types:
i['vpc_only'] = True
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types
vpc_only_families = ('c4', 'm4', 't2')
for family in vpc_only_families:
if i['instance_type'].startswith(family):
i['vpc_only'] = True


def add_render_info(i):
Expand Down

0 comments on commit 1731914

Please sign in to comment.