From 12ab8dabd09c45c1b5084df7ddb8a2ff79cd1b82 Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Wed, 21 Jan 2015 13:37:18 -0500 Subject: [PATCH] [Openstack|Servers|Create] Allow :volume_size in block_device_mapping_v2 --- lib/fog/openstack/requests/compute/create_server.rb | 1 + tests/openstack/requests/compute/server_tests.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/fog/openstack/requests/compute/create_server.rb b/lib/fog/openstack/requests/compute/create_server.rb index 2df553dea..65ff110a1 100644 --- a/lib/fog/openstack/requests/compute/create_server.rb +++ b/lib/fog/openstack/requests/compute/create_server.rb @@ -66,6 +66,7 @@ module Fog 'device_name' => mapping[:device_name], 'source_type' => mapping[:source_type], 'uuid' => mapping[:uuid], + 'volume_size' => mapping[:volume_size], } end elsif (block_device_mapping = options['block_device_mapping']) diff --git a/tests/openstack/requests/compute/server_tests.rb b/tests/openstack/requests/compute/server_tests.rb index 3806d3e92..8ed33b93f 100644 --- a/tests/openstack/requests/compute/server_tests.rb +++ b/tests/openstack/requests/compute/server_tests.rb @@ -84,6 +84,7 @@ Shindo.tests('Fog::Compute[:openstack] | server requests', ['openstack']) do :source_type => "volume", :destination_type => "volume", :delete_on_termination => true, + :volume_size => 20 }, { :boot_index => 1, :uuid => @volume2_id, @@ -91,6 +92,7 @@ Shindo.tests('Fog::Compute[:openstack] | server requests', ['openstack']) do :source_type => "volume", :destination_type => "volume", :delete_on_termination => true, + :volume_size => 10 }] data = compute.create_server("test", nil, @flavor_id, "block_device_mapping_v2" => volume_data).body['server'] @server_id = data['id']