summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-07-07 09:53:04 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-07-07 12:29:47 +0200
commit2213d005ff58c6c495ac93b564b06b79d4d5a16d (patch)
tree0916b7a0b1f2a032bdf00f8c5cf65653e00347e9
parent5cf2de704cc82d6cc1bba37731670f4f07e0ca8d (diff)
#915 List all database images.
ogServer "GET /images" list images that exist simultaneously in database and in disk (/opt/opengnsys/images). With this patch, ogServer list all images in database, exist or not in disk. If an image exists in disk, it retrieves more information about them. This change is useful for environments where images are in different machines/repositories.
-rw-r--r--src/rest.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rest.c b/src/rest.c
index eb1a7b2..1f35174 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -2095,9 +2095,7 @@ static int og_cmd_images(char *buffer_reply)
snprintf(image.name, sizeof(image.name), "%s",
dbi_result_get_string(result, "nombreca"));
- if (og_get_image_stats(image.name, &image.image_stats)) {
- continue;
- }
+ og_get_image_stats(image.name, &image.image_stats);
image_json = og_json_image_alloc(&image);
if (!image_json) {