kairat_kushaev | 6685262 | 2018-06-07 17:27:35 +0400 | [diff] [blame] | 1 | """ |
| 2 | Module for handling Heat stacks. |
| 3 | |
| 4 | :depends: - os_client_config |
| 5 | :configuration: This module is not usable until the following are specified |
| 6 | """ |
| 7 | |
| 8 | try: |
| 9 | import os_client_config |
| 10 | REQUIREMENTS_MET = True |
| 11 | except ImportError: |
| 12 | REQUIREMENTS_MET = False |
| 13 | |
kairat_kushaev | 6685262 | 2018-06-07 17:27:35 +0400 | [diff] [blame] | 14 | |
Oleksiy Petrenko | 5e6ebc9 | 2018-08-09 15:03:30 +0300 | [diff] [blame^] | 15 | from heatv1 import stack |
kairat_kushaev | 6685262 | 2018-06-07 17:27:35 +0400 | [diff] [blame] | 16 | |
| 17 | stack_create = stack.stack_create |
| 18 | stack_delete = stack.stack_delete |
| 19 | stack_list = stack.stack_list |
| 20 | stack_show = stack.stack_show |
| 21 | stack_update = stack.stack_update |
| 22 | |
| 23 | __all__ = ('stack_create', 'stack_list', 'stack_delete', 'stack_show', |
| 24 | 'stack_update') |
| 25 | |
| 26 | |
| 27 | def __virtual__(): |
| 28 | if REQUIREMENTS_MET: |
| 29 | return 'heatv1' |
| 30 | else: |
| 31 | return False, ("The heat execution module cannot be loaded: " |
| 32 | "os_client_config is not available.") |