From 4d7e62cca4e755285f05a85f2ffd6ef87186ec05 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 10 May 2024 12:41:03 -0700 Subject: [PATCH] status: fix memsize type --- framework/internal/render.py | 3 ++- templates/file-server/routers.json.j2 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/internal/render.py b/framework/internal/render.py index bce47bd..27570e9 100644 --- a/framework/internal/render.py +++ b/framework/internal/render.py @@ -11,7 +11,8 @@ 'path_exists': lambda path: os.path.exists(path), 'read_file': lambda path: open(path).read(), 'oneline': lambda text: ''.join(text.splitlines()), - 'list': lambda iter: list(iter), + 'list': lambda obj: list(obj), + 'str': lambda obj: str(obj), } def render(node_name: str, dry: bool = False) -> None: diff --git a/templates/file-server/routers.json.j2 b/templates/file-server/routers.json.j2 index 24e2d2c..c30dd01 100644 --- a/templates/file-server/routers.json.j2 +++ b/templates/file-server/routers.json.j2 @@ -11,8 +11,8 @@ 'position': data['position'], '_real_position': data['position'], + 'memsize': str(data['memsize']) + 'G', 'backbone': true, - 'memsize': data['memsize'], 'fch-enabled': true, } | tojson }} {% if not loop.last %},{% endif %}