risotto/tests/fake_services/servermodel/servermodel.py

16 lines
606 B
Python
Raw Normal View History

2019-12-06 07:14:24 +01:00
from risotto.controller import Controller
from risotto.register import register
class Risotto(Controller):
@register('v1.servermodel.list', None)
2019-12-16 17:14:50 +01:00
async def servermodel_list(self, source_id):
return [{'servermodel_id': 1,
'servermodel_name': 'name1',
'release_id': 1,
'servermodel_description': 'description1'},
{'servermodel_id': 2,
'servermodel_name': 'name2',
'release_id': 2,
'servermodel_description': 'description2',
'servermodel_parents_id': [1]}]