lib/sport_ngin_aws_auditor/instance_helper.rb
# If the klass is EC2, then just make sure the instance platform includes the RI platform because
# classic RIs (non-VPC) are used on any instance.
#
# Instance  | RI        | Used?
# ----------|-----------|------
# Linux     | Linux     | Yes
# Linux     | Linux VPC | No
# Linux VPC | Linux     | Yes
# Linux VPC | Linux VPC | Yes
#
# If the klass is not EC2, then the platforms must match as normal.
If the klass is EC2, then just make sure the instance platform includes the RI platform because
classic RIs (non-VPC) are used on any instance.

Instance  | RI        | Used.

If the klass is not EC2, then the platforms must match as normal.
If the klass is EC2 then just make sure the instance platform includes the RI platform because classic RIs ( non - VPC ) are used on any instance . Instance | RI | Used . If the klass is not EC2 then the platforms must match as normal .
def compare_platforms_based_on_klass(klass, platform, ri_platform)
      if klass =~ /EC2/
        platform.include?(ri_platform)
      else
        platform == ri_platform
      end
    end
def compare_platforms_based_on_klass ( klass , platform , ri_platform ) if klass =~ / EC2 / platform . include? ( ri_platform ) else platform == ri_platform end end
If the klass is EC2, then just make sure the instance platform includes the RI platform because
classic RIs (non-VPC) are used on any instance.
If the klass is EC2 then just make sure the instance platform includes the RI platform because classic RIs ( non - VPC ) are used on any instance .
klass
<not_specific>
platform
<not_specific>
ri_platform
<not_specific>