Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libcloud/compute/drivers/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,11 @@ def create_node(self, **kwargs):
https://help.ubuntu.com/community/CloudInit
:type ex_userdata: ``str``

:keyword ex_config_drive: Enable config drive
see
http://docs.openstack.org/grizzly/openstack-compute/admin/content/config-drive.html
:type ex_config_drive: ``bool``

:keyword ex_security_groups: List of security groups to assign to
the node
:type ex_security_groups: ``list`` of
Expand Down Expand Up @@ -1342,6 +1347,9 @@ def _create_args_to_params(self, node, **kwargs):
server_params['user_data'] = base64.b64encode(
b(kwargs['ex_userdata'])).decode('ascii')

if 'ex_config_drive' in kwargs:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably be better to do something like the code bellow because user could potentially pass in ex_config_drive=False to the method and we would still send True.

if 'ex_config_drive' in kwargs:
    server_params['config_drive'] = kwargs['ex_config_drive']

server_params['config_drive'] = kwargs['ex_config_drive']

if 'ex_disk_config' in kwargs:
server_params['OS-DCF:diskConfig'] = kwargs['ex_disk_config']

Expand Down