From dbdfc106bfc599ba86c4870b342e684eaf0b2476 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Fri, 19 Jun 2020 12:23:59 +0200 Subject: Rewrite basic structure This commit: - Adds OgREST class as a wrapper for HTTP REST requests. - Adds objects folder which will contain available functions for each object in the OpenGnsys ecosystem (e.g. client, image, etc.). --- ogcli/objects/og_client.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ogcli/objects/og_client.py (limited to 'ogcli/objects/og_client.py') diff --git a/ogcli/objects/og_client.py b/ogcli/objects/og_client.py new file mode 100644 index 0000000..ca91036 --- /dev/null +++ b/ogcli/objects/og_client.py @@ -0,0 +1,6 @@ +class OgClient(): + + @staticmethod + def list_clients(rest): + r = rest.get('/clients') + print(r.json()) -- cgit v1.2.3-18-g5258