blob: 5982f0638e77db2e01765057d067aa0fe45296ee [file] [log] [blame]
Oleksiy Petrenkoe38f5a62018-11-21 12:58:07 +02001from cinderv3.common import send
2
3try:
4 from urllib.parse import urlencode
5except ImportError:
6 from urllib import urlencode
7
Oleksandr Shyshko04099ea2018-11-22 16:02:52 +02008
Oleksiy Petrenkoe38f5a62018-11-21 12:58:07 +02009@send("get")
10def volume_list(**kwargs):
11 """
12 Return list of cinder volumes.
13 """
14 url = '/volumes?{}'.format(urlencode(kwargs))
15 return url, None
16
17
18@send("get")
19def volume_list_get_details(**kwargs):
20 url = '/volumes/detail?{}'.format(urlencode(kwargs))
21 return url, None
22
23
24@send("get")
25def volume_type_list(**kwargs):
26 """
27 Return list of volume types
28 """
29 url = '/types?{}'.format(urlencode(kwargs))
30 return url, None
Oleksandr Shyshko04099ea2018-11-22 16:02:52 +020031
32
33@send("get")
34def service_list(**kwargs):
35 """
36 Return list of Cinder services.
37 """
38 url = '/os-services?{}'.format(urlencode(kwargs))
39 return url, None