blob: 91ecf60f120d888095510edf40486477c7464551 [file] [log] [blame]
kairat_kushaev66852622018-06-07 17:27:35 +04001"""
2Module for handling Heat stacks.
3
4:depends: - os_client_config
5:configuration: This module is not usable until the following are specified
6"""
7
8try:
9 import os_client_config
10 REQUIREMENTS_MET = True
11except ImportError:
12 REQUIREMENTS_MET = False
13
kairat_kushaev66852622018-06-07 17:27:35 +040014
Oleksiy Petrenko5e6ebc92018-08-09 15:03:30 +030015from heatv1 import stack
Oleksandr Shyshkofda15b02018-11-21 15:53:21 +020016from heatv1 import services
kairat_kushaev66852622018-06-07 17:27:35 +040017
18stack_create = stack.stack_create
19stack_delete = stack.stack_delete
20stack_list = stack.stack_list
21stack_show = stack.stack_show
22stack_update = stack.stack_update
Oleksandr Shyshkofda15b02018-11-21 15:53:21 +020023service_list = services.service_list
24service_wait = services.wait_for_service
kairat_kushaev66852622018-06-07 17:27:35 +040025
26__all__ = ('stack_create', 'stack_list', 'stack_delete', 'stack_show',
Oleksandr Shyshkofda15b02018-11-21 15:53:21 +020027 'stack_update', 'service_wait', 'service_list')
kairat_kushaev66852622018-06-07 17:27:35 +040028
29
30def __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.")