Skip to content

Commit

Permalink
Fix for issue #25
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Koontz authored and grempe committed Jul 14, 2010
1 parent 1959c28 commit c1fb8b2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/AWS/EC2/instances.rb
Expand Up @@ -36,7 +36,7 @@ def run_instances( options = {} )
raise ArgumentError, ":image_id must be provided" if options[:image_id].nil? || options[:image_id].empty?
raise ArgumentError, ":min_count is not valid" unless options[:min_count].to_i > 0
raise ArgumentError, ":max_count is not valid or must be >= :min_count" unless options[:max_count].to_i > 0 && options[:max_count].to_i >= options[:min_count].to_i
raise ArgumentError, ":instance_type must specify a valid instance type" unless options[:instance_type].nil? || ["m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge"].include?(options[:instance_type])
raise ArgumentError, ":instance_type must specify a valid instance type" unless options[:instance_type].nil? || ["m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge", "cc1.4xlarge"].include?(options[:instance_type])
raise ArgumentError, ":monitoring_enabled must be 'true' or 'false'" unless options[:monitoring_enabled].nil? || [true, false].include?(options[:monitoring_enabled])
raise ArgumentError, ":disable_api_termination must be 'true' or 'false'" unless options[:disable_api_termination].nil? || [true, false].include?(options[:disable_api_termination])
raise ArgumentError, ":instance_initiated_shutdown_behavior must be 'stop' or 'terminate'" unless options[:instance_initiated_shutdown_behavior].nil? || ["stop", "terminate"].include?(options[:instance_initiated_shutdown_behavior])
Expand Down
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 = {} )
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? || ["m1.small", "m1.large", "m1.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge"].include?(options[:instance_type])
raise ArgumentError, ":instance_type must specify a valid instance type" unless options[:instance_type].nil? || ["m1.small", "m1.large", "m1.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge","cc1.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 = {}
Expand Down
2 changes: 1 addition & 1 deletion lib/AWS/RDS/rds.rb
Expand Up @@ -471,7 +471,7 @@ def restore_db_instance_from_snapshot( options = {} )
# @option options [optional, Boolean] :use_latest_restorable_time specifies that the db be restored to the latest restored time. Conditional, cannot be specified if :restore_time parameter is provided.
# @option options [optional, Date] :restore_time specifies the date and time to restore from. Conditional, cannot be specified if :use_latest_restorable_time parameter is true.
# @option options [String] :target_db_instance_identifier is the name of the new database instance to be created.
# @option options [optional, String] :db_instance_class specifies the class of the compute and memory of the EC2 instance, Options : db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge
# @option options [optional, String] :db_instance_class specifies the class of the compute and memory of the EC2 instance, Options : db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.cc1.4xlarge
# @option options [optional, Integer] :port is the port which the db can accept connections on. Constraints: Value must be 1115-65535
# @option options [optional, String] :availability_zone is the EC2 zone which the db instance will be created
#
Expand Down

0 comments on commit c1fb8b2

Please sign in to comment.