mirror of
https://github.com/Cian-H/I-Form_Server_Node_Deployer.git
synced 2025-12-23 14:42:02 +00:00
Created wrapper class for ip addresses
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from fnmatch import fnmatch
|
||||
import ipaddress
|
||||
from typing import Annotated, Optional
|
||||
|
||||
from docker.types import Mount
|
||||
@@ -9,14 +8,10 @@ from .cli import cli_spinner
|
||||
from .config import config
|
||||
from .create_img import create_img
|
||||
from .debug import debug_guard
|
||||
from .ip_interface import IPAddress
|
||||
from .utils import ensure_build_dir
|
||||
|
||||
|
||||
# When PEP695 is supported this line should be:
|
||||
# type IPAddress = ipaddress.IPv4Address | ipaddress.IPv6Address
|
||||
IPAddress = ipaddress._IPAddressBase
|
||||
|
||||
|
||||
def filter_validation_response(response: str) -> str:
|
||||
"""Filters out erroneous warnings from the validation response
|
||||
|
||||
@@ -136,7 +131,7 @@ def create_ignition_disk(
|
||||
"-ip",
|
||||
help="IP address of the switch to connect to",
|
||||
prompt=True,
|
||||
parser=ipaddress.ip_address,
|
||||
parser=IPAddress,
|
||||
),
|
||||
] = None,
|
||||
switch_port: Annotated[
|
||||
|
||||
Reference in New Issue
Block a user