From ca9dbba65b7ebd7600277cc53b79f8a3e0b27e4c Mon Sep 17 00:00:00 2001 From: VAIO73 <50487331+Vaso73@users.noreply.github.com> Date: Sun, 27 Sep 2026 12:03:51 +0200 Subject: [PATCH] fix(oci): expose only Glances web port --- oci/catalog/overlays/glances.json | 11 ++++++++++- oci/tests/test_glances_ports.py | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 oci/tests/test_glances_ports.py diff --git a/oci/catalog/overlays/glances.json b/oci/catalog/overlays/glances.json index b711bb9e..5d175cc7 100644 --- a/oci/catalog/overlays/glances.json +++ b/oci/catalog/overlays/glances.json @@ -21,7 +21,16 @@ "prompt_user": false } ], - "volumes": [] + "volumes": [], + "ports": [ + { + "container_port": 61208, + "published_example": 61208, + "protocol": "tcp", + "required": true, + "proxmox_behavior": "listener-on-dedicated-lxc-address-no-nat" + } + ] }, "proxmox": { "defaults": { diff --git a/oci/tests/test_glances_ports.py b/oci/tests/test_glances_ports.py new file mode 100644 index 00000000..00a8ff33 --- /dev/null +++ b/oci/tests/test_glances_ports.py @@ -0,0 +1,23 @@ +"""Glances' Web UI is the only listener used by the native ``-w`` profile.""" + +from pathlib import Path +import unittest + +from proxmenux_oci.catalog import Catalog + + +class GlancesPortContractTests(unittest.TestCase): + def test_web_profile_exposes_only_the_web_ui_port(self): + root = Path(__file__).resolve().parents[1] + template = Catalog(root).compose("glances") + + ports = template["container_contract"]["ports"] + self.assertEqual([item["container_port"] for item in ports], [61208]) + self.assertEqual(template["first_run"]["endpoints"], [{ + "label": "Web UI", + "scheme": "http", + "port": 61208, + "path": "/", + "source": "compose-metadata", + }]) + self.assertEqual(template["proxmox"]["installer_profile"]["startup_healthcheck"]["port"], 61208)