blob: 650a6a21dc37ff9081b7a161bda36a754aaa5852 [file] [log] [blame]
kairat_kushaev5c8626d2018-06-09 18:15:15 +04001try:
2 import os_client_config
3 REQUIREMENTS_MET = True
4except ImportError:
5 REQUIREMENTS_MET = False
6import os
7import sys
8
9# i failed to load module witjout this
10# seems bugs in salt or it is only me
11sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
12
13import volume
14
15volume_list = volume.volume_list
16volume_type_list = volume.volume_type_list
17volume_type_get = volume.volume_type_get
18volume_type_create = volume.volume_type_create
19volume_type_delete = volume.volume_type_delete
20keys_volume_type_get = volume.keys_volume_type_get
21keys_volume_type_set = volume.keys_volume_type_set
22
23__all__ = ('volume_list', 'volume_type_list', 'volume_type_get',
24 'volume_type_create', 'keys_volume_type_get',
25 'keys_volume_type_set', 'volume_type_delete')
26
27
28def __virtual__():
29 if REQUIREMENTS_MET:
30 return 'cinderv3'
31 else:
32 return False, ("The cinderv3 execution module cannot be loaded: "
33 "os_client_config are unavailable.")