From f66ad001e153ee42bc46edbe7df55145b7971544 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 22 Aug 2022 12:03:56 -0500 Subject: graphql: T3993: reorganize/rename directory structure --- .../api/graphql/recipes/queries/system_status.py | 38 ---------------------- 1 file changed, 38 deletions(-) delete mode 100755 src/services/api/graphql/recipes/queries/system_status.py (limited to 'src/services/api/graphql/recipes/queries') diff --git a/src/services/api/graphql/recipes/queries/system_status.py b/src/services/api/graphql/recipes/queries/system_status.py deleted file mode 100755 index 8dadcc9f3..000000000 --- a/src/services/api/graphql/recipes/queries/system_status.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (C) 2022 VyOS maintainers and contributors -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 or later as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# - -import os -import sys -import json -import importlib.util - -from vyos.defaults import directories - -from api.graphql.utils.util import load_op_mode_as_module - -def get_system_version() -> dict: - show_version = load_op_mode_as_module('version.py') - return show_version.show(raw=True, funny=False) - -def get_system_uptime() -> dict: - show_uptime = load_op_mode_as_module('show_uptime.py') - return show_uptime.get_raw_data() - -def get_system_ram_usage() -> dict: - show_ram = load_op_mode_as_module('memory.py') - return show_ram.show(raw=True) -- cgit v1.2.3