summaryrefslogtreecommitdiffstats
path: root/cli/objects
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-03-30 10:49:37 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-03-30 14:00:25 +0200
commit5abe86222892be4c21fe0d041d2e05d07ddcd7bb (patch)
treebce25becfaa943df0891f35ee09a0a7298ff6c1c /cli/objects
parent40bd1463770929788f64ba32b892b6af3009f929 (diff)
Add list images
ogServer exposes a list of known partition images at /images, use it to implement 'list images' command.
Diffstat (limited to 'cli/objects')
-rw-r--r--cli/objects/images.py14
1 files changed, 14 insertions, 0 deletions
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 <info@soleta.eu>
+#
+# 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)