From 8f86f79f74606be8b0ccfc6ec89f2f1b729f68f4 Mon Sep 17 00:00:00 2001 From: Manisha Singhal Date: Tue, 18 Jun 2024 10:25:49 +0200 Subject: [PATCH] fix: container templates to create image in compute resource (#327) fixes #328 --- app/models/foreman_fog_proxmox/proxmox_images.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/foreman_fog_proxmox/proxmox_images.rb b/app/models/foreman_fog_proxmox/proxmox_images.rb index ddc486ea0..e19173d08 100644 --- a/app/models/foreman_fog_proxmox/proxmox_images.rb +++ b/app/models/foreman_fog_proxmox/proxmox_images.rb @@ -48,9 +48,14 @@ def templates volumes = [] nodes.each do |node| storages(node.node).each do |storage| + # fetches volumes of QEMU servers for images volumes += storage.volumes.list_by_content_type('images') + + # fetches volumes of KVM containers for images + volumes += storage.volumes.list_by_content_type('rootdir') end end + # for creating image, only list volumes which are templated volumes.select(&:template?) end