From 5abe86222892be4c21fe0d041d2e05d07ddcd7bb Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Tue, 30 Mar 2021 10:49:37 +0200 Subject: Add list images ogServer exposes a list of known partition images at /images, use it to implement 'list images' command. --- cli/objects/images.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cli/objects/images.py (limited to 'cli/objects') diff --git a/cli/objects/images.py b/cli/objects/images.py new file mode 100644 index 0000000..94c6386 --- /dev/null +++ b/cli/objects/images.py @@ -0,0 +1,14 @@ +# +# Copyright (C) 2021 Soleta Networks +# +# This program is free software: you can redistribute it and/or modify it under +# the terms of the GNU Affero General Public License as published by the +# Free Software Foundation, version 3. +# + +class OgImage(): + + @staticmethod + def list_images(rest): + r = rest.get('/images') + print(r.text) -- cgit v1.2.3-18-g5258