Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added cg1.4xlarge instance type to those accepted by describe_spot_pr…

…ice_history().
  • Loading branch information...
commit a6e01e3dce84daad432af9eb9313564ff8fe4064 1 parent adc7fda
@cfox cfox authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/AWS/EC2/spot_prices.rb
  2. +1 −1  test/test_EC2_spot_prices.rb
View
2  lib/AWS/EC2/spot_prices.rb
@@ -16,7 +16,7 @@ class Base < AWS::Base
def describe_spot_price_history( options = {} )
raise ArgumentError, ":start_time must be a Time object" unless options[:start_time].nil? || options[:start_time].kind_of?(Time)
raise ArgumentError, ":end_time must be a Time object" unless options[:end_time].nil? || options[:end_time].kind_of?(Time)
- raise ArgumentError, ":instance_type must specify a valid instance type" unless options[:instance_type].nil? || ["t1.micro", "m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge", "cc1.4xlarge"].include?(options[:instance_type])
+ raise ArgumentError, ":instance_type must specify a valid instance type" unless options[:instance_type].nil? || ["t1.micro", "m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge", "cc1.4xlarge", "cg1.4xlarge"].include?(options[:instance_type])
raise ArgumentError, ":product_description must be 'Linux/UNIX' or 'Windows'" unless options[:product_description].nil? || ["Linux/UNIX", "Windows"].include?(options[:product_description])
params = {}
View
2  test/test_EC2_spot_prices.rb
@@ -41,7 +41,7 @@
end
specify "should be able to be requested with various instance types" do
- ["t1.micro", "m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge", "cc1.4xlarge"].each do |type|
+ ["t1.micro", "m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge", "cc1.4xlarge", "cg1.4xlarge"].each do |type|
@ec2.stubs(:make_request).with('DescribeSpotPriceHistory', {'InstanceType' => type}).
returns stub(:body => @describe_spot_price_history_response_body, :is_a? => true)
lambda { @ec2.describe_spot_price_history( :instance_type => type ) }.should.not.raise(AWS::ArgumentError)
Please sign in to comment.
Something went wrong with that request. Please try again.