fake servermodel
This commit is contained in:
parent
8a551f85b2
commit
a63b41c985
1
src/risotto/services/servermodel/__init__.py
Normal file
1
src/risotto/services/servermodel/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .servermodel import Risotto
|
42
src/risotto/services/servermodel/servermodel.py
Normal file
42
src/risotto/services/servermodel/servermodel.py
Normal file
@ -0,0 +1,42 @@
|
||||
from ...controller import Controller
|
||||
from ...register import register
|
||||
|
||||
class Risotto(Controller):
|
||||
@register('v1.servermodel.list', None)
|
||||
async def servermodel_list(self, sourceid):
|
||||
return [{'servermodelid': 1,
|
||||
'servermodelname': 'name',
|
||||
'subreleasename': 'name',
|
||||
'sourceid': 1,
|
||||
'servermodeldescription': 'description'}]
|
||||
|
||||
@register('v1.servermodel.describe', None)
|
||||
async def servermodel_describe(self, inheritance, creolefuncs, servermodelid, schema, conffiles, resolvdepends, probes):
|
||||
schema = """<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
<family doc="" name="creole">
|
||||
<family doc="general" name="general">
|
||||
<property>normal</property>
|
||||
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
|
||||
<choice type="string">oui</choice>
|
||||
<choice type="string">non</choice>
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value type="string">non</value>
|
||||
</variable>
|
||||
<leader doc="master" name="master">
|
||||
<property>normal</property>
|
||||
<variable doc="master" multi="True" name="master" type="string"/>
|
||||
<variable doc="slave1" multi="True" name="slave1" type="string">
|
||||
<property>normal</property>
|
||||
</variable>
|
||||
<variable doc="slave2" multi="True" name="slave2" type="string">
|
||||
<property>normal</property>
|
||||
</variable>
|
||||
</leader>
|
||||
</family>
|
||||
<separators/>
|
||||
</family>
|
||||
</creole>"""
|
||||
print('pouet')
|
||||
return [{'servermodelid': 1, 'servermodelname': 'name', 'servermodeldescription': 'description', 'subreleasename': 'name', 'sourceid': 1, 'schema': schema, 'creolefuncs': ''}]
|
Loading…
Reference in New Issue
Block a user