The final cloud module
When we have finished, the final cloud module will look like this:
''' Generic Salt Cloud module This module is not designed for any specific cloud provider, but is generic enough that only minimal changes may be required for some providers. This file should be saved as salt/cloud/clouds/generic.py Set up the cloud configuration at ``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/generic.conf``: .. code-block:: yaml my-cloud-config: driver: generic # The login user user: larry # The user's password password: 123pass ''' import json import salt.utils.http import salt.utils.cloud import salt.config as config from salt.exceptions import SaltCloudSystemExit __virtualname__ = 'generic' def __virtual__(): ''' Check for cloud configs ''' if get_configured_provider() is False: return False return __virtualname__ def get_configured_provider(): ''' Make sure configuration is correct...