Oleksiy Petrenko | e03e2c7 | 2018-08-10 13:24:32 +0300 | [diff] [blame] | 1 | from keystonev3.common import send |
| 2 | |
| 3 | |
| 4 | @send('get') |
| 5 | def region_get_details(region_id, **kwargs): |
| 6 | url = '/regions/{}'.format(region_id) |
| 7 | return url, None |
| 8 | |
| 9 | |
| 10 | @send('patch') |
| 11 | def region_update(region_id, **kwargs): |
| 12 | url = '/regions/{}'.format(region_id) |
| 13 | json = { |
| 14 | 'region': kwargs |
| 15 | } |
| 16 | return url, json |
| 17 | |
| 18 | |
| 19 | @send('delete') |
| 20 | def region_delete(region_id, **kwargs): |
| 21 | url = '/regions/{}'.format(region_id) |
| 22 | return url, None |
| 23 | |
| 24 | |
| 25 | @send('post') |
| 26 | def region_create(**kwargs): |
| 27 | url = '/regions' |
| 28 | json = { |
| 29 | 'region': kwargs |
| 30 | } |
| 31 | return url, json |