risotto/tests/fake_services/servermodel/servermodel.py

16 lines
606 B
Python

from risotto.controller import Controller
from risotto.register import register
class Risotto(Controller):
@register('v1.servermodel.list', None)
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]}]