File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/heat.cpython-310.pyc
o
�N�gZd � @ sZ d Z ddlZddlZddlZddlZddlZddlZddlZddl m
Z
dZzddlZdZW n e
y7 Y nw dZz
ddlmZ dZW n e
yM Y nw d Z\ZZZZejejd� e�e�Zd d
� Zd$dd
�Zdd� Zdd� Zdd� Z d%dd�Z d&dd�Z!d'dd�Z"d(dd�Z# d)dd�Z$ d)d d!�Z%d'd"d#�Z&dS )*a�
Module for handling OpenStack Heat calls
.. versionadded:: 2017.7.0
:depends: - heatclient Python module
:configuration: This module is not usable until the user, password, tenant, and
auth URL are specified either in a pillar or in the minion's config file.
For example::
keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.insecure: False #(optional)
keystone.auth_url: 'http://127.0.0.1:5000/v2.0/'
# Optional
keystone.region_name: 'RegionOne'
If configuration for multiple OpenStack accounts is required, they can be
set up as different configuration profiles:
For example::
openstack1:
keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.auth_url: 'http://127.0.0.1:5000/v2.0/'
openstack2:
keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.auth_url: 'http://127.0.0.2:5000/v2.0/'
With this configuration in place, any of the heat functions can make use of
a configuration profile by declaring it explicitly.
For example::
salt '*' heat.flavor_list profile=openstack1
� N)�SaltInvocationErrorFT)� jsonutils)Zparameter_defaults�
parametersZresource_registryZevent_sinks)�levelc C s t rtrdS dS )zH
Only load this module if heat
is installed on this minion.
�heat)FzrThe heat execution module cannot be loaded: the heatclient and oslo_serialization python library is not available.)�HAS_HEAT�HAS_OSLO� r r �E/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/heat.py�__virtual__P s r � c sX | r| d �nd�d� �fdd� }|dd�}|dd�}|d d�}|d
�}|dd�}|d
d�} |d�}
|dd�}|
rC|dkrC|sCt d��|rU||||||d�}| rTd|d
<