From 187e56e8994454f29fb2c187cbcd1ca2e859a2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Fri, 20 Sep 2024 13:57:57 -0400 Subject: [PATCH] Change default value of empty hieradata --- .../magic_castle/magic_castle_configuration_schema.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mchub/models/magic_castle/magic_castle_configuration_schema.py b/mchub/models/magic_castle/magic_castle_configuration_schema.py index 73e65a60..0cc0de9a 100644 --- a/mchub/models/magic_castle/magic_castle_configuration_schema.py +++ b/mchub/models/magic_castle/magic_castle_configuration_schema.py @@ -4,6 +4,7 @@ from .. cloud.dns_manager import DnsManager + def validate_cluster_name(cluster_name): # Must follow RFC 1035's subdomain naming rules: https://tools.ietf.org/html/rfc1035#section-2.3.1 return re.search(r"^[a-z]([a-z0-9-]*[a-z0-9]+)?$", cluster_name) is not None @@ -24,18 +25,18 @@ class MagicCastleConfigurationSchema(Schema): nb_users = fields.Int(required=True) instances = fields.Dict( keys=fields.Str(), - values=fields.Dict(type=fields.Str(), count=fields.Int(), tags=fields.List(fields.Str())), + values=fields.Dict(type=fields.Str(), count=fields.Int(), + tags=fields.List(fields.Str())), required=True, ) volumes = fields.Dict( keys=fields.Str(), values=fields.Dict( - type=fields.Str(), + type=fields.Str(), size=fields.Int(), ), required=True ) public_keys = fields.List(fields.Str(), required=True) guest_passwd = fields.Str(required=True) - hieradata = fields.Str(missing="") - + hieradata = fields.Str(missing="---")