From fca0061c6fe322513718e38d61cc3323d2e538dd Mon Sep 17 00:00:00 2001 From: Ghislain Bourgeois Date: Mon, 25 Nov 2024 16:51:25 -0500 Subject: [PATCH] fix: Give right type to default value --- src/charm_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/charm_config.py b/src/charm_config.py index 5372ae9a..3f40bb9b 100644 --- a/src/charm_config.py +++ b/src/charm_config.py @@ -6,7 +6,7 @@ import dataclasses import logging from enum import Enum -from ipaddress import IPv4Address, ip_network +from ipaddress import IPv4Address, IPv4Network, ip_network from typing import Optional import ops @@ -70,7 +70,7 @@ class UpfConfig(BaseModel): # pylint: disable=too-few-public-methods cni_type: CNIType = CNIType.bridge upf_mode: UpfMode = UpfMode.af_packet dnn: StrictStr = Field(default="internet", min_length=1) - gnb_subnet: IPvAnyNetwork = Field(default="192.168.252.3/24") + gnb_subnet: IPvAnyNetwork = Field(default=IPv4Network("192.168.252.0/24")) access_interface: Optional[StrictStr] = Field(default="") access_interface_mac_address: Optional[StrictStr] = Field(default="") access_ip: str = Field(default="192.168.252.3/24")