Skip to content
This repository has been archived by the owner on Jan 20, 2019. It is now read-only.

Commit

Permalink
Added cg1.4xlarge instance type to those accepted by describe_spot_pr…
Browse files Browse the repository at this point in the history
…ice_history().
  • Loading branch information
cfox committed Jun 7, 2011
1 parent adc7fda commit a6e01e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/AWS/EC2/spot_prices.rb
Expand Up @@ -16,7 +16,7 @@ class Base < AWS::Base
def describe_spot_price_history( options = {} ) 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, ":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, ":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]) raise ArgumentError, ":product_description must be 'Linux/UNIX' or 'Windows'" unless options[:product_description].nil? || ["Linux/UNIX", "Windows"].include?(options[:product_description])


params = {} params = {}
Expand Down
2 changes: 1 addition & 1 deletion test/test_EC2_spot_prices.rb
Expand Up @@ -41,7 +41,7 @@
end end


specify "should be able to be requested with various instance types" do 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}). @ec2.stubs(:make_request).with('DescribeSpotPriceHistory', {'InstanceType' => type}).
returns stub(:body => @describe_spot_price_history_response_body, :is_a? => true) 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) lambda { @ec2.describe_spot_price_history( :instance_type => type ) }.should.not.raise(AWS::ArgumentError)
Expand Down

0 comments on commit a6e01e3

Please sign in to comment.