Merge pull request #18096 from gtmanfred/2014.7

add ability to configure config_drive
This commit is contained in:
Thomas S Hatch 2014-11-14 14:37:20 -07:00
commit 2ed441780e
2 changed files with 10 additions and 0 deletions

View File

@ -491,6 +491,10 @@ def request_instance(vm_=None, call=None):
with salt.utils.fopen(userdata_file, 'r') as fp:
kwargs['userdata'] = fp.read()
kwargs['config_drive'] = config.get_cloud_config_value(
'config_drive', vm_, __opts__, search_global=False
)
salt.utils.cloud.fire_event(
'event',
'requesting instance',

View File

@ -55,6 +55,8 @@ Set up in the cloud configuration at ``/etc/salt/cloud.providers`` or
base_url: http://192.168.1.101:3000/v2/12345
provider: openstack
userdata_file: /tmp/userdata.txt
# config_drive is required for userdata at rackspace
config_drive: True
For in-house Openstack Essex installation, libcloud needs the service_type :
@ -531,6 +533,10 @@ def request_instance(vm_=None, call=None):
with salt.utils.fopen(userdata_file, 'r') as fp:
kwargs['ex_userdata'] = fp.read()
kwargs['ex_config_drive'] = config.get_cloud_config_value(
'config_drive', vm_, __opts__, search_global=False
)
salt.utils.cloud.fire_event(
'event',
'requesting instance',