From 4fb42dede4479b0117b5a18efe8a43ec89914500 Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Mon, 23 Nov 2026 14:05:03 +0100 Subject: [PATCH 1/3] feat: package and supervise Neutron DR agents Stage the DR agent and shared Pebble supervisor. Use the published NDR placement contract to validate configuration. Render private agent config from a packaged Jinja template and recover interrupted updates from saved and live services. Expose rotating per-agent logs through a read-only snap content slot. Stage Hibiscus packages from the updates pocket. Assisted-By: Codex (gpt-6.2-sol) Signed-off-by: Guillaume Boutry --- openstack_network_agents/cli/main.py | 12 + .../core/dynamic_routing.py | 417 ++++++++++++++ openstack_network_agents/core/templates.py | 18 + .../templates/ndr-agent.conf.j2 | 19 + pyproject.toml | 10 +- snap/snapcraft.yaml | 38 ++ tests/unit/core/test_dynamic_routing.py | 408 +++++++++++++ uv.lock | 540 ++++++++++++------ 8 files changed, 1285 insertions(+), 177 deletions(-) create mode 100644 openstack_network_agents/core/dynamic_routing.py create mode 100644 openstack_network_agents/core/templates.py create mode 100644 openstack_network_agents/templates/ndr-agent.conf.j2 create mode 100644 tests/unit/core/test_dynamic_routing.py diff --git a/openstack_network_agents/cli/main.py b/openstack_network_agents/cli/main.py index 83ed4ff..fede2cd 100644 --- a/openstack_network_agents/cli/main.py +++ b/openstack_network_agents/cli/main.py @@ -1,6 +1,8 @@ # SPDX-FileCopyrightText: 2025 - Canonical Ltd # SPDX-License-Identifier: Apache-2.0 +import os + import click from snaphelpers import Snap @@ -8,6 +10,7 @@ from openstack_network_agents.cli.nics import list_nics from openstack_network_agents.cli.setup_bridge import setup_bridge from openstack_network_agents.cli.show_bridge_setup import show_bridge_setup +from openstack_network_agents.core.dynamic_routing import DynamicRouting CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]} @@ -18,6 +21,15 @@ def cli(verbose: bool): """Set of utilities for managing the agents.""" +@cli.command(hidden=True) +@click.pass_obj +def start_pebble(snap: Snap) -> None: + """Start the shared supervisor with feature startup guards applied.""" + routing = DynamicRouting(snap.paths.common, snap.paths.snap) + routing.guard_supervisor_start() + os.execv(routing.pebble, [str(routing.pebble), "run"]) + + def main(): """Register commands and run the CLI.""" snap = Snap() diff --git a/openstack_network_agents/core/dynamic_routing.py b/openstack_network_agents/core/dynamic_routing.py new file mode 100644 index 0000000..4a7c725 --- /dev/null +++ b/openstack_network_agents/core/dynamic_routing.py @@ -0,0 +1,417 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +"""Reconcile local Neutron Dynamic Routing agents under Pebble.""" + +import ast +import json +import os +import shlex +import ssl +import subprocess +import tempfile +from dataclasses import dataclass +from pathlib import Path +from typing import NotRequired, TypedDict, cast + +from sunbeam_ndr_contract import Agent, Instance, parse_instances + +from openstack_network_agents.core.templates import get_template + +_PEBBLE_APP = "openstack-network-agents.pebble" + +Service = TypedDict( + "Service", + { + "command": str, + "override": str, + "startup": str, + "on-failure": str, + "on-success": NotRequired[str], + }, +) + + +class PebbleLayer(TypedDict, total=False): + services: dict[str, Service] + + +class ServiceStatus(TypedDict): + current: str + + +@dataclass(frozen=True) +class NDRConfig: + """Desired placement and optional broker credentials.""" + + placement: tuple[Instance, ...] = () + transport: str = "" + ca_cert: str = "" + + def agents_for(self, domains: set[str]) -> list[Agent]: + """Select agents whose domains are ready and have broker credentials.""" + if not self.transport: + return [] + return [ + item.agent + for item in self.placement + if item.peering is not None and item.agent.domain in domains + ] + + +def parse_config(raw: object) -> NDRConfig: + """Parse desired snap config, including paused placement from older charms.""" + if raw is None or raw == "": + return NDRConfig() + if isinstance(raw, str): + try: + raw = json.loads(raw) + except ValueError: + raise ValueError("NDR configuration must be a JSON object.") from None + if not isinstance(raw, dict) or not isinstance(raw.get("instances"), list): + raise TypeError("NDR configuration must contain an instances list.") + + instances = raw["instances"] + if "paused-instances" in raw: + if instances: + raise ValueError("NDR placement cannot be both active and paused.") + return NDRConfig(parse_instances(raw["paused-instances"], allow_legacy=True)) + placement = parse_instances(instances, allow_legacy=True) + if not placement: + return NDRConfig() + + transport = raw.get("transport-url") + if transport is not None and ( + not isinstance(transport, str) + or not transport.startswith("rabbit://") + or any(ord(character) < 32 for character in transport) + ): + raise ValueError("NDR requires a valid RabbitMQ transport URL.") + ca_cert = raw.get("ca-cert", "") + if not isinstance(ca_cert, str): + raise TypeError("NDR CA certificate must be a PEM string.") + if ca_cert: + try: + ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT).load_verify_locations( + cadata=ca_cert + ) + except ValueError, ssl.SSLError: + raise ValueError("NDR CA certificate is not valid PEM.") from None + return NDRConfig(placement, transport or "", ca_cert) + + +def _write_private(path: Path, contents: str) -> None: + """Replace a configuration file without exposing partially written data.""" + path.parent.mkdir(mode=0o700, parents=True, exist_ok=True) + with tempfile.NamedTemporaryFile( + dir=path.parent, mode="w", encoding="utf-8", delete=False + ) as temp: + temp_path = Path(temp.name) + try: + temp.write(contents) + temp.flush() + temp_path.replace(path) + finally: + temp_path.unlink(missing_ok=True) + + +def _read(path: Path) -> str: + try: + return path.read_text() + except FileNotFoundError: + return "" + + +@dataclass(frozen=True) +class _PebbleInventory: + layer: PebbleLayer + legacy_services: set[str] + configs: set[str] + shared: bool + + @property + def configured(self) -> set[str]: + return self.layer.get("services", {}).keys() | self.legacy_services + + +class DynamicRouting: + """Manage the NDR layer and agent configuration under shared Pebble.""" + + def __init__(self, common: Path, snap_path: Path) -> None: + self.directory = common / "ndr" + self.logs = common / "ndr-logs" + self.pebble_dir = common / "pebble" + self.socket = self.pebble_dir / ".pebble.socket" + self.layer = self.pebble_dir / "layers" / "001-ndr.yaml" + self.legacy_layer = self.directory / "pebble" / "layers" / self.layer.name + self.ca_file = self.directory / "rabbitmq-ca.pem" + self.env = {**os.environ, "PEBBLE": str(self.pebble_dir)} + self.pebble = snap_path / "bin" / "pebble" + + def _run_pebble(self, *args: str) -> None: + result = subprocess.run( + [str(self.pebble), *args], + env=self.env, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + timeout=35, + check=False, + ) + if result.returncode: + raise RuntimeError(f"NDR Pebble {args[0]} failed.") + + def guard_supervisor_start(self) -> None: + """Pause legacy NDR services until host readiness has been checked.""" + if not (previous := _read(self.layer)): + return + plan = json.loads(previous) + services = plan.get("services", {}) + if "log-targets" in plan or any( + service.get("startup") != "disabled" for service in services.values() + ): + for service in services.values(): + service["startup"] = "disabled" + _write_private( + self.layer, json.dumps({"services": services}, sort_keys=True) + ) + + def _service_path(self, service: str) -> Path: + return self.directory / "agents" / service + + def _render_agent(self, agent: Agent, transport: str, tls: bool) -> str: + return get_template("ndr-agent.conf.j2").render( + host=agent.host, + state_path=self._service_path(agent.service) / "state", + log_file=self.logs / f"{agent.service}.log", + transport_url=transport, + router_id=agent.router_id, + tls=tls, + ca_file=self.ca_file, + ) + + def verify_tls_support(self) -> None: + """Reject a bundle that cannot enforce RabbitMQ peer identity.""" + driver = ( + self.pebble.parent.parent + / "usr/lib/python3/dist-packages/oslo_messaging/_drivers/impl_rabbit.py" + ) + tree = ast.parse(_read(driver)) + option = any( + isinstance(node, ast.Call) + and isinstance(node.func, ast.Attribute) + and node.func.attr == "BoolOpt" + and node.args + and isinstance(node.args[0], ast.Constant) + and node.args[0].value == "ssl_enforce_hostname_verification" + for node in ast.walk(tree) + ) + forwards_hostname = any( + isinstance(node, ast.Subscript) + and isinstance(node.ctx, ast.Store) + and isinstance(node.slice, ast.Constant) + and node.slice.value == "server_hostname" + for method in ast.walk(tree) + if isinstance(method, ast.FunctionDef) + and method.name == "_fetch_ssl_params" + for node in ast.walk(method) + ) + if not (option and forwards_hostname): + raise RuntimeError( + "The bundled RabbitMQ client cannot verify the broker hostname." + ) + + def _render_service(self, service: str) -> Service: + command = shlex.join( + [ + "/bin/sh", + "-c", + ( + 'export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages"; ' + 'exec "$SNAP/usr/bin/python3.14" "$SNAP/usr/bin/neutron-bgp-dragent" "$@"' + ), + "neutron-bgp-dragent", + "--config-file", + str(self._service_path(service) / "agent.conf"), + ] + ) + # Only the host reconciler may start a service after checking protection. + return { + "command": command, + "override": "replace", + "startup": "disabled", + "on-failure": "ignore", + "on-success": "ignore", + } + + def _update_layer(self, services: dict[str, Service]) -> None: + """Merge only the NDR layer into the running supervisor.""" + update = self.directory / "update.yaml" + _write_private(update, json.dumps({"services": services}, sort_keys=True)) + try: + self._run_pebble("add", "--combine", "ndr", str(update)) + finally: + update.unlink(missing_ok=True) + + def has_state(self) -> bool: + """Return whether there might be a saved NDR plan or interrupted update.""" + return ( + self.layer.exists() + or self.legacy_layer.exists() + or any(self.directory.glob("agents/*/agent.conf")) + ) + + def _inventory(self) -> _PebbleInventory: + saved = _read(self.layer) + legacy = _read(self.legacy_layer) + return _PebbleInventory( + layer=cast(PebbleLayer, json.loads(saved)) if saved else PebbleLayer(), + legacy_services=set(json.loads(legacy)["services"]) if legacy else set(), + configs={ + path.parent.name for path in self.directory.glob("agents/*/agent.conf") + }, + shared=any(path != self.layer for path in self.layer.parent.glob("*.yaml")), + ) + + def _live_services(self) -> dict[str, ServiceStatus] | None: + if not self.socket.exists(): + return None + try: + return self._list_services() + except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as error: + raise RuntimeError("The NDR Pebble supervisor is unreachable.") from error + + def _stop_supervisor(self) -> None: + subprocess.run( + ["snapctl", "stop", "--disable", _PEBBLE_APP], check=True, timeout=35 + ) + # A killed supervisor can leave its socket on disk. + if self.socket.is_socket(): + self.socket.unlink(missing_ok=True) + + def stop_unwanted(self, keep: set[str]) -> None: + """Stop removed NDR agents before retiring any host resources.""" + inventory = self._inventory() + if not (unwanted := (inventory.configured | inventory.configs) - keep): + return + services = self._live_services() or {} + if retired := { + name + for name in unwanted & services.keys() + if services[name]["current"] != "inactive" + }: + self._run_pebble("stop", *sorted(retired)) + + def services_started(self, names: set[str]) -> bool: + """Check whether all NDR services cleared for startup are active.""" + if not names: + return True + services = self._live_services() or {} + return all( + name in services and services[name]["current"] == "active" for name in names + ) + + def _list_services(self) -> dict[str, ServiceStatus]: + result = subprocess.run( + [str(self.pebble), "services", "--format=json"], + env=self.env, + capture_output=True, + text=True, + check=True, + timeout=35, + ) + return json.loads(result.stdout)["services"] + + def apply( + self, + agents: list[Agent], + *, + transport: str = "", + ca_cert: str = "", + ) -> None: + """Reconcile instances while keeping unaffected BGP sessions running.""" + if not agents: + ca_cert = "" + inventory = self._inventory() + configured = inventory.configured + if not (agents or inventory.layer or configured or inventory.configs): + return + try: + live = self._live_services() + except RuntimeError: + if agents or inventory.shared: + raise + live = None + if live is None and not (agents or inventory.shared): + # Stop the daemon through snapd before discarding its private files. + self._stop_supervisor() + + previous_plan = inventory.layer + current = previous_plan.get("services", {}).copy() + if live is not None: + # An interrupted reconcile may have started an agent before saving the layer. + pending = inventory.configs - configured + current.update( + {name: self._render_service(name) for name in pending & live.keys()} + ) + configured |= inventory.configs + desired = { + agent.service: self._render_service(agent.service) for agent in agents + } + agent_configs = { + agent.service: self._render_agent(agent, transport, bool(ca_cert)) + for agent in agents + } + ca_changed = _read(self.ca_file) != ca_cert + changed_configs = { + name + for name, config in agent_configs.items() + if _read(self._service_path(name) / "agent.conf") != config + } + affected = [ + name + for name in current + if name not in desired + or current[name] != desired[name] + or ca_changed + or name in changed_configs + ] + if live is not None and affected: + self._run_pebble("stop", *affected) + + if ca_cert and ca_changed: + _write_private(self.ca_file, ca_cert) + if desired: + self.logs.mkdir(mode=0o755, parents=True, exist_ok=True) + for name, config in agent_configs.items(): + service_path = self._service_path(name) + (service_path / "state").mkdir(mode=0o700, parents=True, exist_ok=True) + if name in changed_configs: + _write_private(service_path / "agent.conf", config) + + plan: PebbleLayer = {"services": desired} + removed = configured - desired.keys() + if live is not None and (desired or current): + # Pebble merges layers in memory. Disable removed entries there and + # omit them from the on-disk layer for the next supervisor start. + additions = dict(desired) + for name in current.keys() - desired.keys(): + additions[name] = {**current[name], "startup": "disabled"} + self._update_layer(additions) + if desired: + self._run_pebble("start", *desired) + for name in removed: + (self._service_path(name) / "agent.conf").unlink(missing_ok=True) + if not ca_cert: + self.ca_file.unlink(missing_ok=True) + if desired: + _write_private(self.layer, json.dumps(plan, sort_keys=True)) + if live is None: + subprocess.run( + ["snapctl", "start", "--enable", _PEBBLE_APP], + check=True, + timeout=35, + ) + else: + # Retain the cleanup index until the services and files are retired. + self.layer.unlink(missing_ok=True) + self.legacy_layer.unlink(missing_ok=True) diff --git a/openstack_network_agents/core/templates.py b/openstack_network_agents/core/templates.py new file mode 100644 index 0000000..43c97ea --- /dev/null +++ b/openstack_network_agents/core/templates.py @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +"""Render configuration from templates shipped with the Python package.""" + +from jinja2 import Environment, PackageLoader, StrictUndefined, Template + +_environment = Environment( + loader=PackageLoader("openstack_network_agents"), + undefined=StrictUndefined, + keep_trailing_newline=True, + trim_blocks=True, +) + + +def get_template(name: str) -> Template: + """Load a configuration template by name.""" + return _environment.get_template(name) diff --git a/openstack_network_agents/templates/ndr-agent.conf.j2 b/openstack_network_agents/templates/ndr-agent.conf.j2 new file mode 100644 index 0000000..54dd71a --- /dev/null +++ b/openstack_network_agents/templates/ndr-agent.conf.j2 @@ -0,0 +1,19 @@ +{# SPDX-FileCopyrightText: 2026 - Canonical Ltd + SPDX-License-Identifier: Apache-2.0 -#} +[DEFAULT] +host = {{ host }} +state_path = {{ state_path }} +transport_url = {{ transport_url }} +log_file = {{ log_file }} +use_stderr = true +log_rotation_type = size +max_logfile_size_mb = 10 +max_logfile_count = 5 +[BGP] +bgp_speaker_driver = neutron_dynamic_routing.services.bgp.agent.driver.os_ken.driver.OsKenBgpDriver +bgp_router_id = {{ router_id }} +[oslo_messaging_rabbit] +rabbit_quorum_queue = true +ssl = {{ tls | lower }} +ssl_ca_file = {{ ca_file }} +ssl_enforce_hostname_verification = true diff --git a/pyproject.toml b/pyproject.toml index c0e1742..a3b9bec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,10 +31,12 @@ classifiers = [ dependencies = [ "click>=8.3.1", + "jinja2>=3.1", "prettytable>=3.17.0", "pydantic>=2,<3", "pyroute2==0.7.11", "snap-helpers @ git+https://github.com/albertodonato/snap-helpers@76f8166b640163c0f20887829e31b2cafbfdec11", + "sunbeam-ndr-contract==2027.1.0.dev0", ] [project.optional-dependencies] @@ -58,8 +60,12 @@ openstack-network-agents = "openstack_network_agents.cli.main:main" configure = "openstack_network_agents.hooks.configure:hook" install = "openstack_network_agents.hooks.install:hook" -[tool.setuptools] -packages = ["openstack_network_agents"] +[tool.setuptools.packages.find] +include = ["openstack_network_agents*"] +namespaces = false + +[tool.setuptools.package-data] +openstack_network_agents = ["templates/*.j2"] # Testing tools configuration [tool.coverage.run] diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 573d98c..8a30a62 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -10,6 +10,7 @@ description: | connectivity. - NIC discovery: identifies candidate uplink interfaces, filtering out virtual devices and bond members. + - Optional Neutron Dynamic Routing agents supervised by Pebble. - A CLI for manual inspection and one-shot configuration (setup-bridge, show-bridge-setup, list-nics). @@ -32,10 +33,19 @@ platforms: arm64: s390x: +package-repositories: + - type: apt + cloud: hibiscus + pocket: updates + priority: always + environment: PYTHONPATH: $SNAP/usr/lib/python3.14:$SNAP/usr/lib/python3.14/site-packages:$SNAP/lib/python3.14:$SNAP/lib/python3.14/site-packages:$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH plugs: + shared-memory: + interface: shared-memory + private: true network-control: interface: network-control network: @@ -44,6 +54,14 @@ plugs: interface: content target: $SNAP_DATA/microovn/chassis +slots: + openstack-network-agents-logs: + interface: content + content: logs + source: + read: + - $SNAP_COMMON/ndr-logs + apps: openstack-network-agents: environment: @@ -56,6 +74,18 @@ apps: - ovn-chassis - firewall-control + pebble: + command: bin/openstack-network-agents start-pebble + daemon: simple + install-mode: disable + restart-condition: on-failure + environment: + PEBBLE: $SNAP_COMMON/pebble + plugs: + - network + - network-bind + - shared-memory + parts: snap-version: plugin: nil @@ -83,6 +113,7 @@ parts: stage-packages: - openvswitch-switch - python3.14-minimal + - neutron-bgp-dragent override-build: | craftctl default snap-helpers write-hooks @@ -92,6 +123,13 @@ parts: ln -s python3 $CRAFT_PART_INSTALL/bin/python ln -s ../usr/bin/python3.14 $CRAFT_PART_INSTALL/bin/python3.14 + pebble: + plugin: nil + stage-snaps: + - pebble@latest/stable + stage: + - bin/pebble + hooks: install: plugs: [network, network-control, ovn-chassis, firewall-control] diff --git a/tests/unit/core/test_dynamic_routing.py b/tests/unit/core/test_dynamic_routing.py new file mode 100644 index 0000000..11752c8 --- /dev/null +++ b/tests/unit/core/test_dynamic_routing.py @@ -0,0 +1,408 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +import json +import stat +from configparser import ConfigParser +from subprocess import CalledProcessError +from unittest.mock import call, patch + +import pytest +from sunbeam_ndr_contract import Agent + +from openstack_network_agents.core.dynamic_routing import ( + DynamicRouting, + parse_config, +) + + +def _apply(routing, raw): + config = parse_config(raw) + routing.apply( + config.agents_for({item.agent.domain for item in config.placement}), + transport=config.transport, + ca_cert=config.ca_cert, + ) + + +def _instance(name, router_id="192.0.2.1", family="ipv4"): + return { + "domain": name, + "family": family, + "service-name": f"agent-{name}-v{family[-1]}", + "host": f"agent-{name}-v{family[-1]}-node-01", + "router-id": router_id, + "peering": {"dedicated-uplink": {"interface": "test0"}}, + } + + +def _config(*agents, **settings): + return json.dumps( + { + "instances": agents, + "transport-url": "rabbit://neutron:secret@192.0.2.10:5672/openstack", + **settings, + } + ) + + +@pytest.mark.parametrize( + "raw", + [ + "{", + {}, + False, + _config( + _instance("client"), **{"transport-url": "rabbit://invalid\n[DEFAULT]"} + ), + _config(_instance("client"), **{"ca-cert": "not a certificate"}), + _config(_instance("../client")), + _config(_instance("client"), _instance("public")), + _config(_instance("client", family="ipv5")), + _config(_instance("client"), _instance("client", "192.0.2.2", "ipv6")), + ], + ids=[ + "malformed", + "object", + "boolean", + "newline", + "invalid-ca", + "path", + "duplicate-router-id", + "unknown-family", + "duplicate-peered-domain", + ], +) +def test_invalid_config_has_no_side_effects(tmp_path, raw): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + with ( + patch("subprocess.run") as run, + pytest.raises((TypeError, ValueError)) as error, + ): + _apply(routing, raw) + + assert "secret" not in str(error.value) + run.assert_not_called() + assert not routing.directory.exists() + + +def test_unconfigured_daemon_does_not_start(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + with patch("subprocess.run") as run: + _apply(routing, None) + _apply(routing, _config()) + _apply(routing, {"instances": [_instance("client")]}) + + run.assert_not_called() + assert not routing.directory.exists() + + +def test_refresh_pauses_legacy_startup_without_touching_other_layers(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + routing.layer.parent.mkdir(parents=True) + other = routing.layer.parent / "010-other.yaml" + other.write_text("services: {}") + routing.layer.write_text( + json.dumps( + { + "services": { + "agent-red-v4": {"startup": "enabled", "command": "/agent"} + }, + "log-targets": {"old-loki": {"type": "loki"}}, + } + ) + ) + + routing.guard_supervisor_start() + + assert other.read_text() == "services: {}" + assert "log-targets" not in json.loads(routing.layer.read_text()) + assert json.loads(routing.layer.read_text())["services"] == { + "agent-red-v4": {"startup": "disabled", "command": "/agent"} + } + + +def test_peered_agents_only_start_through_host_reconciliation(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + instance = { + **_instance("red"), + "peering": {"dedicated-uplink": {"interface": "red0", "address": "192.0.2.3"}}, + } + with patch("subprocess.run"): + _apply(routing, _config(instance)) + + service = json.loads(routing.layer.read_text())["services"]["agent-red-v4"] + assert service["startup"] == "disabled" + assert service["on-failure"] == "ignore" + assert service["on-success"] == "ignore" + + +def test_tls_configuration_requires_hostname_capability(tmp_path): + snap = tmp_path / "snap" + routing = DynamicRouting(tmp_path, snap) + driver = ( + snap / "usr/lib/python3/dist-packages/oslo_messaging/_drivers/impl_rabbit.py" + ) + driver.parent.mkdir(parents=True) + driver.write_text("ssl_ca_file") + with pytest.raises(RuntimeError, match="cannot verify the broker hostname"): + routing.verify_tls_support() + + driver.write_text( + "cfg.BoolOpt('ssl_enforce_hostname_verification', default=False)\n" + "def _fetch_ssl_params(self):\n" + " ssl_params = {}\n" + " ssl_params['server_hostname'] = self.ssl_server_hostname\n" + " return ssl_params\n" + ) + routing.verify_tls_support() + config = routing._render_agent( + Agent("agent-red-v4", "net-01.red.v4", "198.18.0.1"), "rabbit://broker", True + ) + assert "ssl_enforce_hostname_verification = true" in config + assert f"ssl_ca_file = {routing.ca_file}" in config + + +@pytest.mark.parametrize("tls", [False, True]) +def test_agent_config_uses_the_same_broker_options_in_both_tls_modes(tmp_path, tls): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + agent = Agent("agent-client6-v6", "net-01.client.v6", "198.18.0.1") + transport = "rabbit://neutron:p%40ss%26word@broker" + config = ConfigParser(interpolation=None) + config.read_string(routing._render_agent(agent, transport, tls)) + + assert config["DEFAULT"]["transport_url"] == transport + assert config["DEFAULT"]["host"] == agent.host + assert config["BGP"]["bgp_router_id"] == agent.router_id + rabbit = config["oslo_messaging_rabbit"] + assert rabbit.getboolean("ssl") is tls + assert rabbit["ssl_ca_file"] == str(routing.ca_file) + assert rabbit.getboolean("ssl_enforce_hostname_verification") + + +def test_agents_write_separate_rotating_logs_in_the_shared_slot(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + with patch("subprocess.run"): + _apply(routing, _config(_instance("alpha"), _instance("beta", "192.0.2.2"))) + + assert routing.logs.is_dir() + for name in ("agent-alpha-v4", "agent-beta-v4"): + config = ConfigParser(interpolation=None) + config.read(routing.directory / "agents" / name / "agent.conf") + assert config["DEFAULT"]["log_file"] == str(routing.logs / f"{name}.log") + assert config["DEFAULT"].getboolean("use_stderr") + assert config["DEFAULT"]["log_rotation_type"] == "size" + assert config["DEFAULT"].getint("max_logfile_size_mb") == 10 + assert config["DEFAULT"].getint("max_logfile_count") == 5 + + +def test_placement_without_transport_stops_agents(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + instance = _instance("client") + config = json.loads(_config(instance)) + + with ( + patch("subprocess.run") as run, + patch.object(routing, "_list_services", return_value={}), + patch.object(routing, "_run_pebble", return_value=True) as pebble, + ): + _apply(routing, config) + path = routing.directory / "agents" / "agent-client-v4" / "agent.conf" + assert path.exists() + + (routing.pebble_dir / ".pebble.socket").touch() + run.reset_mock() + _apply(routing, {"instances": [instance]}) + assert call("stop", "agent-client-v4") in pebble.call_args_list + run.assert_not_called() + assert not path.exists() + assert not routing.layer.exists() + + _apply(routing, config) + assert call("start", "agent-client-v4") in pebble.call_args_list + assert path.exists() + + +def test_reconcile_independent_agents_then_unset(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + alpha = _instance("alpha") + beta = _instance("beta", "192.0.2.2") + + with ( + patch("subprocess.run") as run, + patch.object(routing, "_list_services", return_value={}), + patch.object(routing, "_run_pebble", return_value=True) as pebble, + ): + # snapctl can already have decoded the JSON object. + _apply(routing, json.loads(_config(alpha))) + assert run.call_args.args[0] == [ + "snapctl", + "start", + "--enable", + "openstack-network-agents.pebble", + ] + alpha_file = routing.directory / "agents" / "agent-alpha-v4" / "agent.conf" + assert stat.S_IMODE(alpha_file.stat().st_mode) == 0o600 + assert "host = agent-alpha-v4-node-01" in alpha_file.read_text() + assert "bgp_router_id = 192.0.2.1" in alpha_file.read_text() + assert "os_ken.driver.OsKenBgpDriver" in alpha_file.read_text() + assert "rabbit_quorum_queue = true" in alpha_file.read_text() + assert "secret" not in routing.layer.read_text() + + routing.socket.touch() + run.reset_mock() + pebble.reset_mock() + _apply(routing, _config(alpha, beta)) + run.assert_not_called() + assert not any(entry.args[0] == "stop" for entry in pebble.call_args_list) + assert call("start", "agent-alpha-v4", "agent-beta-v4") in pebble.call_args_list + assert set(json.loads(routing.layer.read_text())["services"]) == { + "agent-alpha-v4", + "agent-beta-v4", + } + + pebble.reset_mock() + _apply(routing, _config(beta)) + assert call("stop", "agent-alpha-v4") in pebble.call_args_list + assert not alpha_file.exists() + assert set(json.loads(routing.layer.read_text())["services"]) == { + "agent-beta-v4" + } + + _apply(routing, None) + run.assert_not_called() + assert not routing.layer.exists() + assert not ( + routing.directory / "agents" / "agent-beta-v4" / "agent.conf" + ).exists() + + +def test_apply_and_clear_only_the_ndr_layer_on_shared_pebble(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + other_layer = routing.layer.parent / "002-other.yaml" + other_layer.parent.mkdir(parents=True) + other_layer.write_text('{"services": {"other": {"command": "sleep 60"}}}') + routing.socket.touch() + updates = [] + + def run_pebble(*args, **kwargs): + if args[0] == "add": + assert args[1:3] == ("--combine", "ndr") + updates.append( + json.loads(routing.directory.joinpath("update.yaml").read_text()) + ) + return True + + with ( + patch("subprocess.run") as snapctl, + patch.object(routing, "_list_services", return_value={}), + patch.object(routing, "_run_pebble", side_effect=run_pebble) as pebble, + ): + _apply(routing, _config(_instance("alpha"))) + _apply(routing, None) + + assert [ + entry.args for entry in pebble.call_args_list if entry.args[0] == "stop" + ] == [("stop", "agent-alpha-v4")] + assert [update["services"]["agent-alpha-v4"]["startup"] for update in updates] == [ + "disabled", + "disabled", + ] + snapctl.assert_not_called() + assert other_layer.exists() + assert not routing.layer.exists() + + +def test_unreachable_pebble_does_not_block_clear_of_sole_layer(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + with patch("subprocess.run") as snapctl: + _apply(routing, _config(_instance("alpha"))) + (routing.pebble_dir / ".pebble.socket").touch() + with patch.object( + routing, "_list_services", side_effect=CalledProcessError(1, "pebble") + ): + _apply(routing, None) + + assert snapctl.call_args.args[0] == [ + "snapctl", + "stop", + "--disable", + "openstack-network-agents.pebble", + ] + assert not routing.layer.exists() + assert not list(routing.directory.rglob("agent.conf")) + + +def test_clear_retires_services_started_before_layer_was_saved(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + with patch("subprocess.run") as run: + _apply(routing, _config(_instance("alpha"))) + pending = routing.directory / "agents/agent-beta-v4/agent.conf" + pending.parent.mkdir() + pending.write_text("transport_url = rabbit://disposable") + routing.socket.touch() + run.return_value.stdout = json.dumps( + { + "services": { + name: {} for name in ("agent-alpha-v4", "agent-beta-v4", "other") + } + } + ) + with patch.object(routing, "_run_pebble", return_value=True) as pebble: + _apply(routing, None) + + assert call("stop", "agent-alpha-v4", "agent-beta-v4") in pebble.call_args_list + assert not pending.exists() + assert not routing.layer.exists() + + +def test_changing_config_restarts_only_affected_agent(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + alpha = _instance("alpha") + beta = _instance("beta", "192.0.2.2") + with ( + patch("subprocess.run"), + patch.object(routing, "_list_services", return_value={}), + patch.object(routing, "_run_pebble", return_value=True) as pebble, + ): + _apply(routing, _config(alpha, beta)) + routing.socket.touch() + pebble.reset_mock() + _apply(routing, _config(_instance("alpha", "192.0.2.3"), beta)) + + assert [ + entry.args for entry in pebble.call_args_list if entry.args[0] == "stop" + ] == [("stop", "agent-alpha-v4")] + assert call("start", "agent-alpha-v4", "agent-beta-v4") in pebble.call_args_list + + +def test_dual_stack_reconciles_each_family_independently(tmp_path): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + ipv4 = _instance("client") + ipv6 = _instance("client6", "192.0.2.2", "ipv6") + + with ( + patch("subprocess.run"), + patch.object(routing, "_list_services", return_value={}), + patch.object(routing, "_run_pebble", return_value=True) as pebble, + ): + _apply(routing, _config(ipv4)) + routing.socket.touch() + pebble.reset_mock() + + _apply(routing, _config(ipv4, ipv6)) + assert not any(entry.args[0] == "stop" for entry in pebble.call_args_list) + ipv6_config = routing.directory / "agents" / "agent-client6-v6" / "agent.conf" + assert "host = agent-client6-v6-node-01" in ipv6_config.read_text() + assert "bgp_router_id = 192.0.2.2" in ipv6_config.read_text() + assert set(json.loads(routing.layer.read_text())["services"]) == { + "agent-client-v4", + "agent-client6-v6", + } + + pebble.reset_mock() + _apply(routing, _config(ipv4)) + assert [ + entry.args for entry in pebble.call_args_list if entry.args[0] == "stop" + ] == [("stop", "agent-client6-v6")] + assert not ipv6_config.exists() diff --git a/uv.lock b/uv.lock index adc9ad7..07a2a6d 100644 --- a/uv.lock +++ b/uv.lock @@ -1,14 +1,23 @@ version = 1 -revision = 1 -requires-python = ">=3.14.0, <3.15" +revision = 3 +requires-python = "==3.14.*" [[package]] name = "annotated-types" version = "0.7.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081 } +sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643 }, + { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, +] + +[[package]] +name = "astroid" +version = "4.3.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2d/87/5732fa68bf100a095cfcbd108f919220d995db99e1a7502b8119a869fd62/astroid-4.3.4.tar.gz", hash = "sha256:d515a105722b72098bbe82d430d65e635f742b6cbac3bdfaf8b7c188b87c5e39", size = 444627, upload-time = "2026-10-08T09:36:44.122Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/16/d4/f23c0ac6e6de33ba5686cb21c672c95e0c2d3d4c9351f16d3b5fed818652/astroid-4.3.4-py3-none-any.whl", hash = "sha256:2bcd0d02648a443a4b818c952c3550091989daefac3c12d3b83b2289482e0818", size = 288310, upload-time = "2026-10-08T09:36:42.284Z" }, ] [[package]] @@ -18,100 +27,208 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065 } +sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274 }, + { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" }, ] [[package]] name = "colorama" version = "0.4.6" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] [[package]] name = "coverage" version = "7.13.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/24/56/95b7e30fa389756cb56630faa728da46a27b8c6eb46f9d557c68fff12b65/coverage-7.13.4.tar.gz", hash = "sha256:e5c8f6ed1e61a8b2dcdf31eb0b9bbf0130750ca79c1c49eb898e2ad86f5ccc91", size = 827239 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/92/11/a9cf762bb83386467737d32187756a42094927150c3e107df4cb078e8590/coverage-7.13.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:300deaee342f90696ed186e3a00c71b5b3d27bffe9e827677954f4ee56969601", size = 219522 }, - { url = "https://files.pythonhosted.org/packages/d3/28/56e6d892b7b052236d67c95f1936b6a7cf7c3e2634bf27610b8cbd7f9c60/coverage-7.13.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:29e3220258d682b6226a9b0925bc563ed9a1ebcff3cad30f043eceea7eaf2689", size = 219855 }, - { url = "https://files.pythonhosted.org/packages/e5/69/233459ee9eb0c0d10fcc2fe425a029b3fa5ce0f040c966ebce851d030c70/coverage-7.13.4-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:391ee8f19bef69210978363ca930f7328081c6a0152f1166c91f0b5fdd2a773c", size = 250887 }, - { url = "https://files.pythonhosted.org/packages/06/90/2cdab0974b9b5bbc1623f7876b73603aecac11b8d95b85b5b86b32de5eab/coverage-7.13.4-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:0dd7ab8278f0d58a0128ba2fca25824321f05d059c1441800e934ff2efa52129", size = 253396 }, - { url = "https://files.pythonhosted.org/packages/ac/15/ea4da0f85bf7d7b27635039e649e99deb8173fe551096ea15017f7053537/coverage-7.13.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:78cdf0d578b15148b009ccf18c686aa4f719d887e76e6b40c38ffb61d264a552", size = 254745 }, - { url = "https://files.pythonhosted.org/packages/99/11/bb356e86920c655ca4d61daee4e2bbc7258f0a37de0be32d233b561134ff/coverage-7.13.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:48685fee12c2eb3b27c62f2658e7ea21e9c3239cba5a8a242801a0a3f6a8c62a", size = 257055 }, - { url = "https://files.pythonhosted.org/packages/c9/0f/9ae1f8cb17029e09da06ca4e28c9e1d5c1c0a511c7074592e37e0836c915/coverage-7.13.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4e83efc079eb39480e6346a15a1bcb3e9b04759c5202d157e1dd4303cd619356", size = 250911 }, - { url = "https://files.pythonhosted.org/packages/89/3a/adfb68558fa815cbc29747b553bc833d2150228f251b127f1ce97e48547c/coverage-7.13.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ecae9737b72408d6a950f7e525f30aca12d4bd8dd95e37342e5beb3a2a8c4f71", size = 252754 }, - { url = "https://files.pythonhosted.org/packages/32/b1/540d0c27c4e748bd3cd0bd001076ee416eda993c2bae47a73b7cc9357931/coverage-7.13.4-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ae4578f8528569d3cf303fef2ea569c7f4c4059a38c8667ccef15c6e1f118aa5", size = 250720 }, - { url = "https://files.pythonhosted.org/packages/c7/95/383609462b3ffb1fe133014a7c84fc0dd01ed55ac6140fa1093b5af7ebb1/coverage-7.13.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:6fdef321fdfbb30a197efa02d48fcd9981f0d8ad2ae8903ac318adc653f5df98", size = 254994 }, - { url = "https://files.pythonhosted.org/packages/f7/ba/1761138e86c81680bfc3c49579d66312865457f9fe405b033184e5793cb3/coverage-7.13.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b0f6ccf3dbe577170bebfce1318707d0e8c3650003cb4b3a9dd744575daa8b5", size = 250531 }, - { url = "https://files.pythonhosted.org/packages/f8/8e/05900df797a9c11837ab59c4d6fe94094e029582aab75c3309a93e6fb4e3/coverage-7.13.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75fcd519f2a5765db3f0e391eb3b7d150cce1a771bf4c9f861aeab86c767a3c0", size = 252189 }, - { url = "https://files.pythonhosted.org/packages/00/bd/29c9f2db9ea4ed2738b8a9508c35626eb205d51af4ab7bf56a21a2e49926/coverage-7.13.4-cp314-cp314-win32.whl", hash = "sha256:8e798c266c378da2bd819b0677df41ab46d78065fb2a399558f3f6cae78b2fbb", size = 222258 }, - { url = "https://files.pythonhosted.org/packages/a7/4d/1f8e723f6829977410efeb88f73673d794075091c8c7c18848d273dc9d73/coverage-7.13.4-cp314-cp314-win_amd64.whl", hash = "sha256:245e37f664d89861cf2329c9afa2c1fe9e6d4e1a09d872c947e70718aeeac505", size = 223073 }, - { url = "https://files.pythonhosted.org/packages/51/5b/84100025be913b44e082ea32abcf1afbf4e872f5120b7a1cab1d331b1e13/coverage-7.13.4-cp314-cp314-win_arm64.whl", hash = "sha256:ad27098a189e5838900ce4c2a99f2fe42a0bf0c2093c17c69b45a71579e8d4a2", size = 221638 }, - { url = "https://files.pythonhosted.org/packages/a7/e4/c884a405d6ead1370433dad1e3720216b4f9fd8ef5b64bfd984a2a60a11a/coverage-7.13.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:85480adfb35ffc32d40918aad81b89c69c9cc5661a9b8a81476d3e645321a056", size = 220246 }, - { url = "https://files.pythonhosted.org/packages/81/5c/4d7ed8b23b233b0fffbc9dfec53c232be2e695468523242ea9fd30f97ad2/coverage-7.13.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:79be69cf7f3bf9b0deeeb062eab7ac7f36cd4cc4c4dd694bd28921ba4d8596cc", size = 220514 }, - { url = "https://files.pythonhosted.org/packages/2f/6f/3284d4203fd2f28edd73034968398cd2d4cb04ab192abc8cff007ea35679/coverage-7.13.4-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:caa421e2684e382c5d8973ac55e4f36bed6821a9bad5c953494de960c74595c9", size = 261877 }, - { url = "https://files.pythonhosted.org/packages/09/aa/b672a647bbe1556a85337dc95bfd40d146e9965ead9cc2fe81bde1e5cbce/coverage-7.13.4-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:14375934243ee05f56c45393fe2ce81fe5cc503c07cee2bdf1725fb8bef3ffaf", size = 264004 }, - { url = "https://files.pythonhosted.org/packages/79/a1/aa384dbe9181f98bba87dd23dda436f0c6cf2e148aecbb4e50fc51c1a656/coverage-7.13.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:25a41c3104d08edb094d9db0d905ca54d0cd41c928bb6be3c4c799a54753af55", size = 266408 }, - { url = "https://files.pythonhosted.org/packages/53/5e/5150bf17b4019bc600799f376bb9606941e55bd5a775dc1e096b6ffea952/coverage-7.13.4-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6f01afcff62bf9a08fb32b2c1d6e924236c0383c02c790732b6537269e466a72", size = 267544 }, - { url = "https://files.pythonhosted.org/packages/e0/ed/f1de5c675987a4a7a672250d2c5c9d73d289dbf13410f00ed7181d8017dd/coverage-7.13.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eb9078108fbf0bcdde37c3f4779303673c2fa1fe8f7956e68d447d0dd426d38a", size = 260980 }, - { url = "https://files.pythonhosted.org/packages/b3/e3/fe758d01850aa172419a6743fe76ba8b92c29d181d4f676ffe2dae2ba631/coverage-7.13.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0e086334e8537ddd17e5f16a344777c1ab8194986ec533711cbe6c41cde841b6", size = 263871 }, - { url = "https://files.pythonhosted.org/packages/b6/76/b829869d464115e22499541def9796b25312b8cf235d3bb00b39f1675395/coverage-7.13.4-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:725d985c5ab621268b2edb8e50dfe57633dc69bda071abc470fed55a14935fd3", size = 261472 }, - { url = "https://files.pythonhosted.org/packages/14/9e/caedb1679e73e2f6ad240173f55218488bfe043e38da577c4ec977489915/coverage-7.13.4-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:3c06f0f1337c667b971ca2f975523347e63ec5e500b9aa5882d91931cd3ef750", size = 265210 }, - { url = "https://files.pythonhosted.org/packages/3a/10/0dd02cb009b16ede425b49ec344aba13a6ae1dc39600840ea6abcb085ac4/coverage-7.13.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:590c0ed4bf8e85f745e6b805b2e1c457b2e33d5255dd9729743165253bc9ad39", size = 260319 }, - { url = "https://files.pythonhosted.org/packages/92/8e/234d2c927af27c6d7a5ffad5bd2cf31634c46a477b4c7adfbfa66baf7ebb/coverage-7.13.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:eb30bf180de3f632cd043322dad5751390e5385108b2807368997d1a92a509d0", size = 262638 }, - { url = "https://files.pythonhosted.org/packages/2f/64/e5547c8ff6964e5965c35a480855911b61509cce544f4d442caa759a0702/coverage-7.13.4-cp314-cp314t-win32.whl", hash = "sha256:c4240e7eded42d131a2d2c4dec70374b781b043ddc79a9de4d55ca71f8e98aea", size = 223040 }, - { url = "https://files.pythonhosted.org/packages/c7/96/38086d58a181aac86d503dfa9c47eb20715a79c3e3acbdf786e92e5c09a8/coverage-7.13.4-cp314-cp314t-win_amd64.whl", hash = "sha256:4c7d3cc01e7350f2f0f6f7036caaf5673fb56b6998889ccfe9e1c1fe75a9c932", size = 224148 }, - { url = "https://files.pythonhosted.org/packages/ce/72/8d10abd3740a0beb98c305e0c3faf454366221c0f37a8bcf8f60020bb65a/coverage-7.13.4-cp314-cp314t-win_arm64.whl", hash = "sha256:23e3f687cf945070d1c90f85db66d11e3025665d8dafa831301a0e0038f3db9b", size = 222172 }, - { url = "https://files.pythonhosted.org/packages/0d/4a/331fe2caf6799d591109bb9c08083080f6de90a823695d412a935622abb2/coverage-7.13.4-py3-none-any.whl", hash = "sha256:1af1641e57cf7ba1bd67d677c9abdbcd6cc2ab7da3bca7fa1e2b7e50e65f2ad0", size = 211242 }, +sdist = { url = "https://files.pythonhosted.org/packages/24/56/95b7e30fa389756cb56630faa728da46a27b8c6eb46f9d557c68fff12b65/coverage-7.13.4.tar.gz", hash = "sha256:e5c8f6ed1e61a8b2dcdf31eb0b9bbf0130750ca79c1c49eb898e2ad86f5ccc91", size = 827239, upload-time = "2026-02-09T12:59:03.86Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/11/a9cf762bb83386467737d32187756a42094927150c3e107df4cb078e8590/coverage-7.13.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:300deaee342f90696ed186e3a00c71b5b3d27bffe9e827677954f4ee56969601", size = 219522, upload-time = "2026-02-09T12:58:08.623Z" }, + { url = "https://files.pythonhosted.org/packages/d3/28/56e6d892b7b052236d67c95f1936b6a7cf7c3e2634bf27610b8cbd7f9c60/coverage-7.13.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:29e3220258d682b6226a9b0925bc563ed9a1ebcff3cad30f043eceea7eaf2689", size = 219855, upload-time = "2026-02-09T12:58:10.176Z" }, + { url = "https://files.pythonhosted.org/packages/e5/69/233459ee9eb0c0d10fcc2fe425a029b3fa5ce0f040c966ebce851d030c70/coverage-7.13.4-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:391ee8f19bef69210978363ca930f7328081c6a0152f1166c91f0b5fdd2a773c", size = 250887, upload-time = "2026-02-09T12:58:12.503Z" }, + { url = "https://files.pythonhosted.org/packages/06/90/2cdab0974b9b5bbc1623f7876b73603aecac11b8d95b85b5b86b32de5eab/coverage-7.13.4-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:0dd7ab8278f0d58a0128ba2fca25824321f05d059c1441800e934ff2efa52129", size = 253396, upload-time = "2026-02-09T12:58:14.615Z" }, + { url = "https://files.pythonhosted.org/packages/ac/15/ea4da0f85bf7d7b27635039e649e99deb8173fe551096ea15017f7053537/coverage-7.13.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:78cdf0d578b15148b009ccf18c686aa4f719d887e76e6b40c38ffb61d264a552", size = 254745, upload-time = "2026-02-09T12:58:16.162Z" }, + { url = "https://files.pythonhosted.org/packages/99/11/bb356e86920c655ca4d61daee4e2bbc7258f0a37de0be32d233b561134ff/coverage-7.13.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:48685fee12c2eb3b27c62f2658e7ea21e9c3239cba5a8a242801a0a3f6a8c62a", size = 257055, upload-time = "2026-02-09T12:58:17.892Z" }, + { url = "https://files.pythonhosted.org/packages/c9/0f/9ae1f8cb17029e09da06ca4e28c9e1d5c1c0a511c7074592e37e0836c915/coverage-7.13.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4e83efc079eb39480e6346a15a1bcb3e9b04759c5202d157e1dd4303cd619356", size = 250911, upload-time = "2026-02-09T12:58:19.495Z" }, + { url = "https://files.pythonhosted.org/packages/89/3a/adfb68558fa815cbc29747b553bc833d2150228f251b127f1ce97e48547c/coverage-7.13.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ecae9737b72408d6a950f7e525f30aca12d4bd8dd95e37342e5beb3a2a8c4f71", size = 252754, upload-time = "2026-02-09T12:58:21.064Z" }, + { url = "https://files.pythonhosted.org/packages/32/b1/540d0c27c4e748bd3cd0bd001076ee416eda993c2bae47a73b7cc9357931/coverage-7.13.4-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ae4578f8528569d3cf303fef2ea569c7f4c4059a38c8667ccef15c6e1f118aa5", size = 250720, upload-time = "2026-02-09T12:58:22.622Z" }, + { url = "https://files.pythonhosted.org/packages/c7/95/383609462b3ffb1fe133014a7c84fc0dd01ed55ac6140fa1093b5af7ebb1/coverage-7.13.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:6fdef321fdfbb30a197efa02d48fcd9981f0d8ad2ae8903ac318adc653f5df98", size = 254994, upload-time = "2026-02-09T12:58:24.548Z" }, + { url = "https://files.pythonhosted.org/packages/f7/ba/1761138e86c81680bfc3c49579d66312865457f9fe405b033184e5793cb3/coverage-7.13.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b0f6ccf3dbe577170bebfce1318707d0e8c3650003cb4b3a9dd744575daa8b5", size = 250531, upload-time = "2026-02-09T12:58:26.271Z" }, + { url = "https://files.pythonhosted.org/packages/f8/8e/05900df797a9c11837ab59c4d6fe94094e029582aab75c3309a93e6fb4e3/coverage-7.13.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75fcd519f2a5765db3f0e391eb3b7d150cce1a771bf4c9f861aeab86c767a3c0", size = 252189, upload-time = "2026-02-09T12:58:27.807Z" }, + { url = "https://files.pythonhosted.org/packages/00/bd/29c9f2db9ea4ed2738b8a9508c35626eb205d51af4ab7bf56a21a2e49926/coverage-7.13.4-cp314-cp314-win32.whl", hash = "sha256:8e798c266c378da2bd819b0677df41ab46d78065fb2a399558f3f6cae78b2fbb", size = 222258, upload-time = "2026-02-09T12:58:29.441Z" }, + { url = "https://files.pythonhosted.org/packages/a7/4d/1f8e723f6829977410efeb88f73673d794075091c8c7c18848d273dc9d73/coverage-7.13.4-cp314-cp314-win_amd64.whl", hash = "sha256:245e37f664d89861cf2329c9afa2c1fe9e6d4e1a09d872c947e70718aeeac505", size = 223073, upload-time = "2026-02-09T12:58:31.026Z" }, + { url = "https://files.pythonhosted.org/packages/51/5b/84100025be913b44e082ea32abcf1afbf4e872f5120b7a1cab1d331b1e13/coverage-7.13.4-cp314-cp314-win_arm64.whl", hash = "sha256:ad27098a189e5838900ce4c2a99f2fe42a0bf0c2093c17c69b45a71579e8d4a2", size = 221638, upload-time = "2026-02-09T12:58:32.599Z" }, + { url = "https://files.pythonhosted.org/packages/a7/e4/c884a405d6ead1370433dad1e3720216b4f9fd8ef5b64bfd984a2a60a11a/coverage-7.13.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:85480adfb35ffc32d40918aad81b89c69c9cc5661a9b8a81476d3e645321a056", size = 220246, upload-time = "2026-02-09T12:58:34.181Z" }, + { url = "https://files.pythonhosted.org/packages/81/5c/4d7ed8b23b233b0fffbc9dfec53c232be2e695468523242ea9fd30f97ad2/coverage-7.13.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:79be69cf7f3bf9b0deeeb062eab7ac7f36cd4cc4c4dd694bd28921ba4d8596cc", size = 220514, upload-time = "2026-02-09T12:58:35.704Z" }, + { url = "https://files.pythonhosted.org/packages/2f/6f/3284d4203fd2f28edd73034968398cd2d4cb04ab192abc8cff007ea35679/coverage-7.13.4-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:caa421e2684e382c5d8973ac55e4f36bed6821a9bad5c953494de960c74595c9", size = 261877, upload-time = "2026-02-09T12:58:37.864Z" }, + { url = "https://files.pythonhosted.org/packages/09/aa/b672a647bbe1556a85337dc95bfd40d146e9965ead9cc2fe81bde1e5cbce/coverage-7.13.4-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:14375934243ee05f56c45393fe2ce81fe5cc503c07cee2bdf1725fb8bef3ffaf", size = 264004, upload-time = "2026-02-09T12:58:39.492Z" }, + { url = "https://files.pythonhosted.org/packages/79/a1/aa384dbe9181f98bba87dd23dda436f0c6cf2e148aecbb4e50fc51c1a656/coverage-7.13.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:25a41c3104d08edb094d9db0d905ca54d0cd41c928bb6be3c4c799a54753af55", size = 266408, upload-time = "2026-02-09T12:58:41.852Z" }, + { url = "https://files.pythonhosted.org/packages/53/5e/5150bf17b4019bc600799f376bb9606941e55bd5a775dc1e096b6ffea952/coverage-7.13.4-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6f01afcff62bf9a08fb32b2c1d6e924236c0383c02c790732b6537269e466a72", size = 267544, upload-time = "2026-02-09T12:58:44.093Z" }, + { url = "https://files.pythonhosted.org/packages/e0/ed/f1de5c675987a4a7a672250d2c5c9d73d289dbf13410f00ed7181d8017dd/coverage-7.13.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eb9078108fbf0bcdde37c3f4779303673c2fa1fe8f7956e68d447d0dd426d38a", size = 260980, upload-time = "2026-02-09T12:58:45.721Z" }, + { url = "https://files.pythonhosted.org/packages/b3/e3/fe758d01850aa172419a6743fe76ba8b92c29d181d4f676ffe2dae2ba631/coverage-7.13.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0e086334e8537ddd17e5f16a344777c1ab8194986ec533711cbe6c41cde841b6", size = 263871, upload-time = "2026-02-09T12:58:47.334Z" }, + { url = "https://files.pythonhosted.org/packages/b6/76/b829869d464115e22499541def9796b25312b8cf235d3bb00b39f1675395/coverage-7.13.4-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:725d985c5ab621268b2edb8e50dfe57633dc69bda071abc470fed55a14935fd3", size = 261472, upload-time = "2026-02-09T12:58:48.995Z" }, + { url = "https://files.pythonhosted.org/packages/14/9e/caedb1679e73e2f6ad240173f55218488bfe043e38da577c4ec977489915/coverage-7.13.4-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:3c06f0f1337c667b971ca2f975523347e63ec5e500b9aa5882d91931cd3ef750", size = 265210, upload-time = "2026-02-09T12:58:51.178Z" }, + { url = "https://files.pythonhosted.org/packages/3a/10/0dd02cb009b16ede425b49ec344aba13a6ae1dc39600840ea6abcb085ac4/coverage-7.13.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:590c0ed4bf8e85f745e6b805b2e1c457b2e33d5255dd9729743165253bc9ad39", size = 260319, upload-time = "2026-02-09T12:58:53.081Z" }, + { url = "https://files.pythonhosted.org/packages/92/8e/234d2c927af27c6d7a5ffad5bd2cf31634c46a477b4c7adfbfa66baf7ebb/coverage-7.13.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:eb30bf180de3f632cd043322dad5751390e5385108b2807368997d1a92a509d0", size = 262638, upload-time = "2026-02-09T12:58:55.258Z" }, + { url = "https://files.pythonhosted.org/packages/2f/64/e5547c8ff6964e5965c35a480855911b61509cce544f4d442caa759a0702/coverage-7.13.4-cp314-cp314t-win32.whl", hash = "sha256:c4240e7eded42d131a2d2c4dec70374b781b043ddc79a9de4d55ca71f8e98aea", size = 223040, upload-time = "2026-02-09T12:58:56.936Z" }, + { url = "https://files.pythonhosted.org/packages/c7/96/38086d58a181aac86d503dfa9c47eb20715a79c3e3acbdf786e92e5c09a8/coverage-7.13.4-cp314-cp314t-win_amd64.whl", hash = "sha256:4c7d3cc01e7350f2f0f6f7036caaf5673fb56b6998889ccfe9e1c1fe75a9c932", size = 224148, upload-time = "2026-02-09T12:58:58.645Z" }, + { url = "https://files.pythonhosted.org/packages/ce/72/8d10abd3740a0beb98c305e0c3faf454366221c0f37a8bcf8f60020bb65a/coverage-7.13.4-cp314-cp314t-win_arm64.whl", hash = "sha256:23e3f687cf945070d1c90f85db66d11e3025665d8dafa831301a0e0038f3db9b", size = 222172, upload-time = "2026-02-09T12:59:00.396Z" }, + { url = "https://files.pythonhosted.org/packages/0d/4a/331fe2caf6799d591109bb9c08083080f6de90a823695d412a935622abb2/coverage-7.13.4-py3-none-any.whl", hash = "sha256:1af1641e57cf7ba1bd67d677c9abdbcd6cc2ab7da3bca7fa1e2b7e50e65f2ad0", size = 211242, upload-time = "2026-02-09T12:59:02.032Z" }, +] + +[[package]] +name = "dill" +version = "0.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/81/e1/56027a71e31b02ddc53c7d65b01e68edf64dea2932122fe7746a516f75d5/dill-0.4.1.tar.gz", hash = "sha256:423092df4182177d4d8ba8290c8a5b640c66ab35ec7da59ccfa00f6fa3eea5fa", size = 187315, upload-time = "2026-01-19T02:36:56.85Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/77/dc8c558f7593132cf8fefec57c4f60c83b16941c574ac5f619abb3ae7933/dill-0.4.1-py3-none-any.whl", hash = "sha256:1e1ce33e978ae97fcfcff5638477032b801c46c7c65cf717f95fbc2248f79a9d", size = 120019, upload-time = "2026-01-19T02:36:55.663Z" }, +] + +[[package]] +name = "flake8" +version = "7.5.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mccabe" }, + { name = "pycodestyle" }, + { name = "pyflakes" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9a/da/b0d00f8c4c676212284edd3cc3d371588ce0e36a349373c3a01e188b5639/flake8-7.5.0.tar.gz", hash = "sha256:0dab7566341aca0d80aa29b5812bdadf256caa6a63e6068e49ac2649918236a4", size = 47811, upload-time = "2026-10-28T20:17:22.128Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5d/57/a3adc5f380f50ef3d01014cb9d3b8c17b25de9b89def20d559def4fc3c4e/flake8-7.5.0-py2.py3-none-any.whl", hash = "sha256:637ea1a443a78ed6ee461725cdf71ca93bc5cde0abf25436dbebdc3880b4e078", size = 57487, upload-time = "2026-10-28T20:17:21.061Z" }, ] [[package]] name = "iniconfig" version = "2.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503 } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484 }, + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + +[[package]] +name = "isort" +version = "9.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mypy-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/da/cf/068066b8fdab91cd40bcd63e483137908710a3d25a4d3a01b538be45d9d6/isort-9.0.2.tar.gz", hash = "sha256:d2298980ce44350f11d9d24c8150eaef1883431ec203dddbb4e9b5c3ceb54c70", size = 685196, upload-time = "2026-09-28T19:21:58.07Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/53/25/b0dae3025157f020d9010bc126120e703b50ed74ebfb5ca56be81e064d0c/isort-9.0.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:bd8c4fb9829a5e7117d9f71f540ff1e8caafb471e574012057ce6dc35fda2d7b", size = 1039110, upload-time = "2026-09-28T19:21:27.024Z" }, + { url = "https://files.pythonhosted.org/packages/7e/da/f97a4905cf8212c31d584f0222ae8b1deed391e42db910e8e908eb89002e/isort-9.0.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6eb3e714d64de6eba78ee29051f7fc80613c74e90c6f54f84082f59c429c0a0b", size = 1674555, upload-time = "2026-09-28T19:21:28.645Z" }, + { url = "https://files.pythonhosted.org/packages/90/f4/df11f0de3a2796ef1a74071d1331158b67961770c8066850d60f362ba7cc/isort-9.0.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:bf3ef0a91974f29f406e25eef0e04781fd5c2254b8ab55e7655b20d8cd7c5514", size = 1666034, upload-time = "2026-09-28T19:21:30.35Z" }, + { url = "https://files.pythonhosted.org/packages/15/f0/0007f037135659de11f6ef29563b75c8080eeb51d67f37e82128d66613dc/isort-9.0.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:cd1e0e5e61497e95a4e5be269088e6a1013f530aeccf6ebd6134f403285ecd63", size = 464424, upload-time = "2026-09-28T19:21:31.98Z" }, + { url = "https://files.pythonhosted.org/packages/ae/5c/f64d0cc97abbdf6f7902b0e38171e5101842ba75ac22212fd6d254156bb3/isort-9.0.2-cp314-cp314-win_amd64.whl", hash = "sha256:11da67a30f5a88383c71db075488ca3d081f427f53368f90bb1d74e958a9b040", size = 903922, upload-time = "2026-09-28T19:21:33.412Z" }, + { url = "https://files.pythonhosted.org/packages/14/8a/c0bdd165c6cfcb7c87b3acdee5ebc03e10da5317482017084cdf92a2a076/isort-9.0.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f7c2fa33e1c9fbcf9fd639997e4550515c0b712b52ed70a059124a5247825480", size = 1106274, upload-time = "2026-09-28T19:21:35.13Z" }, + { url = "https://files.pythonhosted.org/packages/b9/ec/4ab29f699d58baa7c00840bc66328ce8f06be31cd36250aef8d4f71bd24e/isort-9.0.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:85e859fd72e50c27306d05185f9472ed97fae9e1cce91c0e891260d16f2ecece", size = 1887727, upload-time = "2026-09-28T19:21:37.015Z" }, + { url = "https://files.pythonhosted.org/packages/bc/ec/12f58041288e08c35dc9a719108482c2c599b157ce0913454d57d32c7b5c/isort-9.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:2a960e4252ac5b00f78adc0f731529e122657ee642e650896b36e1ff83028023", size = 1905479, upload-time = "2026-09-28T19:21:38.789Z" }, + { url = "https://files.pythonhosted.org/packages/56/ea/69fd476d07e5dddea5b41d6b3adfad4d2f5d251362f2fb594f2cfd0f5308/isort-9.0.2-cp314-cp314t-win_amd64.whl", hash = "sha256:91b60ce3d96fcb0730d61fc5ab84ee5b56d676fbb92550f7ea333f58778f2f20", size = 928154, upload-time = "2026-09-28T19:21:40.745Z" }, + { url = "https://files.pythonhosted.org/packages/8b/c9/0849e74b868ef10312eecfc24278710e97dd14bc49c1df629d7df142d318/isort-9.0.2-py3-none-any.whl", hash = "sha256:6c29deeb39698a8717823b7f75b2ac58c5e8ab8dcf6cf31205a72a6617fb454e", size = 105052, upload-time = "2026-09-28T19:21:56.512Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, ] [[package]] name = "librt" version = "0.8.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/56/9c/b4b0c54d84da4a94b37bd44151e46d5e583c9534c7e02250b961b1b6d8a8/librt-0.8.1.tar.gz", hash = "sha256:be46a14693955b3bd96014ccbdb8339ee8c9346fbe11c1b78901b55125f14c73", size = 177471 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c9/6a/907ef6800f7bca71b525a05f1839b21f708c09043b1c6aa77b6b827b3996/librt-0.8.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:6cfa7fe54fd4d1f47130017351a959fe5804bda7a0bc7e07a2cdbc3fdd28d34f", size = 66081 }, - { url = "https://files.pythonhosted.org/packages/1b/18/25e991cd5640c9fb0f8d91b18797b29066b792f17bf8493da183bf5caabe/librt-0.8.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:228c2409c079f8c11fb2e5d7b277077f694cb93443eb760e00b3b83cb8b3176c", size = 68309 }, - { url = "https://files.pythonhosted.org/packages/a4/36/46820d03f058cfb5a9de5940640ba03165ed8aded69e0733c417bb04df34/librt-0.8.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7aae78ab5e3206181780e56912d1b9bb9f90a7249ce12f0e8bf531d0462dd0fc", size = 196804 }, - { url = "https://files.pythonhosted.org/packages/59/18/5dd0d3b87b8ff9c061849fbdb347758d1f724b9a82241aa908e0ec54ccd0/librt-0.8.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:172d57ec04346b047ca6af181e1ea4858086c80bdf455f61994c4aa6fc3f866c", size = 206907 }, - { url = "https://files.pythonhosted.org/packages/d1/96/ef04902aad1424fd7299b62d1890e803e6ab4018c3044dca5922319c4b97/librt-0.8.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6b1977c4ea97ce5eb7755a78fae68d87e4102e4aaf54985e8b56806849cc06a3", size = 221217 }, - { url = "https://files.pythonhosted.org/packages/6d/ff/7e01f2dda84a8f5d280637a2e5827210a8acca9a567a54507ef1c75b342d/librt-0.8.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:10c42e1f6fd06733ef65ae7bebce2872bcafd8d6e6b0a08fe0a05a23b044fb14", size = 214622 }, - { url = "https://files.pythonhosted.org/packages/1e/8c/5b093d08a13946034fed57619742f790faf77058558b14ca36a6e331161e/librt-0.8.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4c8dfa264b9193c4ee19113c985c95f876fae5e51f731494fc4e0cf594990ba7", size = 221987 }, - { url = "https://files.pythonhosted.org/packages/d3/cc/86b0b3b151d40920ad45a94ce0171dec1aebba8a9d72bb3fa00c73ab25dd/librt-0.8.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:01170b6729a438f0dedc4a26ed342e3dc4f02d1000b4b19f980e1877f0c297e6", size = 215132 }, - { url = "https://files.pythonhosted.org/packages/fc/be/8588164a46edf1e69858d952654e216a9a91174688eeefb9efbb38a9c799/librt-0.8.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:7b02679a0d783bdae30d443025b94465d8c3dc512f32f5b5031f93f57ac32071", size = 215195 }, - { url = "https://files.pythonhosted.org/packages/f5/f2/0b9279bea735c734d69344ecfe056c1ba211694a72df10f568745c899c76/librt-0.8.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:190b109bb69592a3401fe1ffdea41a2e73370ace2ffdc4a0e8e2b39cdea81b78", size = 237946 }, - { url = "https://files.pythonhosted.org/packages/e9/cc/5f2a34fbc8aeb35314a3641f9956fa9051a947424652fad9882be7a97949/librt-0.8.1-cp314-cp314-win32.whl", hash = "sha256:e70a57ecf89a0f64c24e37f38d3fe217a58169d2fe6ed6d70554964042474023", size = 50689 }, - { url = "https://files.pythonhosted.org/packages/a0/76/cd4d010ab2147339ca2b93e959c3686e964edc6de66ddacc935c325883d7/librt-0.8.1-cp314-cp314-win_amd64.whl", hash = "sha256:7e2f3edca35664499fbb36e4770650c4bd4a08abc1f4458eab9df4ec56389730", size = 57875 }, - { url = "https://files.pythonhosted.org/packages/84/0f/2143cb3c3ca48bd3379dcd11817163ca50781927c4537345d608b5045998/librt-0.8.1-cp314-cp314-win_arm64.whl", hash = "sha256:0d2f82168e55ddefd27c01c654ce52379c0750ddc31ee86b4b266bcf4d65f2a3", size = 48058 }, - { url = "https://files.pythonhosted.org/packages/d2/0e/9b23a87e37baf00311c3efe6b48d6b6c168c29902dfc3f04c338372fd7db/librt-0.8.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2c74a2da57a094bd48d03fa5d196da83d2815678385d2978657499063709abe1", size = 68313 }, - { url = "https://files.pythonhosted.org/packages/db/9a/859c41e5a4f1c84200a7d2b92f586aa27133c8243b6cac9926f6e54d01b9/librt-0.8.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a355d99c4c0d8e5b770313b8b247411ed40949ca44e33e46a4789b9293a907ee", size = 70994 }, - { url = "https://files.pythonhosted.org/packages/4c/28/10605366ee599ed34223ac2bf66404c6fb59399f47108215d16d5ad751a8/librt-0.8.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2eb345e8b33fb748227409c9f1233d4df354d6e54091f0e8fc53acdb2ffedeb7", size = 220770 }, - { url = "https://files.pythonhosted.org/packages/af/8d/16ed8fd452dafae9c48d17a6bc1ee3e818fd40ef718d149a8eff2c9f4ea2/librt-0.8.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9be2f15e53ce4e83cc08adc29b26fb5978db62ef2a366fbdf716c8a6c8901040", size = 235409 }, - { url = "https://files.pythonhosted.org/packages/89/1b/7bdf3e49349c134b25db816e4a3db6b94a47ac69d7d46b1e682c2c4949be/librt-0.8.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:785ae29c1f5c6e7c2cde2c7c0e148147f4503da3abc5d44d482068da5322fd9e", size = 246473 }, - { url = "https://files.pythonhosted.org/packages/4e/8a/91fab8e4fd2a24930a17188c7af5380eb27b203d72101c9cc000dbdfd95a/librt-0.8.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1d3a7da44baf692f0c6aeb5b2a09c5e6fc7a703bca9ffa337ddd2e2da53f7732", size = 238866 }, - { url = "https://files.pythonhosted.org/packages/b9/e0/c45a098843fc7c07e18a7f8a24ca8496aecbf7bdcd54980c6ca1aaa79a8e/librt-0.8.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5fc48998000cbc39ec0d5311312dda93ecf92b39aaf184c5e817d5d440b29624", size = 250248 }, - { url = "https://files.pythonhosted.org/packages/82/30/07627de23036640c952cce0c1fe78972e77d7d2f8fd54fa5ef4554ff4a56/librt-0.8.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:e96baa6820280077a78244b2e06e416480ed859bbd8e5d641cf5742919d8beb4", size = 240629 }, - { url = "https://files.pythonhosted.org/packages/fb/c1/55bfe1ee3542eba055616f9098eaf6eddb966efb0ca0f44eaa4aba327307/librt-0.8.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31362dbfe297b23590530007062c32c6f6176f6099646bb2c95ab1b00a57c382", size = 239615 }, - { url = "https://files.pythonhosted.org/packages/2b/39/191d3d28abc26c9099b19852e6c99f7f6d400b82fa5a4e80291bd3803e19/librt-0.8.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cc3656283d11540ab0ea01978378e73e10002145117055e03722417aeab30994", size = 263001 }, - { url = "https://files.pythonhosted.org/packages/b9/eb/7697f60fbe7042ab4e88f4ee6af496b7f222fffb0a4e3593ef1f29f81652/librt-0.8.1-cp314-cp314t-win32.whl", hash = "sha256:738f08021b3142c2918c03692608baed43bc51144c29e35807682f8070ee2a3a", size = 51328 }, - { url = "https://files.pythonhosted.org/packages/7c/72/34bf2eb7a15414a23e5e70ecb9440c1d3179f393d9349338a91e2781c0fb/librt-0.8.1-cp314-cp314t-win_amd64.whl", hash = "sha256:89815a22daf9c51884fb5dbe4f1ef65ee6a146e0b6a8df05f753e2e4a9359bf4", size = 58722 }, - { url = "https://files.pythonhosted.org/packages/b2/c8/d148e041732d631fc76036f8b30fae4e77b027a1e95b7a84bb522481a940/librt-0.8.1-cp314-cp314t-win_arm64.whl", hash = "sha256:bf512a71a23504ed08103a13c941f763db13fb11177beb3d9244c98c29fb4a61", size = 48755 }, +sdist = { url = "https://files.pythonhosted.org/packages/56/9c/b4b0c54d84da4a94b37bd44151e46d5e583c9534c7e02250b961b1b6d8a8/librt-0.8.1.tar.gz", hash = "sha256:be46a14693955b3bd96014ccbdb8339ee8c9346fbe11c1b78901b55125f14c73", size = 177471, upload-time = "2026-02-17T16:13:06.101Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c9/6a/907ef6800f7bca71b525a05f1839b21f708c09043b1c6aa77b6b827b3996/librt-0.8.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:6cfa7fe54fd4d1f47130017351a959fe5804bda7a0bc7e07a2cdbc3fdd28d34f", size = 66081, upload-time = "2026-02-17T16:12:12.766Z" }, + { url = "https://files.pythonhosted.org/packages/1b/18/25e991cd5640c9fb0f8d91b18797b29066b792f17bf8493da183bf5caabe/librt-0.8.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:228c2409c079f8c11fb2e5d7b277077f694cb93443eb760e00b3b83cb8b3176c", size = 68309, upload-time = "2026-02-17T16:12:13.756Z" }, + { url = "https://files.pythonhosted.org/packages/a4/36/46820d03f058cfb5a9de5940640ba03165ed8aded69e0733c417bb04df34/librt-0.8.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7aae78ab5e3206181780e56912d1b9bb9f90a7249ce12f0e8bf531d0462dd0fc", size = 196804, upload-time = "2026-02-17T16:12:14.818Z" }, + { url = "https://files.pythonhosted.org/packages/59/18/5dd0d3b87b8ff9c061849fbdb347758d1f724b9a82241aa908e0ec54ccd0/librt-0.8.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:172d57ec04346b047ca6af181e1ea4858086c80bdf455f61994c4aa6fc3f866c", size = 206907, upload-time = "2026-02-17T16:12:16.513Z" }, + { url = "https://files.pythonhosted.org/packages/d1/96/ef04902aad1424fd7299b62d1890e803e6ab4018c3044dca5922319c4b97/librt-0.8.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6b1977c4ea97ce5eb7755a78fae68d87e4102e4aaf54985e8b56806849cc06a3", size = 221217, upload-time = "2026-02-17T16:12:17.906Z" }, + { url = "https://files.pythonhosted.org/packages/6d/ff/7e01f2dda84a8f5d280637a2e5827210a8acca9a567a54507ef1c75b342d/librt-0.8.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:10c42e1f6fd06733ef65ae7bebce2872bcafd8d6e6b0a08fe0a05a23b044fb14", size = 214622, upload-time = "2026-02-17T16:12:19.108Z" }, + { url = "https://files.pythonhosted.org/packages/1e/8c/5b093d08a13946034fed57619742f790faf77058558b14ca36a6e331161e/librt-0.8.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4c8dfa264b9193c4ee19113c985c95f876fae5e51f731494fc4e0cf594990ba7", size = 221987, upload-time = "2026-02-17T16:12:20.331Z" }, + { url = "https://files.pythonhosted.org/packages/d3/cc/86b0b3b151d40920ad45a94ce0171dec1aebba8a9d72bb3fa00c73ab25dd/librt-0.8.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:01170b6729a438f0dedc4a26ed342e3dc4f02d1000b4b19f980e1877f0c297e6", size = 215132, upload-time = "2026-02-17T16:12:21.54Z" }, + { url = "https://files.pythonhosted.org/packages/fc/be/8588164a46edf1e69858d952654e216a9a91174688eeefb9efbb38a9c799/librt-0.8.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:7b02679a0d783bdae30d443025b94465d8c3dc512f32f5b5031f93f57ac32071", size = 215195, upload-time = "2026-02-17T16:12:23.073Z" }, + { url = "https://files.pythonhosted.org/packages/f5/f2/0b9279bea735c734d69344ecfe056c1ba211694a72df10f568745c899c76/librt-0.8.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:190b109bb69592a3401fe1ffdea41a2e73370ace2ffdc4a0e8e2b39cdea81b78", size = 237946, upload-time = "2026-02-17T16:12:24.275Z" }, + { url = "https://files.pythonhosted.org/packages/e9/cc/5f2a34fbc8aeb35314a3641f9956fa9051a947424652fad9882be7a97949/librt-0.8.1-cp314-cp314-win32.whl", hash = "sha256:e70a57ecf89a0f64c24e37f38d3fe217a58169d2fe6ed6d70554964042474023", size = 50689, upload-time = "2026-02-17T16:12:25.766Z" }, + { url = "https://files.pythonhosted.org/packages/a0/76/cd4d010ab2147339ca2b93e959c3686e964edc6de66ddacc935c325883d7/librt-0.8.1-cp314-cp314-win_amd64.whl", hash = "sha256:7e2f3edca35664499fbb36e4770650c4bd4a08abc1f4458eab9df4ec56389730", size = 57875, upload-time = "2026-02-17T16:12:27.465Z" }, + { url = "https://files.pythonhosted.org/packages/84/0f/2143cb3c3ca48bd3379dcd11817163ca50781927c4537345d608b5045998/librt-0.8.1-cp314-cp314-win_arm64.whl", hash = "sha256:0d2f82168e55ddefd27c01c654ce52379c0750ddc31ee86b4b266bcf4d65f2a3", size = 48058, upload-time = "2026-02-17T16:12:28.556Z" }, + { url = "https://files.pythonhosted.org/packages/d2/0e/9b23a87e37baf00311c3efe6b48d6b6c168c29902dfc3f04c338372fd7db/librt-0.8.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2c74a2da57a094bd48d03fa5d196da83d2815678385d2978657499063709abe1", size = 68313, upload-time = "2026-02-17T16:12:29.659Z" }, + { url = "https://files.pythonhosted.org/packages/db/9a/859c41e5a4f1c84200a7d2b92f586aa27133c8243b6cac9926f6e54d01b9/librt-0.8.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a355d99c4c0d8e5b770313b8b247411ed40949ca44e33e46a4789b9293a907ee", size = 70994, upload-time = "2026-02-17T16:12:31.516Z" }, + { url = "https://files.pythonhosted.org/packages/4c/28/10605366ee599ed34223ac2bf66404c6fb59399f47108215d16d5ad751a8/librt-0.8.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2eb345e8b33fb748227409c9f1233d4df354d6e54091f0e8fc53acdb2ffedeb7", size = 220770, upload-time = "2026-02-17T16:12:33.294Z" }, + { url = "https://files.pythonhosted.org/packages/af/8d/16ed8fd452dafae9c48d17a6bc1ee3e818fd40ef718d149a8eff2c9f4ea2/librt-0.8.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9be2f15e53ce4e83cc08adc29b26fb5978db62ef2a366fbdf716c8a6c8901040", size = 235409, upload-time = "2026-02-17T16:12:35.443Z" }, + { url = "https://files.pythonhosted.org/packages/89/1b/7bdf3e49349c134b25db816e4a3db6b94a47ac69d7d46b1e682c2c4949be/librt-0.8.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:785ae29c1f5c6e7c2cde2c7c0e148147f4503da3abc5d44d482068da5322fd9e", size = 246473, upload-time = "2026-02-17T16:12:36.656Z" }, + { url = "https://files.pythonhosted.org/packages/4e/8a/91fab8e4fd2a24930a17188c7af5380eb27b203d72101c9cc000dbdfd95a/librt-0.8.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1d3a7da44baf692f0c6aeb5b2a09c5e6fc7a703bca9ffa337ddd2e2da53f7732", size = 238866, upload-time = "2026-02-17T16:12:37.849Z" }, + { url = "https://files.pythonhosted.org/packages/b9/e0/c45a098843fc7c07e18a7f8a24ca8496aecbf7bdcd54980c6ca1aaa79a8e/librt-0.8.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5fc48998000cbc39ec0d5311312dda93ecf92b39aaf184c5e817d5d440b29624", size = 250248, upload-time = "2026-02-17T16:12:39.445Z" }, + { url = "https://files.pythonhosted.org/packages/82/30/07627de23036640c952cce0c1fe78972e77d7d2f8fd54fa5ef4554ff4a56/librt-0.8.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:e96baa6820280077a78244b2e06e416480ed859bbd8e5d641cf5742919d8beb4", size = 240629, upload-time = "2026-02-17T16:12:40.889Z" }, + { url = "https://files.pythonhosted.org/packages/fb/c1/55bfe1ee3542eba055616f9098eaf6eddb966efb0ca0f44eaa4aba327307/librt-0.8.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31362dbfe297b23590530007062c32c6f6176f6099646bb2c95ab1b00a57c382", size = 239615, upload-time = "2026-02-17T16:12:42.446Z" }, + { url = "https://files.pythonhosted.org/packages/2b/39/191d3d28abc26c9099b19852e6c99f7f6d400b82fa5a4e80291bd3803e19/librt-0.8.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cc3656283d11540ab0ea01978378e73e10002145117055e03722417aeab30994", size = 263001, upload-time = "2026-02-17T16:12:43.627Z" }, + { url = "https://files.pythonhosted.org/packages/b9/eb/7697f60fbe7042ab4e88f4ee6af496b7f222fffb0a4e3593ef1f29f81652/librt-0.8.1-cp314-cp314t-win32.whl", hash = "sha256:738f08021b3142c2918c03692608baed43bc51144c29e35807682f8070ee2a3a", size = 51328, upload-time = "2026-02-17T16:12:45.148Z" }, + { url = "https://files.pythonhosted.org/packages/7c/72/34bf2eb7a15414a23e5e70ecb9440c1d3179f393d9349338a91e2781c0fb/librt-0.8.1-cp314-cp314t-win_amd64.whl", hash = "sha256:89815a22daf9c51884fb5dbe4f1ef65ee6a146e0b6a8df05f753e2e4a9359bf4", size = 58722, upload-time = "2026-02-17T16:12:46.85Z" }, + { url = "https://files.pythonhosted.org/packages/b2/c8/d148e041732d631fc76036f8b30fae4e77b027a1e95b7a84bb522481a940/librt-0.8.1-cp314-cp314t-win_arm64.whl", hash = "sha256:bf512a71a23504ed08103a13c941f763db13fb11177beb3d9244c98c29fb4a61", size = 48755, upload-time = "2026-02-17T16:12:47.943Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5c/c3/a944f3b0df22bd129e96915b9f4e98d2eeca6516687d7618304a966c3c74/markupsafe-3.0.4-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:4ed644d75aa94a2baf7ec3a96eaa160ea58c742eb9d27c6506053c5c40fc84ed", size = 12787, upload-time = "2026-10-02T23:05:30.971Z" }, + { url = "https://files.pythonhosted.org/packages/d4/d6/a44863f69d88b6c7e27889108f70d47aed259edf89d5df3c5fca1eac87d6/markupsafe-3.0.4-cp314-cp314-android_24_x86_64.whl", hash = "sha256:6d2a9efe686f9de00d0d1ea32a4a5a86d558a2277501bd78d964214eab625e59", size = 12525, upload-time = "2026-10-02T23:05:32.263Z" }, + { url = "https://files.pythonhosted.org/packages/17/8f/168ba80e532dd6a93f96f8f706f1ad41d7990b6e1aeedc1cc0d211a33497/markupsafe-3.0.4-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:8781a792a070cf2bd1b86d3aa943894115faaba6e88122a7bf32d62072742453", size = 11589, upload-time = "2026-10-02T23:05:33.251Z" }, + { url = "https://files.pythonhosted.org/packages/32/b3/aa2c95a574d3af39403a469b295886eb9b6d448da568cbebb5a2cbfdc2e5/markupsafe-3.0.4-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:971a3bbb75d97ae4e2e8f7d4834236f86f85f0c85e04ab2e191db1123b04f80b", size = 11801, upload-time = "2026-10-02T23:05:34.315Z" }, + { url = "https://files.pythonhosted.org/packages/60/d0/34b810107d83840e768bf485de795893ebbae35b26ab061b487adfa0a692/markupsafe-3.0.4-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:8909c2f1c6dd65e054ac4b573a91c8384d1492281e55d82d159d653f7a13adf6", size = 11447, upload-time = "2026-10-02T23:05:35.302Z" }, + { url = "https://files.pythonhosted.org/packages/6c/ab/2f8488f0f817a39fca068d2b17daf446bf5cdb3eae28c3720af534d873b4/markupsafe-3.0.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:4cf3468d5ec187ffffcaca8e61929a37448f215dafc1386a12c750a72fe53634", size = 11722, upload-time = "2026-10-02T23:05:36.363Z" }, + { url = "https://files.pythonhosted.org/packages/ad/40/e2d117b048d47282ade906fbfd92814cbee5647afc13fda88a3406039372/markupsafe-3.0.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:52704c5d36eb6dda8866493decd61111fff86244c9b1ad225ca01b9e91e5970f", size = 12061, upload-time = "2026-10-02T23:05:37.397Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a8/73a81135e85ba66217f5af7facb03bbb386807e1a729ab64532e4c802652/markupsafe-3.0.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1caa2fa5a6184fb233153b35f654e6687bd555476f6170f29d8ee9be1a8b0af9", size = 24434, upload-time = "2026-10-02T23:05:38.407Z" }, + { url = "https://files.pythonhosted.org/packages/ac/ca/fa9216dd01efee2dfdacafe7df32b4d0170fbac694b0c258a193d6e53999/markupsafe-3.0.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:387d8cd30e69b3f0a72877b9ae717033396404e19095b17fe89753a981fda44f", size = 27183, upload-time = "2026-10-02T23:05:39.581Z" }, + { url = "https://files.pythonhosted.org/packages/fa/4e/a469509e538d37af51103b17b073126973f2b1cbf197ff32c7ddf025cfe5/markupsafe-3.0.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:051417f74bcaaefa316276e0ff723f541616ca51043d070da00249d9bddd3e3c", size = 24813, upload-time = "2026-10-02T23:05:40.671Z" }, + { url = "https://files.pythonhosted.org/packages/8f/db/d7282caf7ab03af44d5d6fdbaa019b35c7d7f1c90588b839c07cba640d6a/markupsafe-3.0.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8e9f292fcda89b324f2f5c91d13f1424a153e40fc2756f38ee23b15835ff300", size = 23049, upload-time = "2026-10-02T23:05:41.864Z" }, + { url = "https://files.pythonhosted.org/packages/30/f3/b6a425206e6964efda6acee544d0eb01d1501784d0b8e2dcc74986f33b17/markupsafe-3.0.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:df1ae86ff54725a01fa1a0510b914ca53a161b7050be74f6204e24aded5971d0", size = 22088, upload-time = "2026-10-02T23:05:43.014Z" }, + { url = "https://files.pythonhosted.org/packages/ea/8a/84d3582fc1f0d5bd466cdf2eebf175e172158a6e70701aacec1de1b35430/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:8965520ac587c94a4ac48b729be3d8b8de00af39699b17585dfb599babe77977", size = 23846, upload-time = "2026-10-02T23:05:44.098Z" }, + { url = "https://files.pythonhosted.org/packages/1c/65/db101cce51b7ba4864ac491a9859d297dd1adf0e55b103fee9db9c47c527/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:340cbb1957ba99929cbf19a75626d36ba1ae21d1730b287d1cf7f824a20c4fc7", size = 22674, upload-time = "2026-10-02T23:05:45.23Z" }, + { url = "https://files.pythonhosted.org/packages/e0/49/ddee9813d71db0c7a5c9d97c832125e6758a0c844777f1cf076569bb0e22/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:3a93d9616ddecfb393727a0041a562cf0b15a244e20f2bd25efc7949be4c4f17", size = 24104, upload-time = "2026-10-02T23:05:46.398Z" }, + { url = "https://files.pythonhosted.org/packages/aa/0e/7d8518d726726870a2399d69fd30d0fa36c5e57a2132c336b58d7c491073/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:d2e56fd3b00222722abfb3f5f0759ddbae4b90811b5ad4343c64030ad1bde70c", size = 21637, upload-time = "2026-10-02T23:05:47.48Z" }, + { url = "https://files.pythonhosted.org/packages/b4/b0/b505e8a361ba557dbf3b3aa7331ea39b00d2022a26e925ff8463b9714bb3/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:0d9c47709875fdb321452056622e930c52afbc07a7d780762fbb8b4d91ce6fa4", size = 23081, upload-time = "2026-10-02T23:05:48.611Z" }, + { url = "https://files.pythonhosted.org/packages/1c/ea/9cc3cea873f980c75cbdb6f4277ce30ee955de38be0b3d02f14c108e0698/markupsafe-3.0.4-cp314-cp314-win32.whl", hash = "sha256:38fc55594dab834470b6733dead2ee9e3f657fb0608c769dcafa0ba5ab52f45c", size = 14272, upload-time = "2026-10-02T23:05:49.707Z" }, + { url = "https://files.pythonhosted.org/packages/80/f0/5792ff768a410f93ee3f84fc19345295ffc352d2c936b424cb37e514714c/markupsafe-3.0.4-cp314-cp314-win_amd64.whl", hash = "sha256:c1bc67752d5f21013cfe430df4062441714eab79f65a6a05e01505957e9c35fe", size = 14501, upload-time = "2026-10-02T23:05:50.788Z" }, + { url = "https://files.pythonhosted.org/packages/5f/cf/3d074a8edffcc6899355232ff2543ae8d929733239596423b7db79698bc9/markupsafe-3.0.4-cp314-cp314-win_arm64.whl", hash = "sha256:7e1636da3d8dfc220b6dd10264db5f2b165e4888c4518594898fbe381049af8a", size = 14364, upload-time = "2026-10-02T23:05:51.857Z" }, + { url = "https://files.pythonhosted.org/packages/d9/31/87ce42159aae2163cf3bbbd0c44bc87780510eecab1ea3859099aed95dcb/markupsafe-3.0.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:805c8b84534fa10891890f0e4be39f3a99e94615d93e8836bf9fa1fdca2feeb2", size = 11759, upload-time = "2026-10-02T23:05:52.951Z" }, + { url = "https://files.pythonhosted.org/packages/5f/53/b047207eeb7752e960aca3eb1df5fb7eefa7dd4c62ac49bb156456c8a702/markupsafe-3.0.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:fa95848c929b6a75f6848d3c9793e59db365ee436776e57db835cdbfa79ba977", size = 12096, upload-time = "2026-10-02T23:05:54.066Z" }, + { url = "https://files.pythonhosted.org/packages/ee/51/4326c88a13c7b755657d44b4bb986f8c3d9843ecba7e22d98661d87f9a57/markupsafe-3.0.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e916035e3e9930cbdfdd10abf48861340221857f45509565898e012263f7b289", size = 25699, upload-time = "2026-10-02T23:05:55.15Z" }, + { url = "https://files.pythonhosted.org/packages/f2/bb/990581b7474bfcf2cf34bed6ba5ea23bd87adb9d671213d68e88620e7a6b/markupsafe-3.0.4-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b4d12837e0203bbace818ff4a7461afdcd78bcd782351cea148139180d7bcffe", size = 27804, upload-time = "2026-10-02T23:05:56.29Z" }, + { url = "https://files.pythonhosted.org/packages/6b/89/89491878c28e8291f5aa2fffe2c2d57230d10ae366d55dd810b840513d78/markupsafe-3.0.4-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5086f9975abb1ab531ee6afca1761e4b59a19b446f3f6522ed776963228cfe5a", size = 25912, upload-time = "2026-10-02T23:05:57.416Z" }, + { url = "https://files.pythonhosted.org/packages/30/77/680998b54efdea06fc114565cd739b6d059f826a0279219b218dfa750d29/markupsafe-3.0.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b4a635a0487774f841cb1fb62e907e7195cc95bc761e053184b8acc3ceb20733", size = 23623, upload-time = "2026-10-02T23:05:58.557Z" }, + { url = "https://files.pythonhosted.org/packages/ae/75/2709f5ac5de9467b40b10e2bb8f89cc63dfb74582e09aa734b1124a217de/markupsafe-3.0.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb96e6e088d6cf71c1ea977510948320234824cf226e32f6f6e044f7a9c82b34", size = 23301, upload-time = "2026-10-02T23:05:59.94Z" }, + { url = "https://files.pythonhosted.org/packages/a0/c8/39eadc6c5b14c9c7679bfb98f4d4c6a97863b5beb91839aca4d2d6e16e55/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8b5d563170ff8ba3181caa967c99a3c804d1dedb702c7cb93a6a7c32247da978", size = 24950, upload-time = "2026-10-02T23:06:01.289Z" }, + { url = "https://files.pythonhosted.org/packages/1a/5e/01037f8a43e8ccb0bffb4fbdc5212db05bf080fdd7286cd392332d58128a/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:396ec4e65cc889f69786b3b89478b471cee5a3bcf468b9d9bb03e1a30fb291fc", size = 23330, upload-time = "2026-10-02T23:06:02.441Z" }, + { url = "https://files.pythonhosted.org/packages/d4/f4/23e83ce0596bb0cbe670502d31df8f757bbd01a392aa486fa3b40d1ed399/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:15ba9e28640feef770374b116a6f019c21f52404aeabe516aa7f800587b98cfc", size = 25239, upload-time = "2026-10-02T23:06:03.579Z" }, + { url = "https://files.pythonhosted.org/packages/88/5b/3708897368073cc683d524750474f41a77d2986152c380dcc55b20fdf340/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:d920abdfa61279ba1a2ef9484aab07bf03331f8c08a10120fa332353d06e6932", size = 22767, upload-time = "2026-10-02T23:06:04.699Z" }, + { url = "https://files.pythonhosted.org/packages/c6/61/ebda1307864b409e6b3115757a3d4a09cca46cfb6cc65191b5de226b424b/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a9f54054101545a9a9cccefddf54316aa6e4491611fcbef9e91b3b6bebec04f6", size = 23668, upload-time = "2026-10-02T23:06:05.9Z" }, + { url = "https://files.pythonhosted.org/packages/09/15/98075cceac3b5ba0dbb8e4762a847be967d2befc349a2cf2d0ac77f62c9d/markupsafe-3.0.4-cp314-cp314t-win32.whl", hash = "sha256:12a606a492de952afcb43b59a14aaaaad120e708d3663dd0fdf2d738d427a691", size = 14301, upload-time = "2026-10-02T23:06:07.109Z" }, + { url = "https://files.pythonhosted.org/packages/0b/a3/768b560fcc4156685cb563d922b217810cfa7bc135773367f62f1f9d2078/markupsafe-3.0.4-cp314-cp314t-win_amd64.whl", hash = "sha256:a18f38cafc329bac5e3c2b96c765b4c96d3d103421ed22ab7988c1e3fce27464", size = 14526, upload-time = "2026-10-02T23:06:08.276Z" }, + { url = "https://files.pythonhosted.org/packages/93/63/da554b4c97a6b0ea3229ca7fe8cbfb620be81613d517f482e85958550537/markupsafe-3.0.4-cp314-cp314t-win_arm64.whl", hash = "sha256:eba154571c16e032112afac0dc2dfe9e63c2ceb7aedd07bb7eecf2ce26d4dd4c", size = 14421, upload-time = "2026-10-02T23:06:09.402Z" }, +] + +[[package]] +name = "mccabe" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", size = 9658, upload-time = "2022-01-24T01:14:51.113Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350, upload-time = "2022-01-24T01:14:49.62Z" }, ] [[package]] @@ -124,24 +241,24 @@ dependencies = [ { name = "pathspec" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f5/db/4efed9504bc01309ab9c2da7e352cc223569f05478012b5d9ece38fd44d2/mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba", size = 3582404 } +sdist = { url = "https://files.pythonhosted.org/packages/f5/db/4efed9504bc01309ab9c2da7e352cc223569f05478012b5d9ece38fd44d2/mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba", size = 3582404, upload-time = "2025-12-15T05:03:48.42Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/de/eb/b83e75f4c820c4247a58580ef86fcd35165028f191e7e1ba57128c52782d/mypy-1.19.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06e6170bd5836770e8104c8fdd58e5e725cfeb309f0a6c681a811f557e97eac1", size = 13199744 }, - { url = "https://files.pythonhosted.org/packages/94/28/52785ab7bfa165f87fcbb61547a93f98bb20e7f82f90f165a1f69bce7b3d/mypy-1.19.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:804bd67b8054a85447c8954215a906d6eff9cabeabe493fb6334b24f4bfff718", size = 12215815 }, - { url = "https://files.pythonhosted.org/packages/0a/c6/bdd60774a0dbfb05122e3e925f2e9e846c009e479dcec4821dad881f5b52/mypy-1.19.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:21761006a7f497cb0d4de3d8ef4ca70532256688b0523eee02baf9eec895e27b", size = 12740047 }, - { url = "https://files.pythonhosted.org/packages/32/2a/66ba933fe6c76bd40d1fe916a83f04fed253152f451a877520b3c4a5e41e/mypy-1.19.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28902ee51f12e0f19e1e16fbe2f8f06b6637f482c459dd393efddd0ec7f82045", size = 13601998 }, - { url = "https://files.pythonhosted.org/packages/e3/da/5055c63e377c5c2418760411fd6a63ee2b96cf95397259038756c042574f/mypy-1.19.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:481daf36a4c443332e2ae9c137dfee878fcea781a2e3f895d54bd3002a900957", size = 13807476 }, - { url = "https://files.pythonhosted.org/packages/cd/09/4ebd873390a063176f06b0dbf1f7783dd87bd120eae7727fa4ae4179b685/mypy-1.19.1-cp314-cp314-win_amd64.whl", hash = "sha256:8bb5c6f6d043655e055be9b542aa5f3bdd30e4f3589163e85f93f3640060509f", size = 10281872 }, - { url = "https://files.pythonhosted.org/packages/8d/f4/4ce9a05ce5ded1de3ec1c1d96cf9f9504a04e54ce0ed55cfa38619a32b8d/mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247", size = 2471239 }, + { url = "https://files.pythonhosted.org/packages/de/eb/b83e75f4c820c4247a58580ef86fcd35165028f191e7e1ba57128c52782d/mypy-1.19.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06e6170bd5836770e8104c8fdd58e5e725cfeb309f0a6c681a811f557e97eac1", size = 13199744, upload-time = "2025-12-15T05:03:30.823Z" }, + { url = "https://files.pythonhosted.org/packages/94/28/52785ab7bfa165f87fcbb61547a93f98bb20e7f82f90f165a1f69bce7b3d/mypy-1.19.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:804bd67b8054a85447c8954215a906d6eff9cabeabe493fb6334b24f4bfff718", size = 12215815, upload-time = "2025-12-15T05:02:42.323Z" }, + { url = "https://files.pythonhosted.org/packages/0a/c6/bdd60774a0dbfb05122e3e925f2e9e846c009e479dcec4821dad881f5b52/mypy-1.19.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:21761006a7f497cb0d4de3d8ef4ca70532256688b0523eee02baf9eec895e27b", size = 12740047, upload-time = "2025-12-15T05:03:33.168Z" }, + { url = "https://files.pythonhosted.org/packages/32/2a/66ba933fe6c76bd40d1fe916a83f04fed253152f451a877520b3c4a5e41e/mypy-1.19.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28902ee51f12e0f19e1e16fbe2f8f06b6637f482c459dd393efddd0ec7f82045", size = 13601998, upload-time = "2025-12-15T05:03:13.056Z" }, + { url = "https://files.pythonhosted.org/packages/e3/da/5055c63e377c5c2418760411fd6a63ee2b96cf95397259038756c042574f/mypy-1.19.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:481daf36a4c443332e2ae9c137dfee878fcea781a2e3f895d54bd3002a900957", size = 13807476, upload-time = "2025-12-15T05:03:17.977Z" }, + { url = "https://files.pythonhosted.org/packages/cd/09/4ebd873390a063176f06b0dbf1f7783dd87bd120eae7727fa4ae4179b685/mypy-1.19.1-cp314-cp314-win_amd64.whl", hash = "sha256:8bb5c6f6d043655e055be9b542aa5f3bdd30e4f3589163e85f93f3640060509f", size = 10281872, upload-time = "2025-12-15T05:03:05.549Z" }, + { url = "https://files.pythonhosted.org/packages/8d/f4/4ce9a05ce5ded1de3ec1c1d96cf9f9504a04e54ce0ed55cfa38619a32b8d/mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247", size = 2471239, upload-time = "2025-12-15T05:03:07.248Z" }, ] [[package]] name = "mypy-extensions" version = "1.1.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343 } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963 }, + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, ] [[package]] @@ -150,10 +267,12 @@ version = "2026.1" source = { editable = "." } dependencies = [ { name = "click" }, + { name = "jinja2" }, { name = "prettytable" }, { name = "pydantic" }, { name = "pyroute2" }, { name = "snap-helpers" }, + { name = "sunbeam-ndr-contract" }, ] [package.optional-dependencies] @@ -164,47 +283,64 @@ dev = [ { name = "pytest-mock" }, { name = "ruff" }, ] +tics = [ + { name = "flake8" }, + { name = "pylint" }, +] [package.metadata] requires-dist = [ { name = "click", specifier = ">=8.3.1" }, { name = "coverage", extras = ["toml"], marker = "extra == 'dev'" }, + { name = "flake8", marker = "extra == 'tics'" }, + { name = "jinja2", specifier = ">=3.1" }, { name = "mypy", marker = "extra == 'dev'" }, { name = "prettytable", specifier = ">=3.17.0" }, { name = "pydantic", specifier = ">=2,<3" }, + { name = "pylint", marker = "extra == 'tics'" }, { name = "pyroute2", specifier = "==0.7.11" }, { name = "pytest", marker = "extra == 'dev'" }, { name = "pytest-mock", marker = "extra == 'dev'" }, { name = "ruff", marker = "extra == 'dev'" }, { name = "snap-helpers", git = "https://github.com/albertodonato/snap-helpers?rev=76f8166b640163c0f20887829e31b2cafbfdec11" }, + { name = "sunbeam-ndr-contract", specifier = "==2027.1.0.dev0" }, ] -provides-extras = ["dev"] +provides-extras = ["dev", "tics"] [[package]] name = "packaging" version = "26.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416 } +sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416, upload-time = "2026-01-21T20:50:39.064Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366 }, + { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, ] [[package]] name = "pathspec" version = "1.0.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200 } +sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, +] + +[[package]] +name = "platformdirs" +version = "4.14.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/71/18/0b0d99f5bf164f04a7a9534c3dbdbe4d5fd2b382667685ad40c192c4d3d1/platformdirs-4.14.8.tar.gz", hash = "sha256:96893d686e84e9e6f358a9ea41a8de544df66dbf2ba6cda250e7dc73acf85b9b", size = 87203, upload-time = "2026-11-20T08:14:52.63Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206 }, + { url = "https://files.pythonhosted.org/packages/5b/be/373cc7341f53bfd3acba3e5db62433fd960a45fcf73ad64a5f4d27e74910/platformdirs-4.14.8-py3-none-any.whl", hash = "sha256:1e34af590de4d978631b751eb2202f2fee4497537a17c1720b12fcf57b331392", size = 94267, upload-time = "2026-11-20T08:14:51.306Z" }, ] [[package]] name = "pluggy" version = "1.6.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412 } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538 }, + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] [[package]] @@ -214,9 +350,18 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "wcwidth" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/79/45/b0847d88d6cfeb4413566738c8bbf1e1995fad3d42515327ff32cc1eb578/prettytable-3.17.0.tar.gz", hash = "sha256:59f2590776527f3c9e8cf9fe7b66dd215837cca96a9c39567414cbc632e8ddb0", size = 67892 } +sdist = { url = "https://files.pythonhosted.org/packages/79/45/b0847d88d6cfeb4413566738c8bbf1e1995fad3d42515327ff32cc1eb578/prettytable-3.17.0.tar.gz", hash = "sha256:59f2590776527f3c9e8cf9fe7b66dd215837cca96a9c39567414cbc632e8ddb0", size = 67892, upload-time = "2025-11-14T17:33:20.212Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ee/8c/83087ebc47ab0396ce092363001fa37c17153119ee282700c0713a195853/prettytable-3.17.0-py3-none-any.whl", hash = "sha256:aad69b294ddbe3e1f95ef8886a060ed1666a0b83018bbf56295f6f226c43d287", size = 34433 }, + { url = "https://files.pythonhosted.org/packages/ee/8c/83087ebc47ab0396ce092363001fa37c17153119ee282700c0713a195853/prettytable-3.17.0-py3-none-any.whl", hash = "sha256:aad69b294ddbe3e1f95ef8886a060ed1666a0b83018bbf56295f6f226c43d287", size = 34433, upload-time = "2025-11-14T17:33:19.093Z" }, +] + +[[package]] +name = "pycodestyle" +version = "2.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/86/df/178e41c9ed0ff33c23b3f3757e4e658c889f9abc5ad76ece6cd607b12e9c/pycodestyle-2.15.0.tar.gz", hash = "sha256:318f5db083869b4c4dad922d0b11124fb27ab181b6730b93371da671e31bd50e", size = 39765, upload-time = "2026-09-22T22:15:34.926Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/56/e2/480bcdb153feecde4d736b18c908c7eee4846f11d7547d2e0c71499af630/pycodestyle-2.15.0-py2.py3-none-any.whl", hash = "sha256:12fd2f73c7b8ee8845a0431111df8faf4c1a07d6e64e2ee7f0c74014dab14181", size = 31583, upload-time = "2026-09-22T22:15:34.007Z" }, ] [[package]] @@ -229,9 +374,9 @@ dependencies = [ { name = "typing-extensions" }, { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591 } +sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580 }, + { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" }, ] [[package]] @@ -241,45 +386,72 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622 }, - { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725 }, - { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040 }, - { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691 }, - { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897 }, - { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302 }, - { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877 }, - { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680 }, - { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960 }, - { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102 }, - { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039 }, - { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126 }, - { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489 }, - { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288 }, - { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255 }, - { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760 }, - { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092 }, - { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385 }, - { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832 }, - { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585 }, - { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078 }, - { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914 }, - { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560 }, - { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244 }, - { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955 }, - { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906 }, - { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607 }, - { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769 }, +sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" }, + { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" }, + { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" }, + { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" }, + { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" }, + { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" }, + { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" }, + { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" }, + { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" }, + { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" }, + { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" }, + { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" }, + { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" }, + { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" }, + { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" }, + { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" }, + { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" }, + { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" }, + { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" }, + { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" }, + { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" }, + { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" }, + { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" }, + { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, + { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, + { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, +] + +[[package]] +name = "pyflakes" +version = "4.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9b/43/f4566b992ab97abd18426aeba516a83c7a833230614a2c3f4d3e9d8ff0f0/pyflakes-4.1.0.tar.gz", hash = "sha256:592beb57058eb82eb190fb7514f2081c555c51000b029ff71286a681e6cf2f83", size = 67243, upload-time = "2026-10-28T20:10:02.469Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/52/98c9a0e4718abe887121279457bc7140115df22d714b7183880eb61e359f/pyflakes-4.1.0-py2.py3-none-any.whl", hash = "sha256:b2e05e6bac8e49b67be2a6ffa63422c60f7193fc72e8180255907b41ec997dc1", size = 66258, upload-time = "2026-10-28T20:10:01.109Z" }, ] [[package]] name = "pygments" version = "2.19.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631 } +sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, +] + +[[package]] +name = "pylint" +version = "4.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "astroid" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "dill" }, + { name = "isort" }, + { name = "mccabe" }, + { name = "platformdirs" }, + { name = "tomlkit" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8f/d7/bfea980ba1ea5666c7f774627f3a7159b98a21426a081dd2f05db8eb93b3/pylint-4.1.4.tar.gz", hash = "sha256:4c9176dc6c9f1b98b742195f01899b290369d5a27b4b41d1014c17f2f96b26f1", size = 1768302, upload-time = "2026-11-14T21:41:51.625Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217 }, + { url = "https://files.pythonhosted.org/packages/b4/89/5235509abac00f5c470d5d8edae908bcec79d1c09803485ce57c25ccbed1/pylint-4.1.4-py3-none-any.whl", hash = "sha256:b39fcc762ec4a7fe385d01b8e170fd996847297cdc0e3850bdda1435c74cfd95", size = 591735, upload-time = "2026-11-14T21:41:49.56Z" }, ] [[package]] @@ -290,7 +462,7 @@ dependencies = [ { name = "win-inet-pton", marker = "sys_platform == 'win32'" }, ] wheels = [ - { url = "https://files.pythonhosted.org/packages/0b/f3/32f8008ca4e6faa6561e2f580e95453d37793dff31c766fe3f7ddf2e29a9/pyroute2-0.7.11-py3-none-any.whl", hash = "sha256:95852e702149b3d6abc8484d3291c38c45660168e8db76e5566a60ef0e133d5b", size = 459942 }, + { url = "https://files.pythonhosted.org/packages/0b/f3/32f8008ca4e6faa6561e2f580e95453d37793dff31c766fe3f7ddf2e29a9/pyroute2-0.7.11-py3-none-any.whl", hash = "sha256:95852e702149b3d6abc8484d3291c38c45660168e8db76e5566a60ef0e133d5b", size = 459942, upload-time = "2024-01-12T18:29:39.202Z" }, ] [[package]] @@ -304,9 +476,9 @@ dependencies = [ { name = "pluggy" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/d1/db/7ef3487e0fb0049ddb5ce41d3a49c235bf9ad299b6a25d5780a89f19230f/pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11", size = 1568901 } +sdist = { url = "https://files.pythonhosted.org/packages/d1/db/7ef3487e0fb0049ddb5ce41d3a49c235bf9ad299b6a25d5780a89f19230f/pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11", size = 1568901, upload-time = "2025-12-06T21:30:51.014Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3b/ab/b3226f0bd7cdcf710fbede2b3548584366da3b19b5021e74f5bde2a8fa3f/pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b", size = 374801 }, + { url = "https://files.pythonhosted.org/packages/3b/ab/b3226f0bd7cdcf710fbede2b3548584366da3b19b5021e74f5bde2a8fa3f/pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b", size = 374801, upload-time = "2025-12-06T21:30:49.154Z" }, ] [[package]] @@ -316,60 +488,60 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pytest" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz", hash = "sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f", size = 34036 } +sdist = { url = "https://files.pythonhosted.org/packages/68/14/eb014d26be205d38ad5ad20d9a80f7d201472e08167f0bb4361e251084a9/pytest_mock-3.15.1.tar.gz", hash = "sha256:1849a238f6f396da19762269de72cb1814ab44416fa73a8686deac10b0d87a0f", size = 34036, upload-time = "2025-09-16T16:37:27.081Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl", hash = "sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d", size = 10095 }, + { url = "https://files.pythonhosted.org/packages/5a/cc/06253936f4a7fa2e0f48dfe6d851d9c56df896a9ab09ac019d70b760619c/pytest_mock-3.15.1-py3-none-any.whl", hash = "sha256:0a25e2eb88fe5168d535041d09a4529a188176ae608a6d249ee65abc0949630d", size = 10095, upload-time = "2025-09-16T16:37:25.734Z" }, ] [[package]] name = "pyyaml" version = "6.0.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814 }, - { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809 }, - { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454 }, - { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355 }, - { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175 }, - { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228 }, - { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194 }, - { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429 }, - { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912 }, - { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108 }, - { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641 }, - { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901 }, - { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132 }, - { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261 }, - { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272 }, - { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923 }, - { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062 }, - { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341 }, +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, ] [[package]] name = "ruff" version = "0.15.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3c/3b/20d9a0bc954d51b63f20cf710cf506bfe675d1e6138139342dd5ccc90326/ruff-0.15.3.tar.gz", hash = "sha256:78757853320d8ddb9da24e614ef69a37bcbcfd477e5a6435681188d4bce4eaa1", size = 4569031 } +sdist = { url = "https://files.pythonhosted.org/packages/3c/3b/20d9a0bc954d51b63f20cf710cf506bfe675d1e6138139342dd5ccc90326/ruff-0.15.3.tar.gz", hash = "sha256:78757853320d8ddb9da24e614ef69a37bcbcfd477e5a6435681188d4bce4eaa1", size = 4569031, upload-time = "2026-02-26T15:39:38.015Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ed/00/c544ab1d70f86dc50a2f2a8e1262e5af5025897ccd820415f559f9f2f63f/ruff-0.15.3-py3-none-linux_armv6l.whl", hash = "sha256:f7df0fd6f889a8d8de2ddb48a9eb55150954400f2157ea15b21a2f49ecaaf988", size = 10444066 }, - { url = "https://files.pythonhosted.org/packages/fb/15/9dee3f4e891261adbd690f8c6f075418a7cd76e845601b00a0da2ae2ad6e/ruff-0.15.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:0198b5445197d443c3bbf2cc358f4bd477fb3951e3c7f2babc13e9bb490614a8", size = 10853125 }, - { url = "https://files.pythonhosted.org/packages/88/ba/fc5aeda852c89faf821d36c951df866117342e88439e1b1e1e762a07b7fd/ruff-0.15.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:adf95b5be57b25fbbbc07cd68d37414bee8729e807ad0217219558027186967e", size = 10180833 }, - { url = "https://files.pythonhosted.org/packages/06/87/e2f80a39164476fac4d45752a0d4721d6645f40b7f851e48add12af9947e/ruff-0.15.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b56dbd9cd86489ccbad96bb58fa4c958342b5510fdeb60ea13d9d3566bd845c", size = 10536806 }, - { url = "https://files.pythonhosted.org/packages/fd/89/2e5bf0ed30ea3778460ea4d8cc6cb4d88ba96d9732d2c0cc33349cd65196/ruff-0.15.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c6f263ce511871955d8c5401b62c7e863988ea4d0527aa0a3b1b7ecff4d4abc4", size = 10276093 }, - { url = "https://files.pythonhosted.org/packages/82/cb/318206d778c7f42917ca7b0f9436cf27652d1731fe434d3c9990c4a611fa/ruff-0.15.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e90fa1bed82ffede5768232b9bd23212c547ab7cd74c752007ecade1d895ee1a", size = 11051593 }, - { url = "https://files.pythonhosted.org/packages/58/8f/65ee4c1b88e49dd4c0a3fc43e81832536c7942f0c702b6f3d25db0f95d6c/ruff-0.15.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e9d53760b7061ddbe5ea9e25381332c607fc14c40bde78f8a25392a93a68d74", size = 11885820 }, - { url = "https://files.pythonhosted.org/packages/db/04/d4261f6729ad9a356bc6e3223ba297acf3b66118cef4795b4a8953b255ff/ruff-0.15.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ec90e3b78c56c4acca4264d371dd48e29215ecb673cc2fa3c4b799b72050e491", size = 11340583 }, - { url = "https://files.pythonhosted.org/packages/24/84/490f38b2bc104e0fdc9496c2a66a48fb2d24a01de46ba0c60c4f6c4d4590/ruff-0.15.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7ce448fd395f822e34c8f6f7dfcd84b6726340082950858f92c4daa6baf8915", size = 11160701 }, - { url = "https://files.pythonhosted.org/packages/ad/25/eae9cb7b6c28b425ed8cbe797da89c78146071102181ba74c4cdfd06bbeb/ruff-0.15.3-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:14f7d763962d385f75b9b3b57fcc5661c56c20d8b1ddc9f5c881b5fa0ba499fa", size = 11111482 }, - { url = "https://files.pythonhosted.org/packages/95/18/16d0b5ef143cb9e52724f18cbccb4b3c5cd4d4e2debbd95e2be3aeb64c9e/ruff-0.15.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b57084e3a3d65418d376c7023711c37cce023cd2fb038a76ba15ee21f3c2c2ee", size = 10497151 }, - { url = "https://files.pythonhosted.org/packages/bf/b4/1829314241ddba07c54a742ab387da343fe56a0267a6b6498f3e2ae99821/ruff-0.15.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d567523ff7dcf3112b0f71231d18c3506dd06943359476ee64dea0f9c8f63976", size = 10281955 }, - { url = "https://files.pythonhosted.org/packages/d7/93/80a4ec4bd3cf58ca9b49dccf2bd232b520db14184912fb7e0eb6f3ecc484/ruff-0.15.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:4223088d255bf31a50b6640445b39f668164d64c23e5fa403edfb1e0b11122e5", size = 10766613 }, - { url = "https://files.pythonhosted.org/packages/da/92/fe016b862295dc57499997e7f2edc58119469b210f4f03ccb763fa65f130/ruff-0.15.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:32399ddae088970b2db6efd8d3f49981375cb828075359b6c088ed1fe63d64e1", size = 11262113 }, - { url = "https://files.pythonhosted.org/packages/42/b1/77dcd05940388d9ba3de03ac4b8b598826d57935728071e1be9f2ef5b714/ruff-0.15.3-py3-none-win32.whl", hash = "sha256:1f1eb95ff614351e3a89a862b6d94e6c42c170e61916e1f20facd6c38477f5f3", size = 10509423 }, - { url = "https://files.pythonhosted.org/packages/29/d5/76aab0fabbd54e8c77d02fcff2494906ba85b539d22aa9b7124f7100f008/ruff-0.15.3-py3-none-win_amd64.whl", hash = "sha256:2b22dffe5f5e1e537097aa5208684f069e495f980379c4491b1cfb198a444d0c", size = 11637739 }, - { url = "https://files.pythonhosted.org/packages/f2/61/9b4e3682dfd26054321e1b2fdb67a51361dd6ec2fb63f2b50d711f8832ae/ruff-0.15.3-py3-none-win_arm64.whl", hash = "sha256:82443c14d694d4cbd9e598ede27ef5d6f08389ccad91c933be775ea2f4e66f76", size = 10957794 }, + { url = "https://files.pythonhosted.org/packages/ed/00/c544ab1d70f86dc50a2f2a8e1262e5af5025897ccd820415f559f9f2f63f/ruff-0.15.3-py3-none-linux_armv6l.whl", hash = "sha256:f7df0fd6f889a8d8de2ddb48a9eb55150954400f2157ea15b21a2f49ecaaf988", size = 10444066, upload-time = "2026-02-26T15:39:47.708Z" }, + { url = "https://files.pythonhosted.org/packages/fb/15/9dee3f4e891261adbd690f8c6f075418a7cd76e845601b00a0da2ae2ad6e/ruff-0.15.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:0198b5445197d443c3bbf2cc358f4bd477fb3951e3c7f2babc13e9bb490614a8", size = 10853125, upload-time = "2026-02-26T15:40:18.943Z" }, + { url = "https://files.pythonhosted.org/packages/88/ba/fc5aeda852c89faf821d36c951df866117342e88439e1b1e1e762a07b7fd/ruff-0.15.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:adf95b5be57b25fbbbc07cd68d37414bee8729e807ad0217219558027186967e", size = 10180833, upload-time = "2026-02-26T15:40:13.282Z" }, + { url = "https://files.pythonhosted.org/packages/06/87/e2f80a39164476fac4d45752a0d4721d6645f40b7f851e48add12af9947e/ruff-0.15.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b56dbd9cd86489ccbad96bb58fa4c958342b5510fdeb60ea13d9d3566bd845c", size = 10536806, upload-time = "2026-02-26T15:40:24.129Z" }, + { url = "https://files.pythonhosted.org/packages/fd/89/2e5bf0ed30ea3778460ea4d8cc6cb4d88ba96d9732d2c0cc33349cd65196/ruff-0.15.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c6f263ce511871955d8c5401b62c7e863988ea4d0527aa0a3b1b7ecff4d4abc4", size = 10276093, upload-time = "2026-02-26T15:39:44.654Z" }, + { url = "https://files.pythonhosted.org/packages/82/cb/318206d778c7f42917ca7b0f9436cf27652d1731fe434d3c9990c4a611fa/ruff-0.15.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e90fa1bed82ffede5768232b9bd23212c547ab7cd74c752007ecade1d895ee1a", size = 11051593, upload-time = "2026-02-26T15:39:35.157Z" }, + { url = "https://files.pythonhosted.org/packages/58/8f/65ee4c1b88e49dd4c0a3fc43e81832536c7942f0c702b6f3d25db0f95d6c/ruff-0.15.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e9d53760b7061ddbe5ea9e25381332c607fc14c40bde78f8a25392a93a68d74", size = 11885820, upload-time = "2026-02-26T15:39:59.504Z" }, + { url = "https://files.pythonhosted.org/packages/db/04/d4261f6729ad9a356bc6e3223ba297acf3b66118cef4795b4a8953b255ff/ruff-0.15.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ec90e3b78c56c4acca4264d371dd48e29215ecb673cc2fa3c4b799b72050e491", size = 11340583, upload-time = "2026-02-26T15:39:50.781Z" }, + { url = "https://files.pythonhosted.org/packages/24/84/490f38b2bc104e0fdc9496c2a66a48fb2d24a01de46ba0c60c4f6c4d4590/ruff-0.15.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7ce448fd395f822e34c8f6f7dfcd84b6726340082950858f92c4daa6baf8915", size = 11160701, upload-time = "2026-02-26T15:40:02.447Z" }, + { url = "https://files.pythonhosted.org/packages/ad/25/eae9cb7b6c28b425ed8cbe797da89c78146071102181ba74c4cdfd06bbeb/ruff-0.15.3-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:14f7d763962d385f75b9b3b57fcc5661c56c20d8b1ddc9f5c881b5fa0ba499fa", size = 11111482, upload-time = "2026-02-26T15:39:56.462Z" }, + { url = "https://files.pythonhosted.org/packages/95/18/16d0b5ef143cb9e52724f18cbccb4b3c5cd4d4e2debbd95e2be3aeb64c9e/ruff-0.15.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b57084e3a3d65418d376c7023711c37cce023cd2fb038a76ba15ee21f3c2c2ee", size = 10497151, upload-time = "2026-02-26T15:40:10.64Z" }, + { url = "https://files.pythonhosted.org/packages/bf/b4/1829314241ddba07c54a742ab387da343fe56a0267a6b6498f3e2ae99821/ruff-0.15.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d567523ff7dcf3112b0f71231d18c3506dd06943359476ee64dea0f9c8f63976", size = 10281955, upload-time = "2026-02-26T15:40:16.033Z" }, + { url = "https://files.pythonhosted.org/packages/d7/93/80a4ec4bd3cf58ca9b49dccf2bd232b520db14184912fb7e0eb6f3ecc484/ruff-0.15.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:4223088d255bf31a50b6640445b39f668164d64c23e5fa403edfb1e0b11122e5", size = 10766613, upload-time = "2026-02-26T15:40:21.55Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/fe016b862295dc57499997e7f2edc58119469b210f4f03ccb763fa65f130/ruff-0.15.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:32399ddae088970b2db6efd8d3f49981375cb828075359b6c088ed1fe63d64e1", size = 11262113, upload-time = "2026-02-26T15:39:41.5Z" }, + { url = "https://files.pythonhosted.org/packages/42/b1/77dcd05940388d9ba3de03ac4b8b598826d57935728071e1be9f2ef5b714/ruff-0.15.3-py3-none-win32.whl", hash = "sha256:1f1eb95ff614351e3a89a862b6d94e6c42c170e61916e1f20facd6c38477f5f3", size = 10509423, upload-time = "2026-02-26T15:40:05.217Z" }, + { url = "https://files.pythonhosted.org/packages/29/d5/76aab0fabbd54e8c77d02fcff2494906ba85b539d22aa9b7124f7100f008/ruff-0.15.3-py3-none-win_amd64.whl", hash = "sha256:2b22dffe5f5e1e537097aa5208684f069e495f980379c4491b1cfb198a444d0c", size = 11637739, upload-time = "2026-02-26T15:39:53.951Z" }, + { url = "https://files.pythonhosted.org/packages/f2/61/9b4e3682dfd26054321e1b2fdb67a51361dd6ec2fb63f2b50d711f8832ae/ruff-0.15.3-py3-none-win_arm64.whl", hash = "sha256:82443c14d694d4cbd9e598ede27ef5d6f08389ccad91c933be775ea2f4e66f76", size = 10957794, upload-time = "2026-02-26T15:40:08.045Z" }, ] [[package]] @@ -380,13 +552,31 @@ dependencies = [ { name = "pyyaml" }, ] +[[package]] +name = "sunbeam-ndr-contract" +version = "2027.1.0.dev0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b4/73/71292096d2916434cb1c97c774db7b48d18d3f067a810e81f1b97ae0fc10/sunbeam_ndr_contract-2027.1.0.dev0.tar.gz", hash = "sha256:d116ce5e0cc847e42cc091486455209eaf3d83090f724eca5e481c97b0e161f4", size = 9343, upload-time = "2026-11-25T10:41:30.856Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/8a/af6613e210f431730d78f758e2f6486baefa18adc93d5c1e46dfdc40a2b7/sunbeam_ndr_contract-2027.1.0.dev0-py3-none-any.whl", hash = "sha256:e02b802d5cbd5306cfc04781e8bca96b78fb6871055993bede5c4c14d0e71c9b", size = 8913, upload-time = "2026-11-25T10:41:30.033Z" }, +] + +[[package]] +name = "tomlkit" +version = "0.15.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/08/72/fc01563df95c189a9f65850096bdc205bc2fe37da6c740cd64afaf18d07e/tomlkit-0.15.2.tar.gz", hash = "sha256:83e32755ba1d20d9340bd069ee97e9f6232ba2346b63ffcba425de01f7e327a6", size = 190522, upload-time = "2026-10-16T04:07:08.166Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/da/46/7d84138a60a8bd796825b2d38ebe92d0d16501ca57d501b7c5d677401bbc/tomlkit-0.15.2-py3-none-any.whl", hash = "sha256:05562412163a3037b94497385fb7f9204c637bc605af7a48199e41cf2272f437", size = 52225, upload-time = "2026-10-16T04:07:09.216Z" }, +] + [[package]] name = "typing-extensions" version = "4.15.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391 } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614 }, + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, ] [[package]] @@ -396,25 +586,25 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949 } +sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611 }, + { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, ] [[package]] name = "wcwidth" version = "0.6.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/35/a2/8e3becb46433538a38726c948d3399905a4c7cabd0df578ede5dc51f0ec2/wcwidth-0.6.0.tar.gz", hash = "sha256:cdc4e4262d6ef9a1a57e018384cbeb1208d8abbc64176027e2c2455c81313159", size = 159684 } +sdist = { url = "https://files.pythonhosted.org/packages/35/a2/8e3becb46433538a38726c948d3399905a4c7cabd0df578ede5dc51f0ec2/wcwidth-0.6.0.tar.gz", hash = "sha256:cdc4e4262d6ef9a1a57e018384cbeb1208d8abbc64176027e2c2455c81313159", size = 159684, upload-time = "2026-02-06T19:19:40.919Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/68/5a/199c59e0a824a3db2b89c5d2dade7ab5f9624dbf6448dc291b46d5ec94d3/wcwidth-0.6.0-py3-none-any.whl", hash = "sha256:1a3a1e510b553315f8e146c54764f4fb6264ffad731b3d78088cdb1478ffbdad", size = 94189 }, + { url = "https://files.pythonhosted.org/packages/68/5a/199c59e0a824a3db2b89c5d2dade7ab5f9624dbf6448dc291b46d5ec94d3/wcwidth-0.6.0-py3-none-any.whl", hash = "sha256:1a3a1e510b553315f8e146c54764f4fb6264ffad731b3d78088cdb1478ffbdad", size = 94189, upload-time = "2026-02-06T19:19:39.646Z" }, ] [[package]] name = "win-inet-pton" version = "1.1.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d9/da/0b1487b5835497dea00b00d87c2aca168bb9ca2e2096981690239e23760a/win_inet_pton-1.1.0.tar.gz", hash = "sha256:dd03d942c0d3e2b1cf8bab511844546dfa5f74cb61b241699fa379ad707dea4f", size = 2949 } +sdist = { url = "https://files.pythonhosted.org/packages/d9/da/0b1487b5835497dea00b00d87c2aca168bb9ca2e2096981690239e23760a/win_inet_pton-1.1.0.tar.gz", hash = "sha256:dd03d942c0d3e2b1cf8bab511844546dfa5f74cb61b241699fa379ad707dea4f", size = 2949, upload-time = "2019-02-19T17:46:23.925Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/be/31/ff772a44aa56319df8afbb0b34f1a856f66f05b9d5f1fed917849e47fdae/win_inet_pton-1.1.0-py2.py3-none-any.whl", hash = "sha256:eaf0193cbe7152ac313598a0da7313fb479f769343c0c16c5308f64887dc885b", size = 4848 }, + { url = "https://files.pythonhosted.org/packages/be/31/ff772a44aa56319df8afbb0b34f1a856f66f05b9d5f1fed917849e47fdae/win_inet_pton-1.1.0-py2.py3-none-any.whl", hash = "sha256:eaf0193cbe7152ac313598a0da7313fb479f769343c0c16c5308f64887dc885b", size = 4848, upload-time = "2019-02-19T17:46:22.182Z" }, ] From 785782852b32120c20ded79980aa987a5a863136 Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Mon, 23 Nov 2026 14:05:05 +0100 Subject: [PATCH 2/3] feat: manage protected NDR peering attachments Resolve typed attachment options against live OVS and kernel state. Install nftables protection before creating managed access ports and verify protection before starting a peering agent. Assisted-By: Codex (gpt-6.2-sol) Signed-off-by: Guillaume Boutry --- openstack_network_agents/core/ndr_peering.py | 387 ++++++++++++++++++ .../templates/ndr-firewall.nft.j2 | 29 ++ snap/snapcraft.yaml | 2 + tests/unit/core/test_ndr_peering.py | 250 +++++++++++ 4 files changed, 668 insertions(+) create mode 100644 openstack_network_agents/core/ndr_peering.py create mode 100644 openstack_network_agents/templates/ndr-firewall.nft.j2 create mode 100644 tests/unit/core/test_ndr_peering.py diff --git a/openstack_network_agents/core/ndr_peering.py b/openstack_network_agents/core/ndr_peering.py new file mode 100644 index 0000000..c90b9eb --- /dev/null +++ b/openstack_network_agents/core/ndr_peering.py @@ -0,0 +1,387 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +import hashlib +import ipaddress +import json +import os +import subprocess +from collections.abc import Sequence +from dataclasses import dataclass +from pathlib import Path + +from sunbeam_ndr_contract import ( + DedicatedUplink, + Instance, + ProviderTrunk, + is_usable_peering_address, +) + +from openstack_network_agents.core.bridge_datapath import OVSCli, OVSCommandError +from openstack_network_agents.core.templates import get_template + +_OWNER = "sunbeam-ndr-domain" +_BRIDGE = "sunbeam-ndr-bridge" +_VLAN = "sunbeam-ndr-vlan" +_ADDRESS = "sunbeam-ndr-address" +_TABLE = "sunbeam_dynamic_routing" + + +def _tool(path: str) -> str: + snap = os.environ.get("SNAP") + return str(Path(snap) / "usr/sbin" / path) if snap else path + + +@dataclass(frozen=True) +class Attachment: + domain: str + interface: str + address: ipaddress.IPv4Interface | ipaddress.IPv6Interface + bridge: str | None = None + vlan: int | None = None + available: bool = True + + +def _interface_name(domain: str) -> str: + return "ndr-" + hashlib.sha256(domain.encode()).hexdigest()[:11] + + +def _is_access_port(port: dict) -> bool: + # With a tag set, OVS treats an unset VLAN mode as access. + return port.get("vlan_mode") in ([], "access") and port.get("trunks") == [] + + +def _links() -> dict[str, dict]: + output = subprocess.check_output( + [_tool("ip"), "-j", "-d", "address", "show"], timeout=15 + ) + return {link["ifname"]: link for link in json.loads(output)} + + +def _addresses(link: dict, family: int) -> list[tuple[dict, str]]: + return [ + (entry, f"{entry['local']}/{entry['prefixlen']}") + for entry in link.get("addr_info", []) + if "local" in entry + and entry.get("scope") == "global" + and ipaddress.ip_address(entry["local"]).version == family + and is_usable_peering_address(ipaddress.ip_address(entry["local"])) + ] + + +class NDRPeering: + """Resolve and maintain only the host resources dedicated to NDR.""" + + def __init__(self, ovs: OVSCli) -> None: + self.ovs = ovs + self.links = _links() + self.bridges = self.ovs.get_bridge_physnet_map() + self.bridge_interfaces = { + interface + for bridge in self.bridges + for interface in self.ovs.list_bridge_interfaces(bridge) + } | self.bridges.keys() + + def _bridge(self, interface: str) -> str | None: + try: + return self.ovs.vsctl( + "port-to-br", interface, skip_transaction=True + ).strip() + except OVSCommandError: + return None + + def _port(self, interface: str) -> dict: + return self.ovs.list_table( + "Port", interface, ["external_ids", "tag", "vlan_mode", "trunks"] + ) + + def _check_managed_port(self, attachment: Attachment) -> None: + interface = attachment.interface + port = self._port(interface) + if not port and interface not in self.links: + return + existing_type = self.ovs.list_table("Interface", interface, ["type"]).get( + "type" + ) + metadata = port.get("external_ids", {}) + if ( + metadata.get(_OWNER) != attachment.domain + or metadata.get(_ADDRESS) != str(attachment.address) + or metadata.get(_BRIDGE) != attachment.bridge + or metadata.get(_VLAN) != str(attachment.vlan) + or port.get("tag") != attachment.vlan + or not _is_access_port(port) + or existing_type != "internal" + or self._bridge(interface) != attachment.bridge + ): + raise ValueError( + f"Conflicting NDR peering interface {interface}. Drain it before replacing it." + ) + + def _provider(self, domain: str, trunk: ProviderTrunk) -> Attachment: + bridges = [ + bridge for bridge, name in self.bridges.items() if name == trunk.physnet + ] + if len(bridges) != 1: + raise ValueError( + f"NDR physnet {trunk.physnet} must resolve to exactly one local bridge." + ) + attachment = Attachment( + domain, _interface_name(domain), trunk.address, bridges[0], trunk.vlan + ) + self._check_managed_port(attachment) + return attachment + + def _dedicated( + self, + domain: str, + family: int, + uplink: DedicatedUplink, + allow_unavailable: bool, + ) -> Attachment: + interface = uplink.interface + selected = uplink.address + link = self.links.get(interface) + if link is None: + if allow_unavailable and selected is not None: + return Attachment( + domain, interface, ipaddress.ip_interface(selected), available=False + ) + raise ValueError(f"NDR dedicated interface {interface} does not exist.") + kind = link.get("linkinfo", {}).get("info_kind") + parent = link.get("link") + if parent is None and "link_index" in link: + parent = next( + ( + name + for name, item in self.links.items() + if item.get("ifindex") == link["link_index"] + ), + None, + ) + if ( + interface in self.bridge_interfaces + or link.get("master") + or "LOOPBACK" in link.get("flags", []) + or kind in {"bridge", "openvswitch"} + or (kind == "vlan" and (not parent or parent in self.bridge_interfaces)) + ): + raise ValueError( + f"NDR dedicated interface {interface} must be outside the provider bridge." + ) + candidates = [ + ipaddress.ip_interface(cidr) + for entry, cidr in _addresses(link, family) + if selected is None or entry["local"] == str(selected) + ] + if not candidates and allow_unavailable and selected is not None: + return Attachment( + domain, interface, ipaddress.ip_interface(selected), available=False + ) + if len(candidates) != 1: + raise ValueError( + f"NDR dedicated interface {interface} needs one matching IPv{family} address." + ) + return Attachment(domain, interface, candidates[0]) + + def resolve( + self, instances: Sequence[Instance], *, allow_unavailable: bool = False + ) -> tuple[list[Attachment], list[dict[str, object]]]: + """Validate placement against the local OVS and kernel state.""" + attachments = [] + normalized = [] + for item in instances: + domain = item.agent.domain + peering = item.peering + if peering is None: + raise ValueError( + f"NDR domain {domain} needs exactly one peering attachment." + ) + declaration: dict[str, dict[str, object]] + if isinstance(peering, ProviderTrunk): + attachment = self._provider(domain, peering) + declaration = { + "provider-trunk": { + "physnet": peering.physnet, + "vlan": peering.vlan, + "address": str(attachment.address), + } + } + else: + attachment = self._dedicated( + domain, item.ip_version, peering, allow_unavailable + ) + declaration = { + "dedicated-uplink": { + "interface": peering.interface, + "address": str(attachment.address.ip), + } + } + attachments.append(attachment) + normalized.append({**item.declaration, "peering": declaration}) + self._check_uniqueness(attachments) + return attachments, normalized + + def _check_uniqueness(self, attachments: list[Attachment]) -> None: + if len({item.interface for item in attachments}) != len(attachments): + raise ValueError( + "An NDR peering interface must be exclusive to one domain." + ) + if len({item.address.ip for item in attachments}) != len(attachments): + raise ValueError("An NDR peering address must be exclusive to one domain.") + provider = [item for item in attachments if item.bridge] + if len({(item.bridge, item.vlan) for item in provider}) != len(provider): + raise ValueError( + "An NDR provider bridge and VLAN pair must be exclusive to one domain." + ) + for item in attachments: + if any( + name != item.interface and address["local"] == str(item.address.ip) + for name, link in self.links.items() + for address, _ in _addresses(link, item.address.version) + ): + raise ValueError( + f"NDR peering address {item.address.ip} is in use on another interface." + ) + + def _owned_ports(self) -> dict[str, str]: + rows = self.ovs.find("Port", f"external_ids:{_OWNER}!=[]") + result = {} + for row in rows["data"]: + record = dict(zip(rows["headings"], row, strict=True)) + external_ids = record.get("external_ids", []) + if len(external_ids) != 2 or external_ids[0] != "map": + continue + domain = dict(external_ids[1]).get(_OWNER) + if domain and record["name"] == _interface_name(domain): + result[record["name"]] = domain + return result + + def _remove_ports(self, keep: set[str]) -> None: + for interface, domain in self._owned_ports().items(): + if interface in keep: + continue + port = self._port(interface) + interface_type = self.ovs.list_table("Interface", interface, ["type"]).get( + "type" + ) + bridge = self._bridge(interface) + metadata = port.get("external_ids", {}) + if ( + not bridge + or metadata.get(_OWNER) != domain + or metadata.get(_BRIDGE) != bridge + or metadata.get(_VLAN) != str(port.get("tag")) + or type(port.get("tag")) is not int + or not 1 <= port["tag"] <= 4094 + or not _is_access_port(port) + or interface_type != "internal" + ): + raise ValueError( + f"Cannot safely remove NDR peering interface {interface}." + ) + self.ovs.del_port(bridge, interface) + + def apply(self, attachments: list[Attachment], rewrite_firewall: bool) -> None: + """Protect desired attachments and create owned ports after protection is up.""" + managed = [item for item in attachments if item.bridge] + self._remove_ports({item.interface for item in managed}) + if rewrite_firewall: + command = [_tool("nft"), "-f", "-"] + subprocess.run( + command, + input=self.firewall_batch(attachments), + text=True, + check=True, + timeout=15, + ) + for item in managed: + if item.bridge and not self._port(item.interface): + self.ovs.vsctl( + "add-port", + item.bridge, + item.interface, + "--", + "set", + "Port", + item.interface, + f"tag={item.vlan}", + "vlan_mode=access", + f"external_ids:{_OWNER}={item.domain}", + f"external_ids:{_BRIDGE}={item.bridge}", + f"external_ids:{_VLAN}={item.vlan}", + f"external_ids:{_ADDRESS}={item.address}", + "--", + "set", + "Interface", + item.interface, + "type=internal", + ) + + @staticmethod + def firewall_batch(attachments: list[Attachment]) -> str: + """Render the complete desired firewall transaction.""" + return get_template("ndr-firewall.nft.j2").render( + table=_TABLE, + attachments=attachments, + ipv4_addresses=[ + item.address.ip for item in attachments if item.address.version == 4 + ], + ipv6_addresses=[ + item.address.ip for item in attachments if item.address.version == 6 + ], + ) + + @classmethod + def check_firewall(cls, attachments: list[Attachment]) -> None: + subprocess.run( + [_tool("nft"), "--check", "-f", "-"], + input=cls.firewall_batch(attachments), + text=True, + check=True, + timeout=15, + ) + + @staticmethod + def firewall_fingerprint() -> str | None: + """Read the complete live ruleset without mutable packet counters.""" + result = subprocess.run( + [_tool("nft"), "-s", "-n", "list", "table", "inet", _TABLE], + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + check=False, + timeout=15, + ) + return ( + hashlib.sha256(result.stdout).hexdigest() + if result.returncode == 0 + else None + ) + + def ready( + self, attachments: list[Attachment], verify_ports: bool = False + ) -> set[str]: + links = _links() + ready = set() + for attachment in attachments: + if not attachment.available: + continue + if ( + verify_ports + and attachment.bridge + and not self._port(attachment.interface) + ): + continue + link = links.get(attachment.interface, {}) + if "UP" not in link.get("flags", []): + continue + for entry, cidr in _addresses(link, attachment.address.version): + flags = set(entry.get("flags", [])) + invalid = {"tentative", "dadfailed"} + if ( + ipaddress.ip_interface(cidr) == attachment.address + and not flags.intersection(invalid) + and not any(entry.get(flag) for flag in invalid) + ): + ready.add(attachment.domain) + return ready diff --git a/openstack_network_agents/templates/ndr-firewall.nft.j2 b/openstack_network_agents/templates/ndr-firewall.nft.j2 new file mode 100644 index 0000000..4b6cced --- /dev/null +++ b/openstack_network_agents/templates/ndr-firewall.nft.j2 @@ -0,0 +1,29 @@ +{# SPDX-FileCopyrightText: 2026 - Canonical Ltd + SPDX-License-Identifier: Apache-2.0 -#} +add table inet {{ table }} +delete table inet {{ table }} +{% if attachments %} +table inet {{ table }} { + set peering_ports { type ifname; elements = { {{ attachments | map(attribute="interface") | map("tojson") | join(", ") }} }; } + chain input { + type filter hook input priority filter; policy accept; + ct state established,related accept + iifname @peering_ports ip6 hoplimit 255 icmpv6 type { nd-neighbor-solicit, nd-neighbor-advert } accept + iifname @peering_ports icmp type { destination-unreachable, time-exceeded, parameter-problem } accept + iifname @peering_ports icmpv6 type { destination-unreachable, packet-too-big, time-exceeded, parameter-problem } accept + iifname @peering_ports counter drop +{% for selector, addresses in (("ip", ipv4_addresses), ("ip6", ipv6_addresses)) if addresses %} + {{ selector }} daddr { {{ addresses | join(", ") }} } counter drop +{% endfor %} + } + chain forward { + type filter hook forward priority filter; policy accept; +{% for attachment in attachments %} +{% set others = attachments | reject("equalto", attachment) | map(attribute="interface") | map("tojson") | join(", ") %} +{% if others %} + iifname {{ attachment.interface | tojson }} oifname { {{ others }} } counter drop +{% endif %} +{% endfor %} + } +} +{% endif %} diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 8a30a62..7909f9e 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -111,6 +111,8 @@ parts: - cargo - rustc stage-packages: + - iproute2 + - nftables - openvswitch-switch - python3.14-minimal - neutron-bgp-dragent diff --git a/tests/unit/core/test_ndr_peering.py b/tests/unit/core/test_ndr_peering.py new file mode 100644 index 0000000..60ff9b8 --- /dev/null +++ b/tests/unit/core/test_ndr_peering.py @@ -0,0 +1,250 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +from ipaddress import ip_interface +from unittest.mock import Mock + +import pytest +from sunbeam_ndr_contract import parse_instances + +from openstack_network_agents.core import ndr_peering + + +def _instance(domain, mode, family, **peering): + return parse_instances( + [ + { + "domain": domain, + "family": family, + "host": domain, + "service-name": "agent-" + domain, + "router-id": "192.0.2.1", + "peering": {mode: peering}, + } + ] + )[0] + + +@pytest.fixture +def host(monkeypatch): + links = { + "eno1": {}, + "uplink122": { + "flags": ["UP"], + "link": "eno1", + "linkinfo": {"info_kind": "vlan"}, + "addr_info": [{"local": "2001:db8::3", "prefixlen": 64, "scope": "global"}], + }, + } + ovs = Mock() + ovs.get_bridge_physnet_map.return_value = {"br-ex": "physnet1"} + ovs.list_bridge_interfaces.return_value = ["br-ex", "eno2"] + ovs.list_table.return_value = {} + ovs.find.return_value = {"headings": [], "data": []} + monkeypatch.setattr(ndr_peering, "_links", lambda: links) + return ndr_peering.NDRPeering(ovs) + + +def test_resolve_managed_and_dedicated_attachments(host): + instances = [ + _instance( + "red", + "provider-trunk", + "ipv4", + physnet="physnet1", + vlan=120, + address="192.0.2.3/28", + ), + _instance("blue", "dedicated-uplink", "ipv6", interface="uplink122"), + ] + attachments, normalized = host.resolve(instances) + red, blue = attachments + assert red.bridge == "br-ex" + assert red.vlan == 120 + assert len(red.interface) <= 15 + assert blue.interface == "uplink122" + assert normalized[0] == instances[0].declaration + assert normalized[1]["peering"]["dedicated-uplink"]["address"] == "2001:db8::3" + + +def test_reject_shared_provider_segment(host): + instances = [ + _instance( + "red", + "provider-trunk", + "ipv4", + physnet="physnet1", + vlan=120, + address="192.0.2.3/28", + ), + _instance( + "blue", + "provider-trunk", + "ipv6", + physnet="physnet1", + vlan=120, + address="2001:db8::4/64", + ), + ] + with pytest.raises(ValueError, match="bridge and VLAN pair must be exclusive"): + host.resolve(instances) + + +def test_reject_managed_port_ownership_conflict(host): + host.ovs.list_table.return_value = {"external_ids": {"operator": "yes"}, "tag": 120} + with pytest.raises(ValueError, match="Conflicting NDR peering interface"): + host.resolve( + [ + _instance( + "red", + "provider-trunk", + "ipv4", + physnet="physnet1", + vlan=120, + address="192.0.2.3/28", + ) + ] + ) + host.ovs.del_port.assert_not_called() + + +@pytest.mark.parametrize( + ("vlan_mode", "trunks", "valid"), + [ + ([], [], True), + ("access", [], True), + ("native-tagged", [121], False), + ("trunk", [], False), + ("access", [121], False), + ], +) +def test_managed_port_requires_an_access_vlan(host, vlan_mode, trunks, valid): + declaration = _instance( + "red", + "provider-trunk", + "ipv4", + physnet="physnet1", + vlan=120, + address="192.0.2.3/28", + ) + host.ovs.list_table.side_effect = [ + { + "external_ids": { + "sunbeam-ndr-domain": "red", + "sunbeam-ndr-bridge": "br-ex", + "sunbeam-ndr-vlan": "120", + "sunbeam-ndr-address": "192.0.2.3/28", + }, + "tag": 120, + "vlan_mode": vlan_mode, + "trunks": trunks, + }, + {"type": "internal"}, + ] + host.ovs.vsctl.return_value = "br-ex" + + if valid: + attachments, _ = host.resolve([declaration]) + assert attachments[0].vlan == 120 + else: + with pytest.raises(ValueError, match="Conflicting NDR peering interface"): + host.resolve([declaration]) + + +def test_reject_dedicated_vlan_on_provider_uplink(host): + host.links["uplink122"]["link"] = "eno2" + with pytest.raises(ValueError, match="must be outside the provider bridge"): + host.resolve( + [_instance("blue", "dedicated-uplink", "ipv6", interface="uplink122")] + ) + + +def test_address_readiness_waits_for_ipv6_dad(host): + attachments, _ = host.resolve( + [_instance("blue", "dedicated-uplink", "ipv6", interface="uplink122")] + ) + entry = host.links["uplink122"]["addr_info"][0] + entry["tentative"] = True + assert host.ready(attachments) == set() + entry.pop("tentative") + assert host.ready(attachments) == {"blue"} + + +def test_protection_precedes_managed_port_creation(host, monkeypatch): + attachments, _ = host.resolve( + [ + _instance( + "red", + "provider-trunk", + "ipv4", + physnet="physnet1", + vlan=120, + address="192.0.2.3/28", + ) + ] + ) + timeline = Mock() + monkeypatch.setattr(ndr_peering.subprocess, "run", timeline.nft) + host.ovs.vsctl = timeline.ovs + + host.apply(attachments, rewrite_firewall=True) + + assert [event[0] for event in timeline.mock_calls] == ["nft", "ovs"] + batch = timeline.nft.call_args.kwargs["input"] + assert "ip daddr { 192.0.2.3 } counter drop" in batch + assert timeline.ovs.call_args.args[:3] == ( + "add-port", + "br-ex", + attachments[0].interface, + ) + assert "vlan_mode=access" in timeline.ovs.call_args.args + + +@pytest.mark.parametrize( + "port_settings", + [ + {"tag": 123, "vlan_mode": "access", "trunks": []}, + {"tag": 120, "vlan_mode": "native-tagged", "trunks": [121]}, + ], +) +def test_refuse_removing_owned_port_with_vlan_drift(host, port_settings): + name = ndr_peering._interface_name("red") + metadata = { + "sunbeam-ndr-domain": "red", + "sunbeam-ndr-bridge": "br-ex", + "sunbeam-ndr-vlan": "120", + } + host.ovs.find.return_value = { + "headings": ["name", "external_ids"], + "data": [[name, ["map", list(metadata.items())]]], + } + host.ovs.list_table.side_effect = [ + {"external_ids": metadata, **port_settings}, + {"type": "internal"}, + ] + host.ovs.vsctl.return_value = "br-ex" + + with pytest.raises(ValueError, match="Cannot safely remove"): + host.apply([], rewrite_firewall=False) + + host.ovs.del_port.assert_not_called() + + +def test_firewall_batch_protects_both_families_and_isolates_ports(): + ipv4 = ndr_peering.Attachment("red", "peering4", ip_interface("192.0.2.3/28")) + ipv6 = ndr_peering.Attachment("blue", "peering6", ip_interface("2001:db8::3/64")) + + batch = ndr_peering.NDRPeering.firewall_batch([ipv4, ipv6]) + + assert 'elements = { "peering4", "peering6" }' in batch + assert "ip daddr { 192.0.2.3 } counter drop" in batch + assert "ip6 daddr { 2001:db8::3 } counter drop" in batch + assert 'iifname "peering4" oifname { "peering6" } counter drop' in batch + assert 'iifname "peering6" oifname { "peering4" } counter drop' in batch + + +def test_empty_firewall_batch_only_removes_the_ndr_table(): + assert ndr_peering.NDRPeering.firewall_batch([]) == ( + "add table inet sunbeam_dynamic_routing\n" + "delete table inet sunbeam_dynamic_routing\n" + ) From b2181feaa99e641ed714e65d7a4b039457ad98f9 Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Mon, 23 Nov 2026 14:05:06 +0100 Subject: [PATCH 3/3] feat: reconcile NDR host state from committed snap config Validate pending settings before applying OVN changes. Schedule the watcher after OVN configuration succeeds and reconcile committed placement under a lock. Restore missing managed ports, and stop agents before removing their host protection. Recover abandoned Pebble sockets and quarantine invalid NDR layers so the watcher can rebuild from committed placement. Stop an NDR-only supervisor on explicit disable and preserve shared workloads. Expose the v1 validation response using the shared contract. Cover placement validation, supervisor recovery, and cleanup with tests. Assisted-By: Codex (gpt-6.2-sol) Signed-off-by: Guillaume Boutry --- .../cli/dynamic_routing.py | 68 +++ openstack_network_agents/cli/main.py | 2 + .../core/dynamic_routing.py | 113 ++++- openstack_network_agents/core/ndr_host.py | 198 ++++++++ openstack_network_agents/core/ndr_peering.py | 6 + openstack_network_agents/hooks/configure.py | 45 +- snap/snapcraft.yaml | 11 + tests/unit/core/test_dynamic_routing.py | 119 ++++- tests/unit/core/test_ndr_host.py | 441 ++++++++++++++++++ tests/unit/core/test_ndr_peering.py | 82 +++- tests/unit/test_configure_hook.py | 145 ++++++ 11 files changed, 1202 insertions(+), 28 deletions(-) create mode 100644 openstack_network_agents/cli/dynamic_routing.py create mode 100644 openstack_network_agents/core/ndr_host.py create mode 100644 tests/unit/core/test_ndr_host.py create mode 100644 tests/unit/test_configure_hook.py diff --git a/openstack_network_agents/cli/dynamic_routing.py b/openstack_network_agents/cli/dynamic_routing.py new file mode 100644 index 0000000..ee5b0b8 --- /dev/null +++ b/openstack_network_agents/cli/dynamic_routing.py @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +import json +import logging +import subprocess +import time + +import click +from snaphelpers import Snap + +from openstack_network_agents.core.ndr_host import HostState, NDRHost, validate + +logger = logging.getLogger(__name__) +_RECONCILE_ERRORS = ( + KeyError, + TypeError, + ValueError, + RuntimeError, + OSError, + subprocess.SubprocessError, +) + + +@click.group() +def dynamic_routing() -> None: + """Validate and reconcile local dynamic routing attachments.""" + + +@dynamic_routing.command("validate") +@click.pass_obj +def validate_instances(snap: Snap) -> None: + """Validate the JSON instance list on standard input.""" + try: + instances = json.load(click.get_text_stream("stdin")) + result = validate(snap, instances) + except _RECONCILE_ERRORS as exc: + raise click.ClickException(str(exc)) from None + click.echo(json.dumps(result, sort_keys=True)) + + +@dynamic_routing.command("reconcile") +@click.pass_obj +def reconcile_instances(snap: Snap) -> None: + """Activate placement once the planned interface addresses are ready.""" + host = NDRHost(snap) + try: + state = host.reconcile() + except _RECONCILE_ERRORS as exc: + raise click.ClickException(str(exc)) from None + click.echo(json.dumps({"ready": state.peerings_ready})) + + +@dynamic_routing.command("watch", hidden=True) +@click.pass_obj +def watch(snap: Snap) -> None: + """Restore NDR host readiness independently of Pebble startup.""" + host = NDRHost(snap) + state: HostState | None = None + while True: + try: + current = host.reconcile(polling=True) + if current != state: + logger.info("NDR host entered state %s", current) + state = current + except _RECONCILE_ERRORS as exc: + logger.warning("NDR host attachment not ready: %s", exc) + time.sleep(5) diff --git a/openstack_network_agents/cli/main.py b/openstack_network_agents/cli/main.py index fede2cd..ec93f73 100644 --- a/openstack_network_agents/cli/main.py +++ b/openstack_network_agents/cli/main.py @@ -6,6 +6,7 @@ import click from snaphelpers import Snap +from openstack_network_agents.cli.dynamic_routing import dynamic_routing from openstack_network_agents.cli.log import setup_root_logging from openstack_network_agents.cli.nics import list_nics from openstack_network_agents.cli.setup_bridge import setup_bridge @@ -37,6 +38,7 @@ def main(): cli.add_command(setup_bridge) cli.add_command(show_bridge_setup) cli.add_command(list_nics) + cli.add_command(dynamic_routing) cli(obj=snap) diff --git a/openstack_network_agents/core/dynamic_routing.py b/openstack_network_agents/core/dynamic_routing.py index 4a7c725..21c48fe 100644 --- a/openstack_network_agents/core/dynamic_routing.py +++ b/openstack_network_agents/core/dynamic_routing.py @@ -4,12 +4,17 @@ """Reconcile local Neutron Dynamic Routing agents under Pebble.""" import ast +import fcntl import json +import logging import os import shlex +import socket import ssl import subprocess import tempfile +from collections.abc import Iterator +from contextlib import contextmanager from dataclasses import dataclass from pathlib import Path from typing import NotRequired, TypedDict, cast @@ -18,6 +23,8 @@ from openstack_network_agents.core.templates import get_template +logger = logging.getLogger(__name__) + _PEBBLE_APP = "openstack-network-agents.pebble" Service = TypedDict( @@ -160,20 +167,54 @@ def _run_pebble(self, *args: str) -> None: if result.returncode: raise RuntimeError(f"NDR Pebble {args[0]} failed.") + @contextmanager + def _lock_layer(self) -> Iterator[None]: + # Pebble startup and host reconciliation use different processes. + # Hold this lock only for layer I/O, never around snapctl. + self.pebble_dir.mkdir(mode=0o700, parents=True, exist_ok=True) + with (self.pebble_dir / ".ndr-layer.lock").open("a") as lock: + fcntl.flock(lock, fcntl.LOCK_EX) + yield + + @staticmethod + def _read_layer(path: Path) -> PebbleLayer: + """Load a generated layer or move an invalid copy out of Pebble's plan.""" + try: + plan = json.loads(path.read_text()) + except FileNotFoundError: + return {} + except ValueError: + plan = None + if isinstance(plan, dict): + services = plan.get("services", {}) + if isinstance(services, dict) and all( + isinstance(service, dict) + and isinstance(service.get("command"), str) + and service.get("startup") in (None, "enabled", "disabled") + for service in services.values() + ): + return cast(PebbleLayer, plan) + + quarantined = path.with_suffix(".invalid") + path.replace(quarantined) + logger.warning("Moved invalid NDR Pebble layer to %s.", quarantined) + return {} + def guard_supervisor_start(self) -> None: - """Pause legacy NDR services until host readiness has been checked.""" - if not (previous := _read(self.layer)): + """Pause NDR services until host readiness has been checked.""" + if not self.layer.exists(): return - plan = json.loads(previous) - services = plan.get("services", {}) - if "log-targets" in plan or any( - service.get("startup") != "disabled" for service in services.values() - ): - for service in services.values(): - service["startup"] = "disabled" - _write_private( - self.layer, json.dumps({"services": services}, sort_keys=True) - ) + with self._lock_layer(): + plan = self._read_layer(self.layer) + services = plan.get("services", {}) + if "log-targets" in plan or any( + service.get("startup") != "disabled" for service in services.values() + ): + for service in services.values(): + service["startup"] = "disabled" + _write_private( + self.layer, json.dumps({"services": services}, sort_keys=True) + ) def _service_path(self, service: str) -> Path: return self.directory / "agents" / service @@ -261,11 +302,15 @@ def has_state(self) -> bool: ) def _inventory(self) -> _PebbleInventory: - saved = _read(self.layer) - legacy = _read(self.legacy_layer) + saved: PebbleLayer = {} + legacy: PebbleLayer = {} + if self.layer.exists() or self.legacy_layer.exists(): + with self._lock_layer(): + saved = self._read_layer(self.layer) + legacy = self._read_layer(self.legacy_layer) return _PebbleInventory( - layer=cast(PebbleLayer, json.loads(saved)) if saved else PebbleLayer(), - legacy_services=set(json.loads(legacy)["services"]) if legacy else set(), + layer=saved, + legacy_services=set(legacy.get("services", {})), configs={ path.parent.name for path in self.directory.glob("agents/*/agent.conf") }, @@ -277,7 +322,20 @@ def _live_services(self) -> dict[str, ServiceStatus] | None: return None try: return self._list_services() - except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as error: + except subprocess.CalledProcessError as error: + # A failed CLI call can also mean an unhealthy live supervisor. + # Let Pebble reclaim the path only after proving no listener exists. + if self.socket.is_socket(): + with socket.socket(socket.AF_UNIX) as connection: + connection.settimeout(1) + try: + connection.connect(str(self.socket)) + except ConnectionRefusedError, FileNotFoundError: + return None + except OSError: + pass + raise RuntimeError("The NDR Pebble supervisor is unreachable.") from error + except subprocess.TimeoutExpired as error: raise RuntimeError("The NDR Pebble supervisor is unreachable.") from error def _stop_supervisor(self) -> None: @@ -327,6 +385,7 @@ def apply( *, transport: str = "", ca_cert: str = "", + disable_supervisor: bool = False, ) -> None: """Reconcile instances while keeping unaffected BGP sessions running.""" if not agents: @@ -341,9 +400,15 @@ def apply( if agents or inventory.shared: raise live = None - if live is None and not (agents or inventory.shared): - # Stop the daemon through snapd before discarding its private files. + known = configured | inventory.configs + if ( + not agents + and not inventory.shared + and (live is None or (disable_supervisor and not live.keys() - known)) + ): + # Preserve other workloads, including layers added only in memory. self._stop_supervisor() + live = None previous_plan = inventory.layer current = previous_plan.get("services", {}).copy() @@ -404,7 +469,8 @@ def apply( if not ca_cert: self.ca_file.unlink(missing_ok=True) if desired: - _write_private(self.layer, json.dumps(plan, sort_keys=True)) + with self._lock_layer(): + _write_private(self.layer, json.dumps(plan, sort_keys=True)) if live is None: subprocess.run( ["snapctl", "start", "--enable", _PEBBLE_APP], @@ -413,5 +479,8 @@ def apply( ) else: # Retain the cleanup index until the services and files are retired. - self.layer.unlink(missing_ok=True) - self.legacy_layer.unlink(missing_ok=True) + with self._lock_layer(): + self.layer.unlink(missing_ok=True) + if self.legacy_layer.exists(): + with self._lock_layer(): + self.legacy_layer.unlink(missing_ok=True) diff --git a/openstack_network_agents/core/ndr_host.py b/openstack_network_agents/core/ndr_host.py new file mode 100644 index 0000000..b835a5a --- /dev/null +++ b/openstack_network_agents/core/ndr_host.py @@ -0,0 +1,198 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +import fcntl +import hashlib +import json +import subprocess +from enum import StrEnum + +from snaphelpers import Snap +from sunbeam_ndr_contract import CONTRACT_VERSION, ValidationResult, parse_instances + +from openstack_network_agents.core.bridge_datapath import OVSCli +from openstack_network_agents.core.common import ovs_switch_socket +from openstack_network_agents.core.constants import OVS_CLI_DEFAULT_TIMEOUT +from openstack_network_agents.core.dynamic_routing import ( + DynamicRouting, + NDRConfig, + _read, + _write_private, + parse_config, +) +from openstack_network_agents.core.ndr_peering import NDRPeering + +_WATCH_APP = "openstack-network-agents.ndr-host" + + +class HostState(StrEnum): + """Outcome of a host reconciliation, derived from config and live state.""" + + DISABLED = "disabled" + WAITING_FOR_PLACEMENT = "waiting for a peering plan" + WAITING_FOR_PEERINGS = "waiting for protected peering addresses" + PAUSED = "peerings ready, waiting for AMQP credentials" + READY = "peerings ready" + + @property + def peerings_ready(self) -> bool: + """Report whether the placement needs further peering address setup.""" + return self in (HostState.DISABLED, HostState.PAUSED, HostState.READY) + + +def _host(snap: Snap) -> NDRPeering: + return NDRPeering(OVSCli(ovs_switch_socket(snap), timeout=OVS_CLI_DEFAULT_TIMEOUT)) + + +def validate(snap: Snap, instances: object) -> ValidationResult: + """Check the complete per-unit contract before applying any resources.""" + placement = parse_instances(instances) + if not placement: + return { + "contract-version": CONTRACT_VERSION, + "instances": [], + "managed-addresses": {}, + } + peering = _host(snap) + attachments, normalized = peering.resolve(placement) + peering.check_firewall(attachments) + return { + "contract-version": CONTRACT_VERSION, + "instances": normalized, + "managed-addresses": { + item.interface: str(item.address) for item in attachments if item.bridge + }, + } + + +class NDRHost: + """Reconcile host resources and runnable services from the same snap config.""" + + def __init__(self, snap: Snap) -> None: + self.snap = snap + self.directory = snap.paths.common / "ndr" + self.firewall_state = self.directory / "host-protection" + self.routing = DynamicRouting(snap.paths.common, snap.paths.snap) + self.last_applied: str | None = None + + def validate_pending_config(self, raw: object) -> NDRConfig: + """Validate pending settings before the configure hook changes the host.""" + config = parse_config(raw) + if config.ca_cert: + self.routing.verify_tls_support() + return config + + def schedule_reconcile(self, config: NDRConfig) -> None: + """Enable the watcher to apply the configuration after snapd commits it.""" + if ( + any(item.peering is not None for item in config.placement) + or self.firewall_state.exists() + or self.routing.has_state() + ): + subprocess.run( + ["snapctl", "start", "--enable", _WATCH_APP], check=True, timeout=35 + ) + + def reconcile(self, *, polling: bool = False) -> HostState: + """Reconcile committed configuration and derive the resulting host state. + + The configure hook does not modify host resources. Both the charm and + the watcher use this locked path after snapd commits the configuration. + """ + self.directory.mkdir(mode=0o700, parents=True, exist_ok=True) + with (self.directory / "host-reconcile.lock").open("a") as lock: + fcntl.flock(lock, fcntl.LOCK_EX) + options = self.snap.config.get_options("ndr") + raw = options.get("ndr.config") + return self._reconcile(parse_config(raw), _digest(raw), polling) + + def _reconcile( + self, + config: NDRConfig, + generation: str, + polling: bool, + ) -> HostState: + peered = [item for item in config.placement if item.peering is not None] + manage_agents = bool(peered and config.transport) + if not manage_agents: + # Disablement and AMQP loss stop the old agents before any host changes. + if not config.placement: + self.routing.apply([], disable_supervisor=True) + else: + self.routing.apply([]) + if not peered and not self.firewall_state.exists(): + return self._peerings_state(config, set()) + host = _host(self.snap) + try: + # The watcher can retain protection for a known dedicated address + # while its interface or address is temporarily unavailable. + attachments, _ = host.resolve(peered, allow_unavailable=True) + except KeyError, TypeError, ValueError: + if manage_agents: + self.routing.apply([]) + self.last_applied = None + raise + intended = _digest(host.firewall_batch(attachments)) + observed = host.firewall_fingerprint() + previous_intent, _, previous_firewall = _read(self.firewall_state).partition( + "\n" + ) + protected = bool(observed) and observed == previous_firewall + ready = host.ready(attachments, verify_ports=True) if protected else set() + active = {agent.service for agent in config.agents_for(ready)} + rewrite = not protected or intended != previous_intent + request = _digest([generation, sorted(active)]) + if ( + polling + and not rewrite + and self.last_applied == request + and self.routing.services_started(active) + and host.managed_ports_match(attachments) + ): + return self._peerings_state(config, ready) + if manage_agents: + self.routing.stop_unwanted(active) + if config.ca_cert: + self.routing.verify_tls_support() + if peered and not self.firewall_state.exists(): + # Record ownership immediately before the first host mutation. + _write_private(self.firewall_state, "") + host.apply(attachments, rewrite_firewall=rewrite) + if rewrite and attachments: + observed = host.firewall_fingerprint() + if observed is None: + raise RuntimeError("NDR firewall rules did not become visible.") + _write_private(self.firewall_state, f"{intended}\n{observed}") + ready = host.ready(attachments) + runnable = config.agents_for(ready) + if manage_agents: + self.routing.apply( + runnable, + transport=config.transport, + ca_cert=config.ca_cert, + ) + if not attachments: + self.firewall_state.unlink(missing_ok=True) + self.last_applied = _digest( + [generation, sorted(agent.service for agent in runnable)] + ) + return self._peerings_state(config, ready) + + @staticmethod + def _peerings_state(config: NDRConfig, ready: set[str]) -> HostState: + if not config.placement: + return HostState.DISABLED + if not any(item.peering is not None for item in config.placement): + return HostState.WAITING_FOR_PLACEMENT + if any( + item.peering is None or item.agent.domain not in ready + for item in config.placement + ): + return HostState.WAITING_FOR_PEERINGS + if not config.transport: + return HostState.PAUSED + return HostState.READY + + +def _digest(value: object) -> str: + return hashlib.sha256(json.dumps(value, sort_keys=True).encode()).hexdigest() diff --git a/openstack_network_agents/core/ndr_peering.py b/openstack_network_agents/core/ndr_peering.py index c90b9eb..efc8ed6 100644 --- a/openstack_network_agents/core/ndr_peering.py +++ b/openstack_network_agents/core/ndr_peering.py @@ -257,6 +257,12 @@ def _owned_ports(self) -> dict[str, str]: result[record["name"]] = domain return result + def managed_ports_match(self, attachments: list[Attachment]) -> bool: + """Check desired and observed OVS port names independently of IP readiness.""" + return self._owned_ports().keys() == { + item.interface for item in attachments if item.bridge + } + def _remove_ports(self, keep: set[str]) -> None: for interface, domain in self._owned_ports().items(): if interface in keep: diff --git a/openstack_network_agents/hooks/configure.py b/openstack_network_agents/hooks/configure.py index 0b07e0c..db2fd41 100644 --- a/openstack_network_agents/hooks/configure.py +++ b/openstack_network_agents/hooks/configure.py @@ -1,6 +1,8 @@ # SPDX-FileCopyrightText: 2024 - Canonical Ltd # SPDX-License-Identifier: Apache-2.0 +import hashlib +import json import logging from snaphelpers import Snap @@ -11,10 +13,12 @@ OVN_CHASSIS_PLUG, OVS_CLI_DEFAULT_TIMEOUT, ) +from openstack_network_agents.core.dynamic_routing import _write_private from openstack_network_agents.core.external_networking import ( configure_ovn_encap_ip, configure_ovn_external_networking, ) +from openstack_network_agents.core.ndr_host import NDRHost from openstack_network_agents.hooks.common import ( is_connected, update_default_config, @@ -24,6 +28,11 @@ logger = logging.getLogger(__name__) +def _fingerprint(value: object) -> str: + """Compare configuration without storing AMQP credentials.""" + return hashlib.sha256(json.dumps(value, sort_keys=True).encode()).hexdigest() + + def _configure_ovn_external_networking(snap: Snap) -> None: """Configure OVN external networking. @@ -56,7 +65,35 @@ def hook(snap: Snap) -> None: logger.info("Running configure hook for OpenStack Network Agents snap.") update_default_config(snap) - if not is_connected(OVN_CHASSIS_PLUG): - logger.warning(f"{OVN_CHASSIS_PLUG} not connected; skipping configure.") - return - _configure_ovn_external_networking(snap) + options = snap.config.get_options("network", "logging", "ndr") + other_config = options.as_dict() + ndr_settings = other_config.pop("ndr", None) + ndr_host = NDRHost(snap) + ndr_config = ndr_host.validate_pending_config(options.get("ndr.config")) + ndr_host.routing.logs.mkdir(mode=0o755, parents=True, exist_ok=True) + connected = is_connected(OVN_CHASSIS_PLUG) + # snapd can copy SNAP_DATA across revisions. Reconcile OVN on refresh and + # after the chassis plug becomes available, even if the settings match. + other_digest = _fingerprint([snap.paths.snap.name, connected, other_config]) + ndr_digest = _fingerprint(ndr_settings) + state_file = snap.paths.data / "configure-state" + try: + previous = state_file.read_text(encoding="ascii") + except FileNotFoundError, UnicodeDecodeError: + previous = "" + previous_other, _, previous_ndr = previous.partition("\n") + ndr_only = ( + previous_other == other_digest + and len(previous_ndr) == len(ndr_digest) + and previous_ndr != ndr_digest + ) + + if not connected: + logger.warning(f"{OVN_CHASSIS_PLUG} not connected; skipping OVN configure.") + elif not ndr_only: + _configure_ovn_external_networking(snap) + + ndr_host.schedule_reconcile(ndr_config) + state = f"{other_digest}\n{ndr_digest}" + if state != previous: + _write_private(state_file, state) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 7909f9e..e8e248c 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -86,6 +86,17 @@ apps: - network-bind - shared-memory + ndr-host: + command: bin/openstack-network-agents dynamic-routing watch + daemon: simple + install-mode: disable + restart-condition: on-failure + plugs: + - network + - network-control + - ovn-chassis + - firewall-control + parts: snap-version: plugin: nil diff --git a/tests/unit/core/test_dynamic_routing.py b/tests/unit/core/test_dynamic_routing.py index 11752c8..bae51ff 100644 --- a/tests/unit/core/test_dynamic_routing.py +++ b/tests/unit/core/test_dynamic_routing.py @@ -2,9 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 import json +import socket import stat from configparser import ConfigParser -from subprocess import CalledProcessError +from pathlib import Path +from subprocess import CalledProcessError, TimeoutExpired from unittest.mock import call, patch import pytest @@ -406,3 +408,118 @@ def test_dual_stack_reconciles_each_family_independently(tmp_path): entry.args for entry in pebble.call_args_list if entry.args[0] == "stop" ] == [("stop", "agent-client6-v6")] assert not ipv6_config.exists() + + +@pytest.fixture +def routing_with_socket(tmp_path, monkeypatch): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + routing.pebble_dir.mkdir() + monkeypatch.chdir(routing.pebble_dir) + # Linux limits UNIX socket addresses to 107 bytes. + routing.socket = Path(".pebble.socket") + return routing + + +def test_recover_active_placement_with_abandoned_pebble_socket(routing_with_socket): + routing = routing_with_socket + with socket.socket(socket.AF_UNIX) as listener: + listener.bind(str(routing.socket)) + + with ( + patch.object( + routing, "_list_services", side_effect=CalledProcessError(1, "pebble") + ), + patch("subprocess.run") as snapctl, + ): + _apply(routing, _config(_instance("alpha"))) + + snapctl.assert_called_once_with( + ["snapctl", "start", "--enable", "openstack-network-agents.pebble"], + check=True, + timeout=35, + ) + assert routing.socket.is_socket() + + +def test_keeps_socket_when_live_pebble_cannot_list_services(routing_with_socket): + routing = routing_with_socket + with socket.socket(socket.AF_UNIX) as listener: + listener.bind(str(routing.socket)) + listener.listen() + with ( + patch.object( + routing, "_list_services", side_effect=CalledProcessError(1, "pebble") + ), + patch("subprocess.run") as snapctl, + pytest.raises(RuntimeError, match="supervisor is unreachable"), + ): + _apply(routing, _config(_instance("alpha"))) + snapctl.assert_not_called() + assert routing.socket.is_socket() + + +def test_pebble_timeout_is_not_a_stale_socket(routing_with_socket): + routing = routing_with_socket + with socket.socket(socket.AF_UNIX) as listener: + listener.bind(str(routing.socket)) + with ( + patch.object( + routing, "_list_services", side_effect=TimeoutExpired("pebble", 35) + ), + patch("subprocess.run") as snapctl, + pytest.raises(RuntimeError, match="supervisor is unreachable"), + ): + _apply(routing, _config(_instance("alpha"))) + snapctl.assert_not_called() + assert routing.socket.is_socket() + + +@pytest.mark.parametrize("bad_layer", ['{"services":', '{"services": []}']) +@pytest.mark.parametrize("startup_first", [False, True]) +def test_quarantines_only_corrupt_ndr_layer_and_rebuilds( + tmp_path, bad_layer, startup_first +): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + routing.layer.parent.mkdir(parents=True) + routing.layer.write_text(bad_layer) + other = routing.layer.parent / "010-other.yaml" + other.write_text("services: {}") + + if startup_first: + routing.guard_supervisor_start() + assert not routing.layer.exists() + + with patch("subprocess.run"): + _apply(routing, _config(_instance("alpha"))) + + assert other.read_text() == "services: {}" + assert routing.layer.with_suffix(".invalid").read_text() == bad_layer + services = json.loads(routing.layer.read_text())["services"] + assert services["agent-alpha-v4"]["startup"] == "disabled" + + +@pytest.mark.parametrize("other_service", [False, True]) +def test_disable_stops_sole_supervisor_but_preserves_unrelated_live_services( + tmp_path, other_service +): + routing = DynamicRouting(tmp_path, tmp_path / "snap") + with patch("subprocess.run"): + _apply(routing, _config(_instance("alpha"))) + routing.socket.touch() + live = {"agent-alpha-v4": {"current": "active"}} + if other_service: + live["other"] = {"current": "active"} + with ( + patch.object(routing, "_list_services", return_value=live), + patch.object(routing, "_run_pebble") as pebble, + patch.object(routing, "_stop_supervisor") as stop, + ): + routing.apply([], disable_supervisor=True) + + if other_service: + stop.assert_not_called() + assert call("stop", "agent-alpha-v4") in pebble.call_args_list + else: + stop.assert_called_once_with() + pebble.assert_not_called() + assert not routing.layer.exists() diff --git a/tests/unit/core/test_ndr_host.py b/tests/unit/core/test_ndr_host.py new file mode 100644 index 0000000..e20985e --- /dev/null +++ b/tests/unit/core/test_ndr_host.py @@ -0,0 +1,441 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +import json +import socket +from subprocess import CalledProcessError, TimeoutExpired +from types import SimpleNamespace +from unittest.mock import Mock, call + +import pytest +from sunbeam_ndr_contract import Agent + +from openstack_network_agents.core import ndr_host, ndr_peering +from openstack_network_agents.core.dynamic_routing import DynamicRouting +from openstack_network_agents.core.ndr_host import HostState + + +@pytest.fixture +def host(tmp_path, monkeypatch): + snap = Mock(paths=SimpleNamespace(common=tmp_path, snap=tmp_path)) + host = ndr_host.NDRHost(snap) + host.routing = Mock() + peer = Mock() + peer.resolve.side_effect = lambda instances, **kwargs: ( + [item.agent.domain for item in instances], + instances, + ) + peer.firewall_fingerprint.return_value = "observed" + peer.firewall_batch.side_effect = str + peer.ready.return_value = {"red"} + peer.managed_ports_match.return_value = True + monkeypatch.setattr(ndr_host, "_host", lambda snap: peer) + return host, peer + + +def _committed_config(host, payload): + host.snap.config.get_options.return_value.get.side_effect = { + "ndr.config": payload, + }.get + + +def _apply(host, payload, *, polling=False): + _committed_config(host, payload) + return host.reconcile(polling=polling) + + +@pytest.fixture +def instance(): + return { + "domain": "red", + "family": "ipv4", + "service-name": "agent-red-v4", + "host": "net-01.red.v4", + "router-id": "198.18.0.1", + "peering": { + "provider-trunk": { + "physnet": "physnet1", + "vlan": 120, + "address": "192.0.2.3/28", + } + }, + } + + +def test_legacy_identity_is_not_activated(host, instance): + host, peer = host + instance.pop("peering") + payload = {"instances": [instance], "transport-url": "rabbit://broker"} + + assert _apply(host, payload) is HostState.WAITING_FOR_PLACEMENT + + host.routing.apply.assert_called_once_with([]) + peer.apply.assert_not_called() + assert payload["instances"] == [instance] + + +def test_legacy_identity_cannot_share_a_protected_domain(host, instance): + host, _ = host + legacy = {key: value for key, value in instance.items() if key != "peering"} + legacy.update( + {"service-name": "legacy-red", "host": "legacy.red", "router-id": "198.18.0.2"} + ) + payload = {"instances": [legacy, instance], "transport-url": "rabbit://broker"} + + assert _apply(host, payload) is HostState.WAITING_FOR_PEERINGS + + agents = host.routing.apply.call_args.args[0] + assert [agent.service for agent in agents] == ["agent-red-v4"] + + +def test_amqp_loss_preserves_host_resources(host, instance): + host, peer = host + payload = {"instances": [], "paused-instances": [instance]} + + assert _apply(host, payload) is HostState.PAUSED + + peer.apply.assert_called_once_with(["red"], rewrite_firewall=True) + host.routing.stop_unwanted.assert_not_called() + host.routing.apply.assert_called_once_with([]) + + +@pytest.mark.parametrize("paused", [True, False], ids=["paused", "waiting-for-address"]) +def test_watcher_recreates_managed_port_without_an_active_agent( + host, instance, monkeypatch, paused +): + host, _ = host + interface = "ndr-b1f51a511f1" + metadata = { + "sunbeam-ndr-domain": "red", + "sunbeam-ndr-bridge": "br-ex", + "sunbeam-ndr-vlan": "120", + "sunbeam-ndr-address": "192.0.2.3/28", + } + ports = {} + links = {} + ovs = Mock() + ovs.get_bridge_physnet_map.return_value = {"br-ex": "physnet1"} + ovs.list_bridge_interfaces.return_value = ["br-ex", "eno2"] + ovs.list_table.side_effect = lambda table, name, fields: ports.get( + (table, name), {} + ) + ovs.find.side_effect = lambda *_: { + "headings": ["name", "external_ids"], + "data": [[interface, ["map", list(metadata.items())]]] + if ("Port", interface) in ports + else [], + } + + def vsctl(command, *args, **kwargs): + if command == "port-to-br": + return "br-ex" + assert command == "add-port" + ports["Port", interface] = { + "external_ids": metadata, + "tag": 120, + "vlan_mode": "access", + "trunks": [], + } + ports["Interface", interface] = {"type": "internal"} + + ovs.vsctl.side_effect = vsctl + monkeypatch.setattr(ndr_peering, "_links", lambda: links) + monkeypatch.setattr(ndr_host, "_host", lambda snap: ndr_peering.NDRPeering(ovs)) + monkeypatch.setattr(ndr_peering.subprocess, "run", Mock()) + monkeypatch.setattr( + ndr_peering.NDRPeering, "firewall_fingerprint", lambda self: "live" + ) + host.routing.services_started.return_value = True + if paused: + payload = {"instances": [], "paused-instances": [instance]} + else: + payload = {"instances": [instance], "transport-url": "rabbit://broker"} + + assert _apply(host, payload, polling=True) is HostState.WAITING_FOR_PEERINGS + assert ("Port", interface) in ports + if paused: + links[interface] = { + "flags": ["UP"], + "addr_info": [{"local": "192.0.2.3", "prefixlen": 28, "scope": "global"}], + } + assert _apply(host, payload, polling=True) is HostState.PAUSED + + ports.clear() + links.clear() + ovs.vsctl.reset_mock() + + assert _apply(host, payload, polling=True) is HostState.WAITING_FOR_PEERINGS + assert ovs.vsctl.call_args.args[:3] == ("add-port", "br-ex", interface) + assert ("Port", interface) in ports + assert host.routing.apply.call_args.args[0] == [] + + +def test_pending_config_has_no_host_side_effects_before_commit( + host, instance, monkeypatch +): + host, peer = host + queue = Mock() + monkeypatch.setattr(ndr_host.subprocess, "run", queue) + pending = {"instances": [instance], "transport-url": "rabbit://broker"} + _committed_config(host, {"instances": []}) + + host.schedule_reconcile(host.validate_pending_config(pending)) + + queue.assert_called_once_with( + ["snapctl", "start", "--enable", "openstack-network-agents.ndr-host"], + check=True, + timeout=35, + ) + peer.apply.assert_not_called() + host.routing.apply.assert_not_called() + assert not host.firewall_state.exists() + + # snapd rejected the update, so the watcher still sees the old config. + assert host.reconcile(polling=True) is HostState.DISABLED + assert not host.firewall_state.exists() + + # A later successful update can be reconciled without a stale generation. + assert _apply(host, pending, polling=True) is HostState.READY + assert host.firewall_state.exists() + + +def test_rule_drift_is_repaired_before_agents_start(host, instance): + host, peer = host + payload = {"instances": [instance], "transport-url": "rabbit://broker"} + assert _apply(host, payload) is HostState.READY + agents = host.routing.apply.call_args.args[0] + timeline = Mock() + peer.apply = timeline.firewall + host.routing.stop_unwanted = timeline.stop_unwanted + host.routing.apply = timeline.apply + peer.firewall_fingerprint.side_effect = ["tampered", "repaired"] + + assert _apply(host, payload, polling=True) is HostState.READY + + assert timeline.mock_calls == [ + call.stop_unwanted(set()), + call.firewall(["red"], rewrite_firewall=True), + call.apply(agents, transport="rabbit://broker", ca_cert=""), + ] + + +def test_watcher_rechecks_protection_before_starting_an_exited_agent(host, instance): + host, peer = host + payload = {"instances": [instance], "transport-url": "rabbit://broker"} + assert _apply(host, payload) is HostState.READY + agents = host.routing.apply.call_args.args[0] + timeline = Mock() + peer.firewall_fingerprint = timeline.firewall + timeline.firewall.return_value = "observed" + peer.ready = timeline.ready + timeline.ready.return_value = {"red"} + host.routing.services_started = timeline.running + timeline.running.return_value = False + host.routing.apply = timeline.apply + + assert _apply(host, payload, polling=True) is HostState.READY + + assert timeline.mock_calls == [ + call.firewall(), + call.ready(["red"], verify_ports=True), + call.running({"agent-red-v4"}), + call.ready(["red"]), + call.apply(agents, transport="rabbit://broker", ca_cert=""), + ] + + +def test_adding_attachment_preserves_ready_peer(host, instance): + host, _ = host + payload = {"instances": [instance], "transport-url": "rabbit://broker"} + assert _apply(host, payload) is HostState.READY + new = { + **instance, + "domain": "blue", + "service-name": "agent-blue-v4", + "host": "net-01.blue.v4", + "router-id": "198.18.0.2", + } + agents = host.routing.apply.call_args.args[0] + host.routing.stop_unwanted.reset_mock() + + assert ( + _apply(host, {**payload, "instances": [instance, new]}) + is HostState.WAITING_FOR_PEERINGS + ) + + host.routing.stop_unwanted.assert_called_once_with({"agent-red-v4"}) + host.routing.apply.assert_called_with( + agents, transport="rabbit://broker", ca_cert="" + ) + + +@pytest.mark.parametrize("lost", ["interface", "address"]) +def test_watcher_keeps_other_domain_when_dedicated_uplink_is_unavailable( + host, instance, monkeypatch, lost +): + host, _ = host + red = { + **instance, + "peering": {"dedicated-uplink": {"interface": "red0", "address": "192.0.2.3"}}, + } + blue = { + **instance, + "domain": "blue", + "service-name": "agent-blue-v4", + "host": "net-01.blue.v4", + "router-id": "198.18.0.2", + "peering": { + "dedicated-uplink": {"interface": "blue0", "address": "198.51.100.3"} + }, + } + links = { + "red0": { + "flags": ["UP"], + "addr_info": [{"local": "192.0.2.3", "prefixlen": 28, "scope": "global"}], + }, + "blue0": { + "flags": ["UP"], + "addr_info": [ + {"local": "198.51.100.3", "prefixlen": 28, "scope": "global"} + ], + }, + } + ovs = Mock() + ovs.get_bridge_physnet_map.return_value = {} + ovs.find.return_value = {"headings": [], "data": []} + apply = Mock() + monkeypatch.setattr(ndr_peering, "_links", lambda: links) + monkeypatch.setattr(ndr_host, "_host", lambda snap: ndr_peering.NDRPeering(ovs)) + monkeypatch.setattr(ndr_peering.NDRPeering, "apply", apply) + monkeypatch.setattr( + ndr_peering.NDRPeering, "firewall_fingerprint", lambda self: "live" + ) + payload = {"instances": [red, blue], "transport-url": "rabbit://broker"} + + assert _apply(host, payload) is HostState.READY + agents = host.routing.apply.call_args.args[0] + blue_link = links["blue0"] + if lost == "interface": + del links["blue0"] + else: + links["blue0"] = {"flags": ["UP"], "addr_info": []} + host.routing.reset_mock() + apply.reset_mock() + + with pytest.raises(ValueError, match="NDR dedicated interface blue0"): + ndr_host.validate(host.snap, payload["instances"]) + host.routing.stop_unwanted.assert_not_called() + assert _apply(host, payload, polling=True) is HostState.WAITING_FOR_PEERINGS + host.routing.stop_unwanted.assert_called_once_with({"agent-red-v4"}) + host.routing.apply.assert_called_once_with( + [Agent("agent-red-v4", "net-01.red.v4", "198.18.0.1", "red")], + transport="rabbit://broker", + ca_cert="", + ) + attachments = apply.call_args.args[0] + assert [item.interface for item in attachments] == ["red0", "blue0"] + assert not apply.call_args.kwargs["rewrite_firewall"] + + links["blue0"] = blue_link + assert _apply(host, payload, polling=True) is HostState.READY + host.routing.apply.assert_called_with( + agents, transport="rabbit://broker", ca_cert="" + ) + + +def test_physnet_drift_stops_agents_and_retains_existing_protection(host, instance): + host, peer = host + payload = {"instances": [instance], "transport-url": "rabbit://broker"} + assert _apply(host, payload) is HostState.READY + previous_firewall = host.firewall_state.read_text() + host.routing.reset_mock() + peer.apply.reset_mock() + peer.resolve.side_effect = ValueError( + "NDR physnet must resolve to one local bridge." + ) + + with pytest.raises(ValueError, match="physnet must resolve"): + _apply(host, payload, polling=True) + + host.routing.apply.assert_called_once_with([]) + peer.apply.assert_not_called() + assert host.firewall_state.read_text() == previous_firewall + + +def test_explicit_clear_stops_agents_before_removing_host_resources(host, instance): + host, peer = host + assert ( + _apply(host, {"instances": [instance], "transport-url": "rabbit://broker"}) + is HostState.READY + ) + timeline = Mock() + peer.ready.return_value = set() + peer.apply = timeline.firewall + host.routing.stop_unwanted = timeline.stop_unwanted + host.routing.apply = timeline.apply + + assert _apply(host, {"instances": []}) is HostState.DISABLED + + assert timeline.mock_calls == [ + call.apply([], disable_supervisor=True), + call.firewall([], rewrite_firewall=True), + ] + assert not host.firewall_state.exists() + + +@pytest.mark.parametrize("supervisor", ["sole", "shared", "stop-failed"]) +def test_disable_with_unreachable_pebble_supervisor(host, monkeypatch, supervisor): + host, peer = host + root = host.snap.paths.common + host.routing = DynamicRouting(root, root) + host.firewall_state.parent.mkdir(parents=True) + host.firewall_state.write_text("old-intent\nobserved") + host.routing.layer.parent.mkdir(parents=True) + host.routing.layer.write_text( + json.dumps({"services": {"agent-red": {"command": "/bin/sleep 60"}}}) + ) + if supervisor == "shared": + host.routing.layer.with_name("002-other.yaml").write_text("services: {}") + monkeypatch.chdir(host.routing.pebble_dir) + with socket.socket(socket.AF_UNIX) as listener: + listener.bind(".pebble.socket") + failure = ( + TimeoutExpired("pebble", 35) + if supervisor == "shared" + else CalledProcessError(1, ["pebble", "services", "--format=json"]) + ) + monkeypatch.setattr(host.routing, "_list_services", Mock(side_effect=failure)) + timeline = Mock() + monkeypatch.setattr(ndr_host.subprocess, "run", timeline.snapctl) + peer.apply = timeline.firewall + peer.ready.return_value = set() + _committed_config(host, {"instances": []}) + + if supervisor == "shared": + with pytest.raises(RuntimeError, match="Pebble supervisor is unreachable"): + host.reconcile() + timeline.snapctl.assert_not_called() + elif supervisor == "stop-failed": + timeline.snapctl.side_effect = CalledProcessError(1, ["snapctl", "stop"]) + with pytest.raises(CalledProcessError): + host.reconcile() + timeline.snapctl.assert_called_once() + if supervisor != "sole": + timeline.firewall.assert_not_called() + assert host.routing.socket.is_socket() + assert host.routing.layer.exists() + assert host.firewall_state.exists() + return + + assert host.reconcile() is HostState.DISABLED + assert timeline.mock_calls == [ + call.snapctl( + ["snapctl", "stop", "--disable", "openstack-network-agents.pebble"], + check=True, + timeout=35, + ), + call.firewall([], rewrite_firewall=True), + ] + assert not (host.routing.pebble_dir / ".pebble.socket").exists() + assert not host.routing.layer.exists() + assert not host.firewall_state.exists() diff --git a/tests/unit/core/test_ndr_peering.py b/tests/unit/core/test_ndr_peering.py index 60ff9b8..9145242 100644 --- a/tests/unit/core/test_ndr_peering.py +++ b/tests/unit/core/test_ndr_peering.py @@ -1,13 +1,16 @@ # SPDX-FileCopyrightText: 2026 - Canonical Ltd # SPDX-License-Identifier: Apache-2.0 +import json from ipaddress import ip_interface from unittest.mock import Mock import pytest +from click.testing import CliRunner from sunbeam_ndr_contract import parse_instances -from openstack_network_agents.core import ndr_peering +from openstack_network_agents.cli.dynamic_routing import dynamic_routing +from openstack_network_agents.core import ndr_host, ndr_peering def _instance(domain, mode, family, **peering): @@ -67,6 +70,83 @@ def test_resolve_managed_and_dedicated_attachments(host): assert normalized[1]["peering"]["dedicated-uplink"]["address"] == "2001:db8::3" +def test_validate_cli_returns_v1_placement_without_applying_it(host, monkeypatch): + monkeypatch.setattr(ndr_host, "_host", Mock(return_value=host)) + monkeypatch.delenv("SNAP", raising=False) + run_nft = Mock() + monkeypatch.setattr(ndr_peering.subprocess, "run", run_nft) + red = { + "domain": "red", + "family": "ipv4", + "host": "net-01.red", + "service-name": "agent-red", + "router-id": "198.18.0.1", + "peering": { + "provider-trunk": { + "physnet": "physnet1", + "vlan": 120, + "address": "192.0.2.3/28", + }, + }, + } + blue = { + "domain": "blue", + "family": "ipv6", + "host": "net-01.blue", + "service-name": "agent-blue", + "router-id": "198.18.0.2", + "peering": {"dedicated-uplink": {"interface": "uplink122"}}, + } + + result = CliRunner().invoke( + dynamic_routing, ["validate"], input=json.dumps([red, blue]), obj=Mock() + ) + + assert result.exit_code == 0, result.output + assert json.loads(result.stdout) == { + "contract-version": 1, + "instances": [ + red, + { + **blue, + "peering": { + "dedicated-uplink": { + "interface": "uplink122", + "address": "2001:db8::3", + }, + }, + }, + ], + "managed-addresses": {"ndr-b1f51a511f1": "192.0.2.3/28"}, + } + run_nft.assert_called_once() + assert run_nft.call_args.args == (["nft", "--check", "-f", "-"],) + assert '"ndr-b1f51a511f1", "uplink122"' in run_nft.call_args.kwargs["input"] + host.ovs.vsctl.assert_not_called() + host.ovs.del_port.assert_not_called() + + +def test_validate_cli_rejects_legacy_placement_before_reading_host(monkeypatch): + host = Mock() + monkeypatch.setattr(ndr_host, "_host", host) + declaration = { + "domain": "red", + "family": "ipv4", + "host": "net-01.red", + "service-name": "agent-red", + "router-id": "198.18.0.1", + } + + result = CliRunner().invoke( + dynamic_routing, ["validate"], input=json.dumps([declaration]), obj=Mock() + ) + + assert result.exit_code == 1 + assert result.stdout == "" + assert "NDR domain red needs exactly one peering attachment." in result.stderr + host.assert_not_called() + + def test_reject_shared_provider_segment(host): instances = [ _instance( diff --git a/tests/unit/test_configure_hook.py b/tests/unit/test_configure_hook.py new file mode 100644 index 0000000..ec0c455 --- /dev/null +++ b/tests/unit/test_configure_hook.py @@ -0,0 +1,145 @@ +# SPDX-FileCopyrightText: 2026 - Canonical Ltd +# SPDX-License-Identifier: Apache-2.0 + +from types import SimpleNamespace +from unittest.mock import Mock, call, patch + +import pytest + +from openstack_network_agents.hooks import configure + + +@pytest.mark.parametrize( + "change, expect_ovn", + [ + ("enable", False), + ("unset", False), + ("mixed", True), + ("no-op", True), + ("refresh", True), + ("connect", True), + ], +) +def test_configure_ovn_only_skipped_for_ndr_only_updates(tmp_path, change, expect_ovn): + snap = Mock( + paths=SimpleNamespace(common=tmp_path, data=tmp_path, snap=tmp_path / "1") + ) + snap.config.get_options.return_value.as_dict.side_effect = lambda: dict(options) + ndr_config = '{"instances": []}' + initial_ndr = ndr_config if change == "unset" else None + options = { + "network": {"bridge-mapping": "physnet1:br-ex"}, + "ndr": {"config": initial_ndr}, + } + snap.config.get_options.return_value.get.return_value = initial_ndr + + with ( + patch.object(configure, "setup_logging"), + patch.object(configure, "update_default_config"), + patch.object( + configure, "is_connected", side_effect=[change != "connect", True] + ), + patch.object(configure, "_configure_ovn_external_networking") as ovn, + patch.object(configure, "NDRHost") as routing, + ): + configure.hook(snap) + ovn.reset_mock() + + next_ndr = None if change in ("no-op", "unset") else ndr_config + options["ndr"] = {"config": next_ndr} + snap.config.get_options.return_value.get.return_value = next_ndr + if change == "mixed": + options["network"]["bridge-mapping"] = "physnet1:br-provider" + if change == "refresh": + snap.paths.snap = tmp_path / "2" + configure.hook(snap) + + assert ovn.call_args_list == ([call(snap)] if expect_ovn else []) + assert routing.return_value.validate_pending_config.call_args_list == [ + call(initial_ndr), + call(next_ndr), + ] + + +@pytest.mark.parametrize( + "ovn_connected", [True, False], ids=["connected", "disconnected"] +) +def test_configure_schedules_dynamic_routing_once(tmp_path, ovn_connected): + snap = Mock( + paths=SimpleNamespace(common=tmp_path, data=tmp_path, snap=tmp_path / "snap") + ) + ndr_config = '{"instances": []}' + snap.config.get_options.return_value.as_dict.return_value = {"ndr": ndr_config} + snap.config.get_options.return_value.get.return_value = ndr_config + lifecycle = Mock() + + with ( + patch.object(configure, "setup_logging"), + patch.object(configure, "update_default_config", lifecycle.set_defaults), + patch.object( + configure, "is_connected", return_value=ovn_connected + ) as connected, + patch.object( + configure, "_configure_ovn_external_networking", lifecycle.configure_ovn + ), + patch.object(configure, "NDRHost") as routing, + ): + routing.return_value.validate_pending_config = lifecycle.validate_ndr + routing.return_value.schedule_reconcile = lifecycle.schedule_ndr + + configure.hook(snap) + + connected.assert_called_once_with(configure.OVN_CHASSIS_PLUG) + snap.config.get_options.assert_called_once_with("network", "logging", "ndr") + snap.config.get_options.return_value.get.assert_called_once_with("ndr.config") + routing.assert_called_once_with(snap) + expected_calls = [call.set_defaults(snap), call.validate_ndr(ndr_config)] + if ovn_connected: + expected_calls.append(call.configure_ovn(snap)) + expected_calls.append(call.schedule_ndr(lifecycle.validate_ndr.return_value)) + assert lifecycle.mock_calls == expected_calls + + +def test_invalid_ndr_in_mixed_update_does_not_change_ovn(tmp_path): + snap = Mock( + paths=SimpleNamespace(common=tmp_path, data=tmp_path, snap=tmp_path / "snap") + ) + options = snap.config.get_options.return_value + ndr_config = { + "instances": [ + { + "domain": "red", + "family": "ipv4", + "service-name": "agent-red", + "host": "net-01.red", + "router-id": "198.18.0.1", + "peering": { + "provider-trunk": { + "physnet": "physnet1", + "vlan": 4095, + "address": "192.0.2.3/28", + }, + }, + }, + ], + "transport-url": "rabbit://broker", + } + options.as_dict.return_value = { + "network": {"bridge-mapping": "physnet1:br-provider"}, + "ndr": {"config": ndr_config}, + } + options.get.return_value = ndr_config + + with ( + patch.object(configure, "setup_logging"), + patch.object(configure, "update_default_config"), + patch.object(configure, "is_connected", return_value=True), + patch.object(configure, "_configure_ovn_external_networking") as ovn, + patch("openstack_network_agents.core.ndr_host.subprocess.run") as snapctl, + pytest.raises(ValueError, match="Invalid NDR physnet or peering VLAN"), + ): + configure.hook(snap) + + ovn.assert_not_called() + snapctl.assert_not_called() + assert not (tmp_path / "configure-state").exists()