Skip to content

Commit 3498519

Browse files
Make distro_series param read from template or VM details
1 parent 20c2e05 commit 3498519

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extensions/MaaS/maas.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ def parse_json(self):
4747

4848
endpoint = host.get("endpoint") or extension.get("endpoint")
4949
apikey = host.get("apikey") or extension.get("apikey")
50-
distro_series = host.get("distro_series") or extension.get("distro_series") or "ubuntu"
50+
distro_series = (
51+
json_data.get("cloudstack.vm.details", {})
52+
.get("details", {})
53+
.get("distro_series", "ubuntu")
54+
)
5155

5256
if not endpoint or not apikey:
5357
fail("Missing MAAS endpoint or apikey")

0 commit comments

Comments
 (0)