Oleksiy Petrenko | e38f5a6 | 2018-11-21 12:58:07 +0200 | [diff] [blame^] | 1 | from cinderv3.common import send |
| 2 | |
| 3 | try: |
| 4 | from urllib.parse import urlencode |
| 5 | except ImportError: |
| 6 | from urllib import urlencode |
| 7 | |
| 8 | @send("get") |
| 9 | def volume_list(**kwargs): |
| 10 | """ |
| 11 | Return list of cinder volumes. |
| 12 | """ |
| 13 | url = '/volumes?{}'.format(urlencode(kwargs)) |
| 14 | return url, None |
| 15 | |
| 16 | |
| 17 | @send("get") |
| 18 | def volume_list_get_details(**kwargs): |
| 19 | url = '/volumes/detail?{}'.format(urlencode(kwargs)) |
| 20 | return url, None |
| 21 | |
| 22 | |
| 23 | @send("get") |
| 24 | def volume_type_list(**kwargs): |
| 25 | """ |
| 26 | Return list of volume types |
| 27 | """ |
| 28 | url = '/types?{}'.format(urlencode(kwargs)) |
| 29 | return url, None |