lib/NIFTY/Cloud/instances.rb in nifty-cloud-sdk-1.9.beta1 vs lib/NIFTY/Cloud/instances.rb in nifty-cloud-sdk-1.11.beta1

- old
+ new

@@ -161,10 +161,12 @@ # @option options [String] :admin 管理者アカウント # @option options [String] :password 管理者アカウントパスワード # 許可値: 半角英数字 # @option options [String] :ip_type IPアドレスタイプ # 許可値: static | dynamic | none + # @option options [Boolean] :agreement Red Hat Enterprise Linux 5.8 64bit / 6.3 64bit を指定した場合の同意 + # 許可値: true (同意する) | false (同意しない) # @return [Hash] レスポンスXML解析結果 # # @example # run_instances(:image_id => 1, :key_name => 'foo', :security_group => ['gr1', 'gr2'], :instance_type => 'mini', # :instance_id => 'server01', :password => 'pass', :ip_type => 'static') @@ -183,10 +185,11 @@ raise ArgumentError, "Invalid :disable_api_termination provided." unless blank?(options[:disable_api_termination]) || BOOLEAN.include?(options[:disable_api_termination].to_s) raise ArgumentError, "Invalid :accounting_type provided." unless blank?(options[:accounting_type]) || ACCOUNTING_TYPE.include?(options[:accounting_type].to_s) raise ArgumentError, "Invalid :ip_type provided." unless blank?(options[:ip_type]) || IP_TYPE.include?(options[:ip_type].to_s) raise ArgumentError, ":base64_encoded must be 'true' or 'false'." unless [true, false].include?(options[:base64_encoded]) + raise ArgumentError, "Invalid :agreement provided." unless blank?(options[:agreement]) || BOOLEAN.include?(options[:agreement].to_s) user_data = extract_user_data(options) options[:user_data] = user_data params = { @@ -198,11 +201,11 @@ {:device_name => 'DeviceName', :virtual_name => 'VirtualName', :ebs_snapshot_id => 'Ebs.SnapshotId', :ebs_volume_size => 'Ebs.VolumeSize', :ebs_delete_on_termination => 'Ebs.DeleteOnTermination', :ebs_no_device => 'Ebs.NoDevice' })) unless blank?(options[:block_device_mapping]) params.merge!(opts_to_prms(options, [:image_id, :min_count, :max_count, :key_name, :additional_info, :user_data, :addressing_type, :instance_type, :kernel_id, :ramdisk_id, :subnet_id, :disable_api_termination, :instance_initiated_shutdown_behavior, - :accounting_type, :instance_id, :admin, :password, :ip_type])) + :accounting_type, :instance_id, :admin, :password, :ip_type, :agreement])) params.merge!(opts_to_prms(options, [:availability_zone, :group_name], 'Placement')) params.reject! {|k, v| INSTANCES_IGNORED_PARAMS =~ k } if @@ignore_amz_params return response_generator(params) @@ -319,10 +322,12 @@ # <Hash> options [String] :load_balancer_name - ロードバランサー名 # [Integer] :load_balancer_port - 待ち受けポート # [Integer] :instance_port - 宛先ポート # @option options [Array<String>] :security_group ファイアウォールグループ名 # @option options [Integer] :copy_count コピー台数 + # @option options [String] :region_name リージョン情報 + # @option options [String] :availability_zone ゾーン情報 # @return [Hash] レスポンスXML解析結果 # # @example # copy_instances(:instance_id => 'server01', :instance_name => 'copyserver', :instance_type => 'mini', :accounting_type => 2, # :load_balancers => [{:load_balancer_name => 'lb1'}, {:load_balancer_port => 80, :instance_port => 80}], @@ -361,9 +366,10 @@ :load_balancer_port => 'LoadBalancerPort', :instance_port => 'InstancePort'})) unless blank?(options[:load_balancers]) params.merge!(pathlist('CopyInstance.SecurityGroup', options[:security_group])) params.merge!(opts_to_prms(options, [:instance_id, :copy_count])) params.merge!(opts_to_prms(options, [:instance_name, :instance_type, :accounting_type], 'CopyInstance')) + params.merge!(opts_to_prms(options, [:region_name, :availability_zone], 'CopyInstance.Placement')) return response_generator(params) end