blob: 5d747cffe9bdcb4895a0604639f5f0ea855e7d3a [file] [log] [blame]
Oleksiy Petrenkoa5eb0602018-07-26 15:12:25 +03001from ironicv1.common import send
2try:
3 from urllib.parse import urlencode
4except ImportError:
5 from urllib import urlencode
6
7
8@send('get')
9def chassis_list_details(**kwargs):
10 url = '/chassis/detail?{}'.format(urlencode(kwargs))
11 return url, {}
12
13
14@send('get')
15def chassis_get_details(chassis_id, **kwargs):
16 url = '/chassis/{}?{}'.format(chassis_id, urlencode(kwargs))
17 return url, {}
18
19
20@send('patch')
21def chassis_update(chassis_id, properties, **kwargs):
22 url = '/chassis/{}'.format(chassis_id)
23 return url, {'json': properties}
24
25
26@send('delete')
27def chassis_delete(chassis_id, **kwargs):
28 url = '/chassis/{}'.format(chassis_id)
29 return url, {}
30
31
32@send('post')
33def chassis_create(chassis, **kwargs):
34 url = '/chassis'
35 return url, {'json': chassis}
36
37
38@send('get')
39def chassis_list(**kwargs):
40 url = '/chassis?{}'.format(urlencode(kwargs))
41 return url, {}