This is an automated email from the ASF dual-hosted git repository.

harikrishna pushed a commit to branch ExtensionMaaS
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 79002e7ff73c2b6817774f89cb7ca26e06f9b4dc
Author: Harikrishna Patnala <harikrishna.patn...@gmail.com>
AuthorDate: Thu Sep 11 16:36:26 2025 +0530

    Make distro_series param read from template or VM details
---
 extensions/MaaS/maas.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/extensions/MaaS/maas.py b/extensions/MaaS/maas.py
index 93316bf0f56..488c9f2b068 100644
--- a/extensions/MaaS/maas.py
+++ b/extensions/MaaS/maas.py
@@ -47,7 +47,11 @@ class MaasManager:
 
             endpoint = host.get("endpoint") or extension.get("endpoint")
             apikey = host.get("apikey") or extension.get("apikey")
-            distro_series = host.get("distro_series") or 
extension.get("distro_series") or "ubuntu"
+            distro_series = (
+                json_data.get("cloudstack.vm.details", {})
+                .get("details", {})
+                .get("distro_series", "ubuntu")
+            )
 
             if not endpoint or not apikey:
                 fail("Missing MAAS endpoint or apikey")

Reply via email to