diff options
author | Daniil Baturin <daniil@vyos.io> | 2022-07-25 10:34:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 10:34:17 +0100 |
commit | 3337aedd5f7ff48bfad051d760023a188fdace70 (patch) | |
tree | 3dc5b5c22444430a74f8d0f8a8ed54415a8ccd47 /src/services/api/graphql/recipes/session.py | |
parent | e1e9f690d3eb4cd03aba118558fffd5b6b2920c8 (diff) | |
parent | f9d6f089014007193996e51757f72a8bf7ec78b9 (diff) | |
download | vyos-1x-3337aedd5f7ff48bfad051d760023a188fdace70.tar.gz vyos-1x-3337aedd5f7ff48bfad051d760023a188fdace70.zip |
Merge pull request #1431 from jestabro/gql-dev
graphql: T4567: Merge experimental branch of GraphQL development
Diffstat (limited to 'src/services/api/graphql/recipes/session.py')
-rw-r--r-- | src/services/api/graphql/recipes/session.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/services/api/graphql/recipes/session.py b/src/services/api/graphql/recipes/session.py index 1f844ff70..c436de08a 100644 --- a/src/services/api/graphql/recipes/session.py +++ b/src/services/api/graphql/recipes/session.py @@ -136,3 +136,17 @@ class Session: raise error return res + + def system_status(self): + import api.graphql.recipes.queries.system_status as system_status + + session = self._session + data = self._data + + status = {} + status['host_name'] = session.show(['host', 'name']).strip() + status['version'] = system_status.get_system_version() + status['uptime'] = system_status.get_system_uptime() + status['ram'] = system_status.get_system_ram_usage() + + return status |