blob: 218a23ff52434b09758dcb74c88c2510c64c86e1 [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
kairat_kushaev5c8626d2018-06-09 18:15:15 +04006
Oleksiy Petrenkoe38f5a62018-11-21 12:58:07 +02007from cinderv3 import lists
8from cinderv3 import volumes
9from cinderv3 import volume_types
10from cinderv3 import volume_actions
Oleksandr Shyshko04099ea2018-11-22 16:02:52 +020011from cinderv3 import services
kairat_kushaev5c8626d2018-06-09 18:15:15 +040012
Oleksiy Petrenkoe38f5a62018-11-21 12:58:07 +020013volume_list = lists.volume_list
14volume_list_get_details = lists.volume_list_get_details
15volume_create = volumes.volume_create
16volume_get_details = volumes.volume_get_details
17volume_update = volumes.volume_update
18volume_delete = volumes.volume_delete
19volume_metadata_create = volumes.volume_metadata_create
20volume_metadata_show = volumes.volume_metadata_show
21volume_metadata_update = volumes.volume_metadata_update
22volume_metadata_show_key = volumes.volume_metadata_show_key
23volume_metadata_delete = volumes.volume_metadata_delete
24volume_metadata_update_key = volumes.volume_metadata_update_key
25volume_type_list = lists.volume_type_list
26volume_type_get_details = volume_types.volume_type_get_details
27volume_type_create = volume_types.volume_type_create
28volume_type_delete = volume_types.volume_type_delete
29keys_volume_type_get = volume_types.keys_volume_type_get
30keys_volume_type_set = volume_types.keys_volume_type_set
31image_upload_volume = volume_actions.image_upload_volume
Oleksandr Shyshko04099ea2018-11-22 16:02:52 +020032service_list = lists.service_list
33service_update = services.service_update
34service_wait = services.wait_for_service
kairat_kushaev5c8626d2018-06-09 18:15:15 +040035
Oleksiy Petrenkoe38f5a62018-11-21 12:58:07 +020036__all__ = ('volume_list', 'volume_create', 'volume_delete',
37 'volume_get_details', 'volume_list_get_details', 'volume_update',
38 'volume_metadata_create', 'volume_metadata_delete',
39 'volume_metadata_show', 'volume_metadata_show_key',
40 'volume_metadata_update', 'volume_metadata_update_key',
41 'volume_type_list', 'volume_type_get_details',
kairat_kushaev5c8626d2018-06-09 18:15:15 +040042 'volume_type_create', 'keys_volume_type_get',
Oleksiy Petrenkoe38f5a62018-11-21 12:58:07 +020043 'keys_volume_type_set', 'volume_type_delete',
Oleksandr Shyshko04099ea2018-11-22 16:02:52 +020044 'image_upload_volume', 'service_list', 'service_update', 'service_wait')
kairat_kushaev5c8626d2018-06-09 18:15:15 +040045
46def __virtual__():
47 if REQUIREMENTS_MET:
48 return 'cinderv3'
49 else:
50 return False, ("The cinderv3 execution module cannot be loaded: "
51 "os_client_config are unavailable.")