Compare commits
11 Commits
pkg/dev/ri
...
pkg/dev/ri
Author | SHA1 | Date | |
---|---|---|---|
234b82b459 | |||
d3a5c99e51 | |||
c9e0bcbbfe | |||
47e4976f54 | |||
dd33ea5b8f | |||
689df4ec23 | |||
223fb9aaf3 | |||
c3d25b4aff | |||
bed27a1e58 | |||
40eff91684 | |||
46ea792c5e |
10
debian/control
vendored
10
debian/control
vendored
@ -2,13 +2,19 @@ Source: risotto
|
||||
Section: admin
|
||||
Priority: extra
|
||||
Maintainer: Cadoles <contact@cadoles.com>
|
||||
Build-depends: debhelper (>=11), python3-all, python3-setuptools
|
||||
Build-depends: debhelper (>=11), python3-all, python3-setuptools, dh-python
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: https://forge.cadoles.com/Infra/risotto
|
||||
|
||||
Package: python3-risotto
|
||||
Architecture: any
|
||||
Pre-Depends: dpkg, python3, ${misc:Pre-Depends}
|
||||
Depends: ${python:Depends}, ${misc:Depends}, python3-asyncpg, python3-rougail, python3-aiohttp
|
||||
Description: configuration manager libraries
|
||||
|
||||
Package: risotto
|
||||
Architecture: any
|
||||
Pre-Depends: dpkg, python3, ${misc:Pre-Depends}
|
||||
Depends: ${python:Depends}, ${misc:Depends}
|
||||
Depends: ${python:Depends}, ${misc:Depends}, python3-risotto
|
||||
Description: configuration manager
|
||||
|
||||
|
1
debian/risotto.install
vendored
Normal file
1
debian/risotto.install
vendored
Normal file
@ -0,0 +1 @@
|
||||
script/risotto-server usr/bin/
|
0
script/risotto-server
Normal file → Executable file
0
script/risotto-server
Normal file → Executable file
1
setup.py
1
setup.py
@ -4,6 +4,5 @@ setup(
|
||||
name='risotto',
|
||||
version='0.1',
|
||||
packages=['risotto' ],
|
||||
scripts=['script/risotto-server'],
|
||||
package_dir={"": "src"},
|
||||
)
|
||||
|
@ -36,9 +36,9 @@ def get_config():
|
||||
'check_role': True,
|
||||
'admin_user': DEFAULT_USER,
|
||||
'sql_dir': SQL_DIR},
|
||||
'source': {'root_path': SRV_SEED_PATH},
|
||||
'cache': {'root_path': CACHE_ROOT_PATH},
|
||||
'servermodel': {'internal_source': 'internal',
|
||||
'servermodel': {'internal_source_path': SRV_SEED_PATH,
|
||||
'internal_source': 'internal',
|
||||
'internal_distribution': 'last',
|
||||
'internal_release_name': 'none'},
|
||||
'submodule': {'allow_insecure_https': False,
|
||||
|
@ -24,7 +24,7 @@ class Controller:
|
||||
if args:
|
||||
raise ValueError(_(f'the URI "{uri}" can only be called with keyword arguments'))
|
||||
if module not in self.risotto_modules:
|
||||
return await remote.remove_call(module,
|
||||
return await remote.remote_call(module,
|
||||
version,
|
||||
message,
|
||||
kwargs)
|
||||
@ -44,7 +44,7 @@ class Controller:
|
||||
if args:
|
||||
raise ValueError(_(f'the URI "{uri}" can only be published with keyword arguments'))
|
||||
if module not in self.risotto_modules:
|
||||
await remote.remove_call(module,
|
||||
await remote.remote_call(module,
|
||||
version,
|
||||
submessage,
|
||||
kwargs)
|
||||
|
@ -1,4 +1,7 @@
|
||||
from tiramisu import Config
|
||||
try:
|
||||
from tiramisu3 import Config
|
||||
except:
|
||||
from tiramisu import Config
|
||||
from traceback import print_exc
|
||||
from copy import copy
|
||||
from typing import Dict, Callable, List, Optional
|
||||
@ -10,7 +13,7 @@ from .logger import log
|
||||
from .config import get_config
|
||||
from .context import Context
|
||||
from . import register
|
||||
from .remote import Remote
|
||||
#from .remote import Remote
|
||||
import asyncpg
|
||||
|
||||
|
||||
@ -183,7 +186,7 @@ class PublishDispatcher:
|
||||
|
||||
|
||||
class Dispatcher(register.RegisterDispatcher,
|
||||
Remote,
|
||||
# Remote,
|
||||
CallDispatcher,
|
||||
PublishDispatcher):
|
||||
""" Manage message (call or publish)
|
||||
|
@ -1,7 +1,10 @@
|
||||
from aiohttp.web import Application, Response, get, post, HTTPBadRequest, HTTPInternalServerError, HTTPNotFound
|
||||
from json import dumps
|
||||
from traceback import print_exc
|
||||
from tiramisu import Config, default_storage
|
||||
try:
|
||||
from tiramisu3 import Config, default_storage
|
||||
except:
|
||||
from tiramisu import Config, default_storage
|
||||
|
||||
|
||||
from .dispatcher import dispatcher
|
||||
|
@ -2,9 +2,14 @@ from os import listdir
|
||||
from os.path import join, basename, dirname, isfile
|
||||
from glob import glob
|
||||
from gettext import translation
|
||||
from tiramisu import StrOption, IntOption, BoolOption, ChoiceOption, OptionDescription, SymLinkOption, FloatOption, \
|
||||
Calculation, Params, ParamOption, ParamValue, calc_value, calc_value_property_help, \
|
||||
groups, Option
|
||||
try:
|
||||
from tiramisu3 import StrOption, IntOption, BoolOption, ChoiceOption, OptionDescription, \
|
||||
SymLinkOption, FloatOption, Calculation, Params, ParamOption, \
|
||||
ParamValue, calc_value, calc_value_property_help, groups, Option
|
||||
except:
|
||||
from tiramisu import StrOption, IntOption, BoolOption, ChoiceOption, OptionDescription, \
|
||||
SymLinkOption, FloatOption, Calculation, Params, ParamOption, \
|
||||
ParamValue, calc_value, calc_value_property_help, groups, Option
|
||||
from yaml import load, SafeLoader
|
||||
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
from tiramisu import Config
|
||||
try:
|
||||
from tiramisu3 import Config
|
||||
except:
|
||||
from tiramisu import Config
|
||||
from inspect import signature
|
||||
from typing import Callable, Optional
|
||||
import asyncpg
|
||||
|
@ -31,7 +31,7 @@ class Remote:
|
||||
self.submodules[module] = json
|
||||
return Config(self.submodules[module])
|
||||
|
||||
async def remove_call(self,
|
||||
async def remote_call(self,
|
||||
module: str,
|
||||
version: str,
|
||||
submessage: str,
|
||||
|
Reference in New Issue
Block a user