From affd4c699880440b29661b44568c26de2834ce0f Mon Sep 17 00:00:00 2001 From: TheNetworkGuy Date: Mon, 16 Jun 2025 16:03:53 +0000 Subject: [PATCH 1/2] Fixes #127 --- modules/hostgroups.py | 1 + modules/tools.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/hostgroups.py b/modules/hostgroups.py index 68b0bb1..8bbec86 100644 --- a/modules/hostgroups.py +++ b/modules/hostgroups.py @@ -85,6 +85,7 @@ class Hostgroup: format_options["location"] = ( str(self.nb.location) if self.nb.location else None ) + format_options["rack"] = self.nb.rack.name if self.nb.rack else None # Variables only applicable for VM's if self.type == "vm": # Check if a cluster is configured. Could also be configured in a site. diff --git a/modules/tools.py b/modules/tools.py index 0b600c2..823410e 100644 --- a/modules/tools.py +++ b/modules/tools.py @@ -120,7 +120,7 @@ def verify_hg_format(hg_format, device_cfs=None, vm_cfs=None, hg_type="dev", log "tenant_group", "platform", "cluster"] - ,"vm": ["location", + ,"vm": ["cluster_type", "role", "manufacturer", "region", From 87b33706c003452460ad35c9ef8e3ea1fe176a9c Mon Sep 17 00:00:00 2001 From: TheNetworkGuy Date: Mon, 16 Jun 2025 16:07:38 +0000 Subject: [PATCH 2/2] Updated README with cluster_type --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 72291e2..ef280cc 100644 --- a/README.md +++ b/README.md @@ -185,10 +185,11 @@ used: **Only for VMs** -| name | description | -| ------------ | --------------- | -| cluster | VM cluster name | -| device | parent device | +| name | description | +| ------------ | --------------- | +| cluster | VM cluster name | +| cluster_type | VM cluster type | +| device | parent device | You can specify the value separated by a "/" like so: