Repository: libcloud Updated Branches: refs/heads/trunk e41001ecf -> a2602376b
Allow user to pass ex_blockdevicemappings argument to the create_node method in the OpenStack driver. Closes #398 Signed-off-by: Tomaz Muraus <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/014c0c5a Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/014c0c5a Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/014c0c5a Branch: refs/heads/trunk Commit: 014c0c5acdeae52bde7cccace64c11bc44ee16f4 Parents: 0d0c4c4 Author: Gertjan Oude Lohuis <[email protected]> Authored: Tue Nov 11 16:55:58 2014 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Tue Feb 17 15:56:56 2015 +0100 ---------------------------------------------------------------------- libcloud/compute/drivers/openstack.py | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/014c0c5a/libcloud/compute/drivers/openstack.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py index feab9b3..f9a5f7c 100644 --- a/libcloud/compute/drivers/openstack.py +++ b/libcloud/compute/drivers/openstack.py @@ -1285,6 +1285,10 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver): name = security_group.name server_params['security_groups'].append({'name': name}) + if 'ex_blockdevicemappings' in kwargs: + server_params['block_device_mapping_v2'] = \ + kwargs['ex_blockdevicemappings'] + if 'name' in kwargs: server_params['name'] = kwargs.get('name') else:
