mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27251 from rallytime/fix-19947
Add support for post_uri in SoftLayer cloud drivers
This commit is contained in:
commit
b11ce6ac2a
3 changed files with 25 additions and 0 deletions
|
@ -198,6 +198,19 @@ max_net_speed
|
|||
Specifies the connection speed for the instance's network components. This
|
||||
setting is optional. By default, this is set to 10.
|
||||
|
||||
post_uri
|
||||
--------
|
||||
Specifies the uri location of the script to be downloaded and run after the instance
|
||||
is provisioned.
|
||||
|
||||
.. versionadded:: 2015.8.1
|
||||
|
||||
Example:
|
||||
.. code-block:: yaml
|
||||
|
||||
base_softlayer_ubuntu:
|
||||
post_uri: 'https://SOMESERVERIP:8000/myscript.sh'
|
||||
|
||||
public_vlan
|
||||
-----------
|
||||
If it is necessary for an instance to be created within a specific frontend
|
||||
|
|
|
@ -355,6 +355,12 @@ def create(vm_):
|
|||
'maxSpeed': int(max_net_speed)
|
||||
}]
|
||||
|
||||
post_uri = config.get_cloud_config_value(
|
||||
'post_uri', vm_, __opts__, default=None
|
||||
)
|
||||
if post_uri:
|
||||
kwargs['postInstallScriptUri'] = post_uri
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event',
|
||||
'requesting instance',
|
||||
|
|
|
@ -293,6 +293,12 @@ def create(vm_):
|
|||
)
|
||||
kwargs['prices'].append({'id': bandwidth})
|
||||
|
||||
post_uri = config.get_cloud_config_value(
|
||||
'post_uri', vm_, __opts__, default=None
|
||||
)
|
||||
if post_uri:
|
||||
kwargs['prices'].append({'id': post_uri})
|
||||
|
||||
vlan_id = config.get_cloud_config_value(
|
||||
'vlan', vm_, __opts__, default=False
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue