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 |
Oleksandr Shyshko | fda15b0 | 2018-11-21 15:53:21 +0200 | [diff] [blame] | 16 | from heatv1 import services |
kairat_kushaev | 6685262 | 2018-06-07 17:27:35 +0400 | [diff] [blame] | 17 | |
| 18 | stack_create = stack.stack_create |
| 19 | stack_delete = stack.stack_delete |
| 20 | stack_list = stack.stack_list |
| 21 | stack_show = stack.stack_show |
| 22 | stack_update = stack.stack_update |
Oleksandr Shyshko | fda15b0 | 2018-11-21 15:53:21 +0200 | [diff] [blame] | 23 | service_list = services.service_list |
| 24 | service_wait = services.wait_for_service |
kairat_kushaev | 6685262 | 2018-06-07 17:27:35 +0400 | [diff] [blame] | 25 | |
| 26 | __all__ = ('stack_create', 'stack_list', 'stack_delete', 'stack_show', |
Oleksandr Shyshko | fda15b0 | 2018-11-21 15:53:21 +0200 | [diff] [blame] | 27 | 'stack_update', 'service_wait', 'service_list') |
kairat_kushaev | 6685262 | 2018-06-07 17:27:35 +0400 | [diff] [blame] | 28 | |
| 29 | |
| 30 | def __virtual__(): |
| 31 | if REQUIREMENTS_MET: |
| 32 | return 'heatv1' |
| 33 | else: |
| 34 | return False, ("The heat execution module cannot be loaded: " |
| 35 | "os_client_config is not available.") |