diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0eb3d18c0..a9eddb867 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,8 +8,8 @@ # Network layer is governed by ADR-0006 invariant tests. # Changes here must respect those clauses -# see spinifex/network/invariants/ +# see spinifex/domains/network/invariants/ # docs/development/proposals/az-local-architecture/0006-spinifex-network-layer-contract.md -/spinifex/network/ @joshsiv-mulga +/spinifex/domains/network/ @joshsiv-mulga /spinifex/vpcd/ @joshsiv-mulga -/spinifex/network/invariants/ @joshsiv-mulga +/spinifex/domains/network/invariants/ @joshsiv-mulga diff --git a/cmd/dhcptest/main.go b/cmd/dhcptest/main.go index 4002e4f64..b3f853298 100644 --- a/cmd/dhcptest/main.go +++ b/cmd/dhcptest/main.go @@ -23,7 +23,7 @@ import ( "github.com/insomniacslk/dhcp/dhcpv4" "github.com/insomniacslk/dhcp/dhcpv4/nclient4" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" _ "github.com/mulgadc/bluebottle/pkg/fipsboot" ) diff --git a/cmd/spinifex/cmd/admin.go b/cmd/spinifex/cmd/admin.go index a100e3a28..f3c6e87ae 100644 --- a/cmd/spinifex/cmd/admin.go +++ b/cmd/spinifex/cmd/admin.go @@ -32,11 +32,11 @@ import ( "github.com/mulgadc/spinifex/spinifex/admin" "github.com/mulgadc/spinifex/spinifex/bootstrap/config" "github.com/mulgadc/spinifex/spinifex/domains/ec2/ebs/metadata" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" awsidentifiers "github.com/mulgadc/spinifex/spinifex/foundation/aws/identifiers" "github.com/mulgadc/spinifex/spinifex/foundation/state/clustersize" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/network/host" "github.com/mulgadc/spinifex/spinifex/operator/imagecatalog" operatorprogress "github.com/mulgadc/spinifex/spinifex/operator/progress" "github.com/mulgadc/spinifex/spinifex/providers/ebs" diff --git a/cmd/spinifex/cmd/cluster.go b/cmd/spinifex/cmd/cluster.go index 5ade211c5..2250a33cf 100644 --- a/cmd/spinifex/cmd/cluster.go +++ b/cmd/spinifex/cmd/cluster.go @@ -12,8 +12,8 @@ import ( clusterv1 "github.com/mulgadc/spinifex/contracts/cluster/v1" "github.com/mulgadc/spinifex/spinifex/daemon" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" "github.com/nats-io/nats.go" "github.com/spf13/cobra" ) diff --git a/cmd/spinifex/cmd/cluster_test.go b/cmd/spinifex/cmd/cluster_test.go index a4dd041f6..dc479e063 100644 --- a/cmd/spinifex/cmd/cluster_test.go +++ b/cmd/spinifex/cmd/cluster_test.go @@ -12,7 +12,7 @@ import ( "github.com/mulgadc/spinifex/internal/testkit" "github.com/mulgadc/spinifex/spinifex/bootstrap/config" "github.com/mulgadc/spinifex/spinifex/daemon" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/cmd/spinifex/cmd/get_dhcp_leases.go b/cmd/spinifex/cmd/get_dhcp_leases.go index 48b75ea9b..654802b3e 100644 --- a/cmd/spinifex/cmd/get_dhcp_leases.go +++ b/cmd/spinifex/cmd/get_dhcp_leases.go @@ -9,8 +9,8 @@ import ( "strings" "time" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" "github.com/pterm/pterm" diff --git a/cmd/spinifex/cmd/get_dhcp_leases_test.go b/cmd/spinifex/cmd/get_dhcp_leases_test.go index 5fba3320a..31985b23e 100644 --- a/cmd/spinifex/cmd/get_dhcp_leases_test.go +++ b/cmd/spinifex/cmd/get_dhcp_leases_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/cmd/spinifex/cmd/service.go b/cmd/spinifex/cmd/service.go index 9eaf96611..15c255fb8 100644 --- a/cmd/spinifex/cmd/service.go +++ b/cmd/spinifex/cmd/service.go @@ -12,7 +12,7 @@ import ( "github.com/mulgadc/bluebottle/pkg/otelsetup" "github.com/mulgadc/spinifex/spinifex/bootstrap/config" "github.com/mulgadc/spinifex/spinifex/domains/dns" - "github.com/mulgadc/spinifex/spinifex/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/runtime/roles/awsgw" "github.com/mulgadc/spinifex/spinifex/runtime/roles/nats" "github.com/mulgadc/spinifex/spinifex/runtime/roles/northstar" diff --git a/docs/security/network-connections/README.md b/docs/security/network-connections/README.md index 96c572be7..3e11633e7 100644 --- a/docs/security/network-connections/README.md +++ b/docs/security/network-connections/README.md @@ -81,7 +81,7 @@ The inventory in [§1](#1-inbound-listeners)–[§2](#2-outbound-connections) sa - **Guest** — bound to a per-instance interface and reachable only by that instance's VM. - **Localhost** — bound to `127.0.0.1`; not reachable off-node. -The listener invariant tests (`spinifex/network/invariants` and the multinode e2e suite) read +The listener invariant tests (`spinifex/domains/network/invariants` and the multinode e2e suite) read this table and fail any Cluster- or Encap-scope port found bound to the wildcard address, unless that row's Purpose or Auth text contains the exact phrase **"binds the wildcard by design"**. That phrase is load-bearing, not incidental wording — a row that merely mentions diff --git a/internal/testkit/listenerinventory/doc.go b/internal/testkit/listenerinventory/doc.go index 474af01e0..c488f8501 100644 --- a/internal/testkit/listenerinventory/doc.go +++ b/internal/testkit/listenerinventory/doc.go @@ -4,7 +4,7 @@ // // It exists so the inventory doc is the single fixture two otherwise // unrelated checks read: the static bind-site scan in -// spinifex/network/invariants, which reads install scripts and config +// spinifex/domains/network/invariants, which reads install scripts and config // templates, and the runtime e2e check in tests/e2e/multinode, which reads // `ss -tulnp` on live nodes. Neither belongs under the executable network // layer tree — this package is not part of that stack. It lives in the diff --git a/scripts/setup-ovn_test.sh b/scripts/setup-ovn_test.sh index 6df1912c5..03e6e85f0 100755 --- a/scripts/setup-ovn_test.sh +++ b/scripts/setup-ovn_test.sh @@ -126,7 +126,7 @@ esac # The script and the Go constant must agree: vpcd repairs a veth made before # this existed, and a disagreement would have the two fighting every pass. script_mac=$(printf '%s\n' "$nat_mode_body" | sed -n 's/.*NAT_TRANSIT_HOST_MAC="\([^"]*\)".*/\1/p' | head -1) -go_mac=$(sed -n 's/.*NATTransitHostMAC = "\([^"]*\)".*/\1/p' "$SCRIPT_DIR/../spinifex/network/host/routed.go" | head -1) +go_mac=$(sed -n 's/.*NATTransitHostMAC = "\([^"]*\)".*/\1/p' "$SCRIPT_DIR/../spinifex/domains/network/host/routed.go" | head -1) if [ -n "$script_mac" ] && [ "$script_mac" = "$go_mac" ]; then pass "the transit MAC matches host.NATTransitHostMAC" else diff --git a/spinifex/daemon/bedrock_deps.go b/spinifex/daemon/bedrock_deps.go index 061f8a393..c21bdffa7 100644 --- a/spinifex/daemon/bedrock_deps.go +++ b/spinifex/daemon/bedrock_deps.go @@ -3,11 +3,11 @@ package daemon import ( "log/slog" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/spinifex/domains/network/systemvpc" "github.com/mulgadc/spinifex/spinifex/domains/ochre" gateway_bedrock "github.com/mulgadc/spinifex/spinifex/gateway/bedrock" handlers_rds "github.com/mulgadc/spinifex/spinifex/handlers/rds" - "github.com/mulgadc/spinifex/spinifex/network/host" "github.com/mulgadc/spinifex/spinifex/runtime/compute/gpu" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/daemon/daemon.go b/spinifex/daemon/daemon.go index 1c8efee99..cea633908 100644 --- a/spinifex/daemon/daemon.go +++ b/spinifex/daemon/daemon.go @@ -44,6 +44,11 @@ import ( "github.com/mulgadc/spinifex/spinifex/domains/dns" "github.com/mulgadc/spinifex/spinifex/domains/ec2/instancetypes" handlers_ecr "github.com/mulgadc/spinifex/spinifex/domains/ecr" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/exonet" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/ocinet" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/spinifex/domains/ochre" ochrevector "github.com/mulgadc/spinifex/spinifex/domains/ochre/vector" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" @@ -71,11 +76,6 @@ import ( handlers_elbv2 "github.com/mulgadc/spinifex/spinifex/handlers/elbv2" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" handlers_rds "github.com/mulgadc/spinifex/spinifex/handlers/rds" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" - "github.com/mulgadc/spinifex/spinifex/network/external/exonet" - "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" - "github.com/mulgadc/spinifex/spinifex/network/host" "github.com/mulgadc/spinifex/spinifex/providers/ebs" "github.com/mulgadc/spinifex/spinifex/providers/objectstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/gpu" diff --git a/spinifex/daemon/daemon_dhcp_lease.go b/spinifex/daemon/daemon_dhcp_lease.go index c165278f4..6e3aaf02a 100644 --- a/spinifex/daemon/daemon_dhcp_lease.go +++ b/spinifex/daemon/daemon_dhcp_lease.go @@ -7,7 +7,7 @@ import ( "log/slog" "time" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/nats-io/nats.go" ) diff --git a/spinifex/daemon/daemon_dhcp_lease_test.go b/spinifex/daemon/daemon_dhcp_lease_test.go index 54c5b1ba8..7c1208f3d 100644 --- a/spinifex/daemon/daemon_dhcp_lease_test.go +++ b/spinifex/daemon/daemon_dhcp_lease_test.go @@ -9,8 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" handlers_ec2_eip "github.com/mulgadc/spinifex/spinifex/handlers/ec2/eip" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/daemon/daemon_handlers.go b/spinifex/daemon/daemon_handlers.go index c89868ae2..b236b0c69 100644 --- a/spinifex/daemon/daemon_handlers.go +++ b/spinifex/daemon/daemon_handlers.go @@ -17,10 +17,10 @@ import ( clusterv1 "github.com/mulgadc/spinifex/contracts/cluster/v1" "github.com/mulgadc/spinifex/contracts/ec2/v1" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/idempotency" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" - "github.com/mulgadc/spinifex/spinifex/network/host" "github.com/mulgadc/spinifex/spinifex/runtime/compute/gpu" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/mulgadc/spinifex/spinifex/runtime/formation" diff --git a/spinifex/daemon/daemon_handlers_test.go b/spinifex/daemon/daemon_handlers_test.go index ffc09835e..320266524 100644 --- a/spinifex/daemon/daemon_handlers_test.go +++ b/spinifex/daemon/daemon_handlers_test.go @@ -24,6 +24,7 @@ import ( "github.com/mulgadc/spinifex/internal/testkit" "github.com/mulgadc/spinifex/internal/testkit/ebsfake" "github.com/mulgadc/spinifex/spinifex/domains/ec2/ebs/metadata" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" handlers_ec2_account "github.com/mulgadc/spinifex/spinifex/handlers/ec2/account" handlers_ec2_eigw "github.com/mulgadc/spinifex/spinifex/handlers/ec2/eigw" @@ -38,7 +39,6 @@ import ( handlers_ec2_tags "github.com/mulgadc/spinifex/spinifex/handlers/ec2/tags" handlers_ec2_volume "github.com/mulgadc/spinifex/spinifex/handlers/ec2/volume" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/mulgadc/spinifex/spinifex/providers/objectstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/qmp" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" diff --git a/spinifex/daemon/daemon_mgmt_ip.go b/spinifex/daemon/daemon_mgmt_ip.go index 1fefdd4a4..3022c2999 100644 --- a/spinifex/daemon/daemon_mgmt_ip.go +++ b/spinifex/daemon/daemon_mgmt_ip.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/daemon/daemon_mgmt_ip_test.go b/spinifex/daemon/daemon_mgmt_ip_test.go index 696dc74c5..1d646475b 100644 --- a/spinifex/daemon/daemon_mgmt_ip_test.go +++ b/spinifex/daemon/daemon_mgmt_ip_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/mulgadc/spinifex/spinifex/bootstrap/config" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go" ) diff --git a/spinifex/daemon/daemon_system_instance.go b/spinifex/daemon/daemon_system_instance.go index 947c18f3c..69b4fb86a 100644 --- a/spinifex/daemon/daemon_system_instance.go +++ b/spinifex/daemon/daemon_system_instance.go @@ -16,11 +16,11 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/mulgadc/spinifex/contracts/ec2/v1" "github.com/mulgadc/spinifex/spinifex/domains/ec2/systeminstance" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" awsidentifiers "github.com/mulgadc/spinifex/spinifex/foundation/aws/identifiers" "github.com/mulgadc/spinifex/spinifex/foundation/aws/tags" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" handlers_elbv2 "github.com/mulgadc/spinifex/spinifex/handlers/elbv2" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" hostprocess "github.com/mulgadc/spinifex/spinifex/runtime/host/process" "github.com/mulgadc/spinifex/spinifex/utils" diff --git a/spinifex/daemon/daemon_system_instance_test.go b/spinifex/daemon/daemon_system_instance_test.go index 848308891..350a9e53b 100644 --- a/spinifex/daemon/daemon_system_instance_test.go +++ b/spinifex/daemon/daemon_system_instance_test.go @@ -14,13 +14,13 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/mulgadc/spinifex/internal/testkit" "github.com/mulgadc/spinifex/spinifex/domains/ec2/systeminstance" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/foundation/aws/tags" handlers_ec2_eip "github.com/mulgadc/spinifex/spinifex/handlers/ec2/eip" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" "github.com/mulgadc/spinifex/spinifex/handlers/elbv2" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" diff --git a/spinifex/daemon/external_pools_test.go b/spinifex/daemon/external_pools_test.go index 218a3a9c2..6ad919e62 100644 --- a/spinifex/daemon/external_pools_test.go +++ b/spinifex/daemon/external_pools_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/mulgadc/spinifex/spinifex/bootstrap/config" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/daemon/instance_records_vpcd_test.go b/spinifex/daemon/instance_records_vpcd_test.go index bfca81aba..7a366301d 100644 --- a/spinifex/daemon/instance_records_vpcd_test.go +++ b/spinifex/daemon/instance_records_vpcd_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/mulgadc/spinifex/spinifex/daemon" - "github.com/mulgadc/spinifex/spinifex/network/reconcile" + "github.com/mulgadc/spinifex/spinifex/domains/network/reconcile" "github.com/stretchr/testify/assert" ) diff --git a/spinifex/daemon/ipsec_barrier.go b/spinifex/daemon/ipsec_barrier.go index 3f1ad4981..a2d91175c 100644 --- a/spinifex/daemon/ipsec_barrier.go +++ b/spinifex/daemon/ipsec_barrier.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/daemon/ipsec_barrier_test.go b/spinifex/daemon/ipsec_barrier_test.go index f90165a53..879f133c7 100644 --- a/spinifex/daemon/ipsec_barrier_test.go +++ b/spinifex/daemon/ipsec_barrier_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/daemon/ochre_deps.go b/spinifex/daemon/ochre_deps.go index 50b593efa..e4c4bd399 100644 --- a/spinifex/daemon/ochre_deps.go +++ b/spinifex/daemon/ochre_deps.go @@ -10,11 +10,11 @@ import ( "time" "github.com/mulgadc/bluebottle/pkg/masterkey" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/spinifex/domains/ochre" ochrevector "github.com/mulgadc/spinifex/spinifex/domains/ochre/vector" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" gateway_bedrock "github.com/mulgadc/spinifex/spinifex/gateway/bedrock" - "github.com/mulgadc/spinifex/spinifex/network/host" "github.com/mulgadc/spinifex/spinifex/providers/objectstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/daemon/public_pools_test.go b/spinifex/daemon/public_pools_test.go index 888c90ac8..441c781d2 100644 --- a/spinifex/daemon/public_pools_test.go +++ b/spinifex/daemon/public_pools_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/mulgadc/spinifex/spinifex/bootstrap/config" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/stretchr/testify/assert" ) diff --git a/spinifex/daemon/vm_adapters.go b/spinifex/daemon/vm_adapters.go index c2ff8c492..46cd66431 100644 --- a/spinifex/daemon/vm_adapters.go +++ b/spinifex/daemon/vm_adapters.go @@ -12,12 +12,12 @@ import ( "github.com/mulgadc/spinifex/contracts/ec2/v1" viperblocklegacyv1 "github.com/mulgadc/spinifex/contracts/viperblockd/legacy/v1" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/foundation/aws/tags" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" handlers_ec2_placementgroup "github.com/mulgadc/spinifex/spinifex/handlers/ec2/placementgroup" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/providers/objectstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/gpu" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" diff --git a/spinifex/domains/dns/reconcile.go b/spinifex/domains/dns/reconcile.go index 503e031e3..e1b5c4bd7 100644 --- a/spinifex/domains/dns/reconcile.go +++ b/spinifex/domains/dns/reconcile.go @@ -9,8 +9,8 @@ import ( nsconfig "github.com/mulgadc/northstar/pkg/config" "github.com/mulgadc/spinifex/spinifex/bootstrap/config" + reconcilelock "github.com/mulgadc/spinifex/spinifex/domains/network/reconcile" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/reconciler" - reconcilelock "github.com/mulgadc/spinifex/spinifex/network/reconcile" "github.com/nats-io/nats.go" ) diff --git a/spinifex/domains/dns/reconcile_election_test.go b/spinifex/domains/dns/reconcile_election_test.go index 9163d20df..d6330d825 100644 --- a/spinifex/domains/dns/reconcile_election_test.go +++ b/spinifex/domains/dns/reconcile_election_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/mulgadc/spinifex/internal/testkit" - reconcilelock "github.com/mulgadc/spinifex/spinifex/network/reconcile" + reconcilelock "github.com/mulgadc/spinifex/spinifex/domains/network/reconcile" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/domains/dns/reconcile_test.go b/spinifex/domains/dns/reconcile_test.go index 0bcf04612..335e53b5c 100644 --- a/spinifex/domains/dns/reconcile_test.go +++ b/spinifex/domains/dns/reconcile_test.go @@ -8,9 +8,9 @@ import ( nsconfig "github.com/mulgadc/northstar/pkg/config" "github.com/mulgadc/spinifex/internal/testkit" + reconcilelock "github.com/mulgadc/spinifex/spinifex/domains/network/reconcile" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/reconciler" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" - reconcilelock "github.com/mulgadc/spinifex/spinifex/network/reconcile" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/network/external/allocator.go b/spinifex/domains/network/external/allocator.go similarity index 100% rename from spinifex/network/external/allocator.go rename to spinifex/domains/network/external/allocator.go diff --git a/spinifex/network/external/dhcp/acquire_budget_internal_test.go b/spinifex/domains/network/external/dhcp/acquire_budget_internal_test.go similarity index 100% rename from spinifex/network/external/dhcp/acquire_budget_internal_test.go rename to spinifex/domains/network/external/dhcp/acquire_budget_internal_test.go diff --git a/spinifex/network/external/dhcp/client.go b/spinifex/domains/network/external/dhcp/client.go similarity index 100% rename from spinifex/network/external/dhcp/client.go rename to spinifex/domains/network/external/dhcp/client.go diff --git a/spinifex/network/external/dhcp/client_test.go b/spinifex/domains/network/external/dhcp/client_test.go similarity index 98% rename from spinifex/network/external/dhcp/client_test.go rename to spinifex/domains/network/external/dhcp/client_test.go index 6c67ead6e..3180494ac 100644 --- a/spinifex/network/external/dhcp/client_test.go +++ b/spinifex/domains/network/external/dhcp/client_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" ) func TestLeaseTimers(t *testing.T) { diff --git a/spinifex/network/external/dhcp/errors.go b/spinifex/domains/network/external/dhcp/errors.go similarity index 100% rename from spinifex/network/external/dhcp/errors.go rename to spinifex/domains/network/external/dhcp/errors.go diff --git a/spinifex/network/external/dhcp/fake.go b/spinifex/domains/network/external/dhcp/fake.go similarity index 100% rename from spinifex/network/external/dhcp/fake.go rename to spinifex/domains/network/external/dhcp/fake.go diff --git a/spinifex/network/external/dhcp/iface_mac_test.go b/spinifex/domains/network/external/dhcp/iface_mac_test.go similarity index 97% rename from spinifex/network/external/dhcp/iface_mac_test.go rename to spinifex/domains/network/external/dhcp/iface_mac_test.go index 2cebfccda..57f7a0f0a 100644 --- a/spinifex/network/external/dhcp/iface_mac_test.go +++ b/spinifex/domains/network/external/dhcp/iface_mac_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" "github.com/stretchr/testify/assert" diff --git a/spinifex/network/external/dhcp/kv.go b/spinifex/domains/network/external/dhcp/kv.go similarity index 100% rename from spinifex/network/external/dhcp/kv.go rename to spinifex/domains/network/external/dhcp/kv.go diff --git a/spinifex/network/external/dhcp/kv_test.go b/spinifex/domains/network/external/dhcp/kv_test.go similarity index 98% rename from spinifex/network/external/dhcp/kv_test.go rename to spinifex/domains/network/external/dhcp/kv_test.go index 9377ffbcd..a2a3038d8 100644 --- a/spinifex/network/external/dhcp/kv_test.go +++ b/spinifex/domains/network/external/dhcp/kv_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/nats-io/nats.go/jetstream" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/network/external/dhcp/lrp_allocator.go b/spinifex/domains/network/external/dhcp/lrp_allocator.go similarity index 98% rename from spinifex/network/external/dhcp/lrp_allocator.go rename to spinifex/domains/network/external/dhcp/lrp_allocator.go index 9dd380c98..e2f859bd3 100644 --- a/spinifex/network/external/dhcp/lrp_allocator.go +++ b/spinifex/domains/network/external/dhcp/lrp_allocator.go @@ -6,7 +6,7 @@ import ( "fmt" "net" - "github.com/mulgadc/spinifex/spinifex/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" ) // Purpose tags written to the per-AZ lease bucket so operators can diff --git a/spinifex/network/external/dhcp/lrp_allocator_test.go b/spinifex/domains/network/external/dhcp/lrp_allocator_test.go similarity index 97% rename from spinifex/network/external/dhcp/lrp_allocator_test.go rename to spinifex/domains/network/external/dhcp/lrp_allocator_test.go index 4b7b74c1e..1ccdf10df 100644 --- a/spinifex/network/external/dhcp/lrp_allocator_test.go +++ b/spinifex/domains/network/external/dhcp/lrp_allocator_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/network/external/dhcp/manager.go b/spinifex/domains/network/external/dhcp/manager.go similarity index 100% rename from spinifex/network/external/dhcp/manager.go rename to spinifex/domains/network/external/dhcp/manager.go diff --git a/spinifex/network/external/dhcp/manager_test.go b/spinifex/domains/network/external/dhcp/manager_test.go similarity index 99% rename from spinifex/network/external/dhcp/manager_test.go rename to spinifex/domains/network/external/dhcp/manager_test.go index a450713df..32c182c31 100644 --- a/spinifex/network/external/dhcp/manager_test.go +++ b/spinifex/domains/network/external/dhcp/manager_test.go @@ -15,7 +15,7 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" "github.com/stretchr/testify/assert" diff --git a/spinifex/network/external/dhcp/nats_client.go b/spinifex/domains/network/external/dhcp/nats_client.go similarity index 100% rename from spinifex/network/external/dhcp/nats_client.go rename to spinifex/domains/network/external/dhcp/nats_client.go diff --git a/spinifex/network/external/dhcp/nclient4.go b/spinifex/domains/network/external/dhcp/nclient4.go similarity index 99% rename from spinifex/network/external/dhcp/nclient4.go rename to spinifex/domains/network/external/dhcp/nclient4.go index 126defbea..52af68b9e 100644 --- a/spinifex/network/external/dhcp/nclient4.go +++ b/spinifex/domains/network/external/dhcp/nclient4.go @@ -9,7 +9,7 @@ import ( "github.com/insomniacslk/dhcp/dhcpv4" "github.com/insomniacslk/dhcp/dhcpv4/nclient4" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" ) // NClient4Client is the production DHCP client (AF_PACKET per call, no diff --git a/spinifex/network/external/dhcp/nclient4_internal_test.go b/spinifex/domains/network/external/dhcp/nclient4_internal_test.go similarity index 100% rename from spinifex/network/external/dhcp/nclient4_internal_test.go rename to spinifex/domains/network/external/dhcp/nclient4_internal_test.go diff --git a/spinifex/network/external/dhcp/pool_allocator.go b/spinifex/domains/network/external/dhcp/pool_allocator.go similarity index 98% rename from spinifex/network/external/dhcp/pool_allocator.go rename to spinifex/domains/network/external/dhcp/pool_allocator.go index 91068c7b6..b3ec3e294 100644 --- a/spinifex/network/external/dhcp/pool_allocator.go +++ b/spinifex/domains/network/external/dhcp/pool_allocator.go @@ -8,7 +8,7 @@ import ( "net/netip" "sync" - "github.com/mulgadc/spinifex/spinifex/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" ) // DHCPPoolAllocator implements external.Allocator for a DHCP-sourced pool, diff --git a/spinifex/network/external/dhcp/pool_allocator_test.go b/spinifex/domains/network/external/dhcp/pool_allocator_test.go similarity index 97% rename from spinifex/network/external/dhcp/pool_allocator_test.go rename to spinifex/domains/network/external/dhcp/pool_allocator_test.go index 8aff2e783..d4e99b07b 100644 --- a/spinifex/network/external/dhcp/pool_allocator_test.go +++ b/spinifex/domains/network/external/dhcp/pool_allocator_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/network/external/dhcp/promisc.go b/spinifex/domains/network/external/dhcp/promisc.go similarity index 100% rename from spinifex/network/external/dhcp/promisc.go rename to spinifex/domains/network/external/dhcp/promisc.go diff --git a/spinifex/network/external/dhcp/promisc_test.go b/spinifex/domains/network/external/dhcp/promisc_test.go similarity index 100% rename from spinifex/network/external/dhcp/promisc_test.go rename to spinifex/domains/network/external/dhcp/promisc_test.go diff --git a/spinifex/network/external/dhcp/reaper.go b/spinifex/domains/network/external/dhcp/reaper.go similarity index 100% rename from spinifex/network/external/dhcp/reaper.go rename to spinifex/domains/network/external/dhcp/reaper.go diff --git a/spinifex/network/external/dhcp/reaper_test.go b/spinifex/domains/network/external/dhcp/reaper_test.go similarity index 98% rename from spinifex/network/external/dhcp/reaper_test.go rename to spinifex/domains/network/external/dhcp/reaper_test.go index b3c325f97..2280ecea1 100644 --- a/spinifex/network/external/dhcp/reaper_test.go +++ b/spinifex/domains/network/external/dhcp/reaper_test.go @@ -6,7 +6,7 @@ import ( "sync" "testing" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/network/external/dhcp/release_scope_test.go b/spinifex/domains/network/external/dhcp/release_scope_test.go similarity index 97% rename from spinifex/network/external/dhcp/release_scope_test.go rename to spinifex/domains/network/external/dhcp/release_scope_test.go index e05e86357..6adbff6a0 100644 --- a/spinifex/network/external/dhcp/release_scope_test.go +++ b/spinifex/domains/network/external/dhcp/release_scope_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/network/external/dhcp/wire.go b/spinifex/domains/network/external/dhcp/wire.go similarity index 100% rename from spinifex/network/external/dhcp/wire.go rename to spinifex/domains/network/external/dhcp/wire.go diff --git a/spinifex/network/external/eip.go b/spinifex/domains/network/external/eip.go similarity index 95% rename from spinifex/network/external/eip.go rename to spinifex/domains/network/external/eip.go index 709ddaa1b..6c89fb8b7 100644 --- a/spinifex/network/external/eip.go +++ b/spinifex/domains/network/external/eip.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // EIPManager attaches/detaches EIP NAT rules. Thin L5 wrapper over policy.NATManager diff --git a/spinifex/network/external/eip_release_guard_test.go b/spinifex/domains/network/external/eip_release_guard_test.go similarity index 100% rename from spinifex/network/external/eip_release_guard_test.go rename to spinifex/domains/network/external/eip_release_guard_test.go diff --git a/spinifex/network/external/eip_test.go b/spinifex/domains/network/external/eip_test.go similarity index 87% rename from spinifex/network/external/eip_test.go rename to spinifex/domains/network/external/eip_test.go index 751d79bb5..a8ff47af6 100644 --- a/spinifex/network/external/eip_test.go +++ b/spinifex/domains/network/external/eip_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) func TestNewEIPManager_RejectsNilNAT(t *testing.T) { diff --git a/spinifex/network/external/exonet/allocator.go b/spinifex/domains/network/external/exonet/allocator.go similarity index 99% rename from spinifex/network/external/exonet/allocator.go rename to spinifex/domains/network/external/exonet/allocator.go index 58ca851d7..80776dbc6 100644 --- a/spinifex/network/external/exonet/allocator.go +++ b/spinifex/domains/network/external/exonet/allocator.go @@ -20,9 +20,9 @@ import ( "net/netip" "strings" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" - "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/mulgadc/spinifex/spinifex/providers/cloud/exoscale" ) diff --git a/spinifex/network/external/exonet/allocator_test.go b/spinifex/domains/network/external/exonet/allocator_test.go similarity index 99% rename from spinifex/network/external/exonet/allocator_test.go rename to spinifex/domains/network/external/exonet/allocator_test.go index 791a42489..be4d5453a 100644 --- a/spinifex/network/external/exonet/allocator_test.go +++ b/spinifex/domains/network/external/exonet/allocator_test.go @@ -12,9 +12,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" - "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/mulgadc/spinifex/spinifex/providers/cloud/exoscale" ) diff --git a/spinifex/network/external/exonet/reconcile.go b/spinifex/domains/network/external/exonet/reconcile.go similarity index 100% rename from spinifex/network/external/exonet/reconcile.go rename to spinifex/domains/network/external/exonet/reconcile.go diff --git a/spinifex/network/external/exonet/store.go b/spinifex/domains/network/external/exonet/store.go similarity index 100% rename from spinifex/network/external/exonet/store.go rename to spinifex/domains/network/external/exonet/store.go diff --git a/spinifex/network/external/exonet/store_test.go b/spinifex/domains/network/external/exonet/store_test.go similarity index 97% rename from spinifex/network/external/exonet/store_test.go rename to spinifex/domains/network/external/exonet/store_test.go index 2379a037a..fc09f9d44 100644 --- a/spinifex/network/external/exonet/store_test.go +++ b/spinifex/domains/network/external/exonet/store_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/require" "github.com/mulgadc/spinifex/internal/testkit" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" - "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/mulgadc/spinifex/spinifex/providers/cloud/exoscale" ) diff --git a/spinifex/network/external/exonet/wiring.go b/spinifex/domains/network/external/exonet/wiring.go similarity index 95% rename from spinifex/network/external/exonet/wiring.go rename to spinifex/domains/network/external/exonet/wiring.go index 50f99af4b..814d6d1ff 100644 --- a/spinifex/network/external/exonet/wiring.go +++ b/spinifex/domains/network/external/exonet/wiring.go @@ -7,7 +7,7 @@ import ( "github.com/nats-io/nats.go/jetstream" - "github.com/mulgadc/spinifex/spinifex/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/providers/cloud/exoscale" ) diff --git a/spinifex/network/external/external.go b/spinifex/domains/network/external/external.go similarity index 100% rename from spinifex/network/external/external.go rename to spinifex/domains/network/external/external.go diff --git a/spinifex/network/external/helpers.go b/spinifex/domains/network/external/helpers.go similarity index 100% rename from spinifex/network/external/helpers.go rename to spinifex/domains/network/external/helpers.go diff --git a/spinifex/network/external/igw.go b/spinifex/domains/network/external/igw.go similarity index 98% rename from spinifex/network/external/igw.go rename to spinifex/domains/network/external/igw.go index a9c6833ab..f90d04101 100644 --- a/spinifex/network/external/igw.go +++ b/spinifex/domains/network/external/igw.go @@ -7,11 +7,11 @@ import ( "log/slog" "net/netip" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // FlowsBarrier blocks until ovn-northd compiles NB→SB and chassis install flows. diff --git a/spinifex/network/external/igw_routed_test.go b/spinifex/domains/network/external/igw_routed_test.go similarity index 96% rename from spinifex/network/external/igw_routed_test.go rename to spinifex/domains/network/external/igw_routed_test.go index 43c0f69ea..d4fd825bf 100644 --- a/spinifex/network/external/igw_routed_test.go +++ b/spinifex/domains/network/external/igw_routed_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/network/external/igw_test.go b/spinifex/domains/network/external/igw_test.go similarity index 99% rename from spinifex/network/external/igw_test.go rename to spinifex/domains/network/external/igw_test.go index a81a39c0f..6ea6b0eee 100644 --- a/spinifex/network/external/igw_test.go +++ b/spinifex/domains/network/external/igw_test.go @@ -9,10 +9,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) func seedVPCRouter(t *testing.T, m *mock.Client, vpcID, cidr string) { diff --git a/spinifex/network/external/invariants_test.go b/spinifex/domains/network/external/invariants_test.go similarity index 91% rename from spinifex/network/external/invariants_test.go rename to spinifex/domains/network/external/invariants_test.go index 841325cb2..17d34c446 100644 --- a/spinifex/network/external/invariants_test.go +++ b/spinifex/domains/network/external/invariants_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // TestI4_SubnetEgressRerouteMustExcludeLinkLocal asserts every per-subnet diff --git a/spinifex/network/external/natgw.go b/spinifex/domains/network/external/natgw.go similarity index 94% rename from spinifex/network/external/natgw.go rename to spinifex/domains/network/external/natgw.go index edeb398ed..4c7fc7a94 100644 --- a/spinifex/network/external/natgw.go +++ b/spinifex/domains/network/external/natgw.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // NATGWManager attaches/detaches NAT Gateway SNAT rules. Thin L5 wrapper diff --git a/spinifex/network/external/natgw_test.go b/spinifex/domains/network/external/natgw_test.go similarity index 83% rename from spinifex/network/external/natgw_test.go rename to spinifex/domains/network/external/natgw_test.go index 2f9582c2e..21539b24a 100644 --- a/spinifex/network/external/natgw_test.go +++ b/spinifex/domains/network/external/natgw_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) func TestNewNATGWManager_RejectsNilNAT(t *testing.T) { diff --git a/spinifex/network/external/ocinet/affinity.go b/spinifex/domains/network/external/ocinet/affinity.go similarity index 99% rename from spinifex/network/external/ocinet/affinity.go rename to spinifex/domains/network/external/ocinet/affinity.go index b72a2b9a9..8446c32e5 100644 --- a/spinifex/network/external/ocinet/affinity.go +++ b/spinifex/domains/network/external/ocinet/affinity.go @@ -6,8 +6,8 @@ import ( "fmt" "log/slog" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" - "github.com/mulgadc/spinifex/spinifex/network/topology" ) // ClaimResult reports what an affinity pass moved, so a caller can log it and a diff --git a/spinifex/network/external/ocinet/affinity_test.go b/spinifex/domains/network/external/ocinet/affinity_test.go similarity index 99% rename from spinifex/network/external/ocinet/affinity_test.go rename to spinifex/domains/network/external/ocinet/affinity_test.go index d474fc424..b94c8761e 100644 --- a/spinifex/network/external/ocinet/affinity_test.go +++ b/spinifex/domains/network/external/ocinet/affinity_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/ocinet" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" ) diff --git a/spinifex/network/external/ocinet/allocator.go b/spinifex/domains/network/external/ocinet/allocator.go similarity index 99% rename from spinifex/network/external/ocinet/allocator.go rename to spinifex/domains/network/external/ocinet/allocator.go index 9b2f14d5c..e9a2f553d 100644 --- a/spinifex/network/external/ocinet/allocator.go +++ b/spinifex/domains/network/external/ocinet/allocator.go @@ -31,9 +31,9 @@ import ( "net/netip" "time" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" - "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" ) diff --git a/spinifex/network/external/ocinet/allocator_test.go b/spinifex/domains/network/external/ocinet/allocator_test.go similarity index 98% rename from spinifex/network/external/ocinet/allocator_test.go rename to spinifex/domains/network/external/ocinet/allocator_test.go index f991f223a..571d4e0db 100644 --- a/spinifex/network/external/ocinet/allocator_test.go +++ b/spinifex/domains/network/external/ocinet/allocator_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/ocinet" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" ) diff --git a/spinifex/network/external/ocinet/lookup.go b/spinifex/domains/network/external/ocinet/lookup.go similarity index 100% rename from spinifex/network/external/ocinet/lookup.go rename to spinifex/domains/network/external/ocinet/lookup.go diff --git a/spinifex/network/external/ocinet/lookup_test.go b/spinifex/domains/network/external/ocinet/lookup_test.go similarity index 98% rename from spinifex/network/external/ocinet/lookup_test.go rename to spinifex/domains/network/external/ocinet/lookup_test.go index 1ed0b8797..f4aafa50e 100644 --- a/spinifex/network/external/ocinet/lookup_test.go +++ b/spinifex/domains/network/external/ocinet/lookup_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/ocinet" ) func seedBinding(t *testing.T, s *ocinet.MemStore, pool, public, private string) { diff --git a/spinifex/network/external/ocinet/owner_test.go b/spinifex/domains/network/external/ocinet/owner_test.go similarity index 97% rename from spinifex/network/external/ocinet/owner_test.go rename to spinifex/domains/network/external/ocinet/owner_test.go index c6204cc84..cde7bfe87 100644 --- a/spinifex/network/external/ocinet/owner_test.go +++ b/spinifex/domains/network/external/ocinet/owner_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/ocinet" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" ) diff --git a/spinifex/network/external/ocinet/reconcile.go b/spinifex/domains/network/external/ocinet/reconcile.go similarity index 100% rename from spinifex/network/external/ocinet/reconcile.go rename to spinifex/domains/network/external/ocinet/reconcile.go diff --git a/spinifex/network/external/ocinet/reconcile_test.go b/spinifex/domains/network/external/ocinet/reconcile_test.go similarity index 98% rename from spinifex/network/external/ocinet/reconcile_test.go rename to spinifex/domains/network/external/ocinet/reconcile_test.go index 77562d8cc..abb3fad29 100644 --- a/spinifex/network/external/ocinet/reconcile_test.go +++ b/spinifex/domains/network/external/ocinet/reconcile_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/ocinet" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" ) diff --git a/spinifex/network/external/ocinet/store.go b/spinifex/domains/network/external/ocinet/store.go similarity index 100% rename from spinifex/network/external/ocinet/store.go rename to spinifex/domains/network/external/ocinet/store.go diff --git a/spinifex/network/external/ocinet/wiring.go b/spinifex/domains/network/external/ocinet/wiring.go similarity index 95% rename from spinifex/network/external/ocinet/wiring.go rename to spinifex/domains/network/external/ocinet/wiring.go index 0bf0cf697..bfcdb84a3 100644 --- a/spinifex/network/external/ocinet/wiring.go +++ b/spinifex/domains/network/external/ocinet/wiring.go @@ -7,9 +7,9 @@ import ( "github.com/nats-io/nats.go/jetstream" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/host" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" ) diff --git a/spinifex/network/external/pool.go b/spinifex/domains/network/external/pool.go similarity index 96% rename from spinifex/network/external/pool.go rename to spinifex/domains/network/external/pool.go index f53849be1..462dced7a 100644 --- a/spinifex/network/external/pool.go +++ b/spinifex/domains/network/external/pool.go @@ -6,9 +6,9 @@ import ( "log/slog" "net" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // linkLocalGatewayNetwork is the link-local /30 for the IGW gateway LRP in diff --git a/spinifex/network/external/pool_test.go b/spinifex/domains/network/external/pool_test.go similarity index 96% rename from spinifex/network/external/pool_test.go rename to spinifex/domains/network/external/pool_test.go index 339f64e6a..91c4c0489 100644 --- a/spinifex/network/external/pool_test.go +++ b/spinifex/domains/network/external/pool_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) func TestFindPool_AZBeatsRegionBeatsUnscoped(t *testing.T) { diff --git a/spinifex/network/external/static_pool.go b/spinifex/domains/network/external/static_pool.go similarity index 100% rename from spinifex/network/external/static_pool.go rename to spinifex/domains/network/external/static_pool.go diff --git a/spinifex/network/external/static_pool_test.go b/spinifex/domains/network/external/static_pool_test.go similarity index 100% rename from spinifex/network/external/static_pool_test.go rename to spinifex/domains/network/external/static_pool_test.go diff --git a/spinifex/network/external/types.go b/spinifex/domains/network/external/types.go similarity index 100% rename from spinifex/network/external/types.go rename to spinifex/domains/network/external/types.go diff --git a/spinifex/network/host/bridge_ip.go b/spinifex/domains/network/host/bridge_ip.go similarity index 100% rename from spinifex/network/host/bridge_ip.go rename to spinifex/domains/network/host/bridge_ip.go diff --git a/spinifex/network/host/bridge_ip_test.go b/spinifex/domains/network/host/bridge_ip_test.go similarity index 100% rename from spinifex/network/host/bridge_ip_test.go rename to spinifex/domains/network/host/bridge_ip_test.go diff --git a/spinifex/network/host/bridges.go b/spinifex/domains/network/host/bridges.go similarity index 100% rename from spinifex/network/host/bridges.go rename to spinifex/domains/network/host/bridges.go diff --git a/spinifex/network/host/eip_ingress.go b/spinifex/domains/network/host/eip_ingress.go similarity index 100% rename from spinifex/network/host/eip_ingress.go rename to spinifex/domains/network/host/eip_ingress.go diff --git a/spinifex/network/host/eip_ingress_test.go b/spinifex/domains/network/host/eip_ingress_test.go similarity index 100% rename from spinifex/network/host/eip_ingress_test.go rename to spinifex/domains/network/host/eip_ingress_test.go diff --git a/spinifex/network/host/eip_source_route.go b/spinifex/domains/network/host/eip_source_route.go similarity index 100% rename from spinifex/network/host/eip_source_route.go rename to spinifex/domains/network/host/eip_source_route.go diff --git a/spinifex/network/host/eip_source_route_test.go b/spinifex/domains/network/host/eip_source_route_test.go similarity index 100% rename from spinifex/network/host/eip_source_route_test.go rename to spinifex/domains/network/host/eip_source_route_test.go diff --git a/spinifex/network/host/firewall.go b/spinifex/domains/network/host/firewall.go similarity index 100% rename from spinifex/network/host/firewall.go rename to spinifex/domains/network/host/firewall.go diff --git a/spinifex/network/host/firewall_test.go b/spinifex/domains/network/host/firewall_test.go similarity index 100% rename from spinifex/network/host/firewall_test.go rename to spinifex/domains/network/host/firewall_test.go diff --git a/spinifex/network/host/gateway_claim.go b/spinifex/domains/network/host/gateway_claim.go similarity index 100% rename from spinifex/network/host/gateway_claim.go rename to spinifex/domains/network/host/gateway_claim.go diff --git a/spinifex/network/host/gateway_claim_test.go b/spinifex/domains/network/host/gateway_claim_test.go similarity index 100% rename from spinifex/network/host/gateway_claim_test.go rename to spinifex/domains/network/host/gateway_claim_test.go diff --git a/spinifex/network/host/health.go b/spinifex/domains/network/host/health.go similarity index 100% rename from spinifex/network/host/health.go rename to spinifex/domains/network/host/health.go diff --git a/spinifex/network/host/health_test.go b/spinifex/domains/network/host/health_test.go similarity index 100% rename from spinifex/network/host/health_test.go rename to spinifex/domains/network/host/health_test.go diff --git a/spinifex/network/host/host.go b/spinifex/domains/network/host/host.go similarity index 100% rename from spinifex/network/host/host.go rename to spinifex/domains/network/host/host.go diff --git a/spinifex/network/host/host_test.go b/spinifex/domains/network/host/host_test.go similarity index 100% rename from spinifex/network/host/host_test.go rename to spinifex/domains/network/host/host_test.go diff --git a/spinifex/network/host/imds_attach.go b/spinifex/domains/network/host/imds_attach.go similarity index 98% rename from spinifex/network/host/imds_attach.go rename to spinifex/domains/network/host/imds_attach.go index 14e65a1ef..615dc61c8 100644 --- a/spinifex/network/host/imds_attach.go +++ b/spinifex/domains/network/host/imds_attach.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" ) diff --git a/spinifex/network/host/imds_attach_test.go b/spinifex/domains/network/host/imds_attach_test.go similarity index 99% rename from spinifex/network/host/imds_attach_test.go rename to spinifex/domains/network/host/imds_attach_test.go index a63651c5c..682f10812 100644 --- a/spinifex/network/host/imds_attach_test.go +++ b/spinifex/domains/network/host/imds_attach_test.go @@ -7,7 +7,7 @@ import ( "strconv" "testing" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" hostcommand "github.com/mulgadc/spinifex/spinifex/runtime/host/command" ) diff --git a/spinifex/network/host/imds_bridge.go b/spinifex/domains/network/host/imds_bridge.go similarity index 100% rename from spinifex/network/host/imds_bridge.go rename to spinifex/domains/network/host/imds_bridge.go diff --git a/spinifex/network/host/imds_bridge_test.go b/spinifex/domains/network/host/imds_bridge_test.go similarity index 100% rename from spinifex/network/host/imds_bridge_test.go rename to spinifex/domains/network/host/imds_bridge_test.go diff --git a/spinifex/network/host/imds_datapath.go b/spinifex/domains/network/host/imds_datapath.go similarity index 99% rename from spinifex/network/host/imds_datapath.go rename to spinifex/domains/network/host/imds_datapath.go index b1e279798..d91cf4814 100644 --- a/spinifex/network/host/imds_datapath.go +++ b/spinifex/domains/network/host/imds_datapath.go @@ -9,7 +9,7 @@ import ( "log/slog" "net" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" hostcommand "github.com/mulgadc/spinifex/spinifex/runtime/host/command" ) diff --git a/spinifex/network/host/imds_datapath_test.go b/spinifex/domains/network/host/imds_datapath_test.go similarity index 100% rename from spinifex/network/host/imds_datapath_test.go rename to spinifex/domains/network/host/imds_datapath_test.go diff --git a/spinifex/network/host/imds_netns_unit_test.go b/spinifex/domains/network/host/imds_netns_unit_test.go similarity index 99% rename from spinifex/network/host/imds_netns_unit_test.go rename to spinifex/domains/network/host/imds_netns_unit_test.go index 113c59ea0..ec3cc6462 100644 --- a/spinifex/network/host/imds_netns_unit_test.go +++ b/spinifex/domains/network/host/imds_netns_unit_test.go @@ -16,7 +16,7 @@ func repoRoot(t *testing.T) string { if !ok { t.Fatal("runtime.Caller failed") } - root := filepath.Clean(filepath.Join(filepath.Dir(file), "..", "..", "..")) + root := filepath.Clean(filepath.Join(filepath.Dir(file), "..", "..", "..", "..")) if _, err := os.Stat(filepath.Join(root, "build", "systemd")); err != nil { t.Fatalf("could not locate build/systemd from %s: %v", root, err) } diff --git a/spinifex/network/host/imds_patch.go b/spinifex/domains/network/host/imds_patch.go similarity index 100% rename from spinifex/network/host/imds_patch.go rename to spinifex/domains/network/host/imds_patch.go diff --git a/spinifex/network/host/imds_patch_test.go b/spinifex/domains/network/host/imds_patch_test.go similarity index 100% rename from spinifex/network/host/imds_patch_test.go rename to spinifex/domains/network/host/imds_patch_test.go diff --git a/spinifex/network/host/imds_reconcile.go b/spinifex/domains/network/host/imds_reconcile.go similarity index 100% rename from spinifex/network/host/imds_reconcile.go rename to spinifex/domains/network/host/imds_reconcile.go diff --git a/spinifex/network/host/imds_reconcile_test.go b/spinifex/domains/network/host/imds_reconcile_test.go similarity index 100% rename from spinifex/network/host/imds_reconcile_test.go rename to spinifex/domains/network/host/imds_reconcile_test.go diff --git a/spinifex/network/host/imds_reply.go b/spinifex/domains/network/host/imds_reply.go similarity index 100% rename from spinifex/network/host/imds_reply.go rename to spinifex/domains/network/host/imds_reply.go diff --git a/spinifex/network/host/imds_reply_test.go b/spinifex/domains/network/host/imds_reply_test.go similarity index 100% rename from spinifex/network/host/imds_reply_test.go rename to spinifex/domains/network/host/imds_reply_test.go diff --git a/spinifex/network/host/ipsec.go b/spinifex/domains/network/host/ipsec.go similarity index 100% rename from spinifex/network/host/ipsec.go rename to spinifex/domains/network/host/ipsec.go diff --git a/spinifex/network/host/ipsec_cert.go b/spinifex/domains/network/host/ipsec_cert.go similarity index 100% rename from spinifex/network/host/ipsec_cert.go rename to spinifex/domains/network/host/ipsec_cert.go diff --git a/spinifex/network/host/ipsec_cert_test.go b/spinifex/domains/network/host/ipsec_cert_test.go similarity index 100% rename from spinifex/network/host/ipsec_cert_test.go rename to spinifex/domains/network/host/ipsec_cert_test.go diff --git a/spinifex/network/host/ipsec_enable.go b/spinifex/domains/network/host/ipsec_enable.go similarity index 100% rename from spinifex/network/host/ipsec_enable.go rename to spinifex/domains/network/host/ipsec_enable.go diff --git a/spinifex/network/host/ipsec_enable_test.go b/spinifex/domains/network/host/ipsec_enable_test.go similarity index 100% rename from spinifex/network/host/ipsec_enable_test.go rename to spinifex/domains/network/host/ipsec_enable_test.go diff --git a/spinifex/network/host/mac_binding.go b/spinifex/domains/network/host/mac_binding.go similarity index 100% rename from spinifex/network/host/mac_binding.go rename to spinifex/domains/network/host/mac_binding.go diff --git a/spinifex/network/host/mac_binding_test.go b/spinifex/domains/network/host/mac_binding_test.go similarity index 100% rename from spinifex/network/host/mac_binding_test.go rename to spinifex/domains/network/host/mac_binding_test.go diff --git a/spinifex/network/host/natrules.go b/spinifex/domains/network/host/natrules.go similarity index 100% rename from spinifex/network/host/natrules.go rename to spinifex/domains/network/host/natrules.go diff --git a/spinifex/network/host/natrules_test.go b/spinifex/domains/network/host/natrules_test.go similarity index 100% rename from spinifex/network/host/natrules_test.go rename to spinifex/domains/network/host/natrules_test.go diff --git a/spinifex/network/host/neigh.go b/spinifex/domains/network/host/neigh.go similarity index 100% rename from spinifex/network/host/neigh.go rename to spinifex/domains/network/host/neigh.go diff --git a/spinifex/network/host/neigh_test.go b/spinifex/domains/network/host/neigh_test.go similarity index 100% rename from spinifex/network/host/neigh_test.go rename to spinifex/domains/network/host/neigh_test.go diff --git a/spinifex/network/host/ovn_raft.go b/spinifex/domains/network/host/ovn_raft.go similarity index 100% rename from spinifex/network/host/ovn_raft.go rename to spinifex/domains/network/host/ovn_raft.go diff --git a/spinifex/network/host/ovn_raft_test.go b/spinifex/domains/network/host/ovn_raft_test.go similarity index 100% rename from spinifex/network/host/ovn_raft_test.go rename to spinifex/domains/network/host/ovn_raft_test.go diff --git a/spinifex/network/host/ovs_local_port.go b/spinifex/domains/network/host/ovs_local_port.go similarity index 100% rename from spinifex/network/host/ovs_local_port.go rename to spinifex/domains/network/host/ovs_local_port.go diff --git a/spinifex/network/host/ovs_local_port_test.go b/spinifex/domains/network/host/ovs_local_port_test.go similarity index 100% rename from spinifex/network/host/ovs_local_port_test.go rename to spinifex/domains/network/host/ovs_local_port_test.go diff --git a/spinifex/network/host/physical.go b/spinifex/domains/network/host/physical.go similarity index 100% rename from spinifex/network/host/physical.go rename to spinifex/domains/network/host/physical.go diff --git a/spinifex/network/host/plumber.go b/spinifex/domains/network/host/plumber.go similarity index 100% rename from spinifex/network/host/plumber.go rename to spinifex/domains/network/host/plumber.go diff --git a/spinifex/network/host/plumber_test.go b/spinifex/domains/network/host/plumber_test.go similarity index 100% rename from spinifex/network/host/plumber_test.go rename to spinifex/domains/network/host/plumber_test.go diff --git a/spinifex/network/host/routed.go b/spinifex/domains/network/host/routed.go similarity index 100% rename from spinifex/network/host/routed.go rename to spinifex/domains/network/host/routed.go diff --git a/spinifex/network/host/routed_ingress.go b/spinifex/domains/network/host/routed_ingress.go similarity index 100% rename from spinifex/network/host/routed_ingress.go rename to spinifex/domains/network/host/routed_ingress.go diff --git a/spinifex/network/host/routed_ingress_test.go b/spinifex/domains/network/host/routed_ingress_test.go similarity index 100% rename from spinifex/network/host/routed_ingress_test.go rename to spinifex/domains/network/host/routed_ingress_test.go diff --git a/spinifex/network/host/routed_test.go b/spinifex/domains/network/host/routed_test.go similarity index 100% rename from spinifex/network/host/routed_test.go rename to spinifex/domains/network/host/routed_test.go diff --git a/spinifex/network/host/run.go b/spinifex/domains/network/host/run.go similarity index 100% rename from spinifex/network/host/run.go rename to spinifex/domains/network/host/run.go diff --git a/spinifex/network/host/run_test.go b/spinifex/domains/network/host/run_test.go similarity index 100% rename from spinifex/network/host/run_test.go rename to spinifex/domains/network/host/run_test.go diff --git a/spinifex/network/host/veth.go b/spinifex/domains/network/host/veth.go similarity index 100% rename from spinifex/network/host/veth.go rename to spinifex/domains/network/host/veth.go diff --git a/spinifex/network/host/vpc_hostport.go b/spinifex/domains/network/host/vpc_hostport.go similarity index 100% rename from spinifex/network/host/vpc_hostport.go rename to spinifex/domains/network/host/vpc_hostport.go diff --git a/spinifex/network/host/vpc_hostport_test.go b/spinifex/domains/network/host/vpc_hostport_test.go similarity index 100% rename from spinifex/network/host/vpc_hostport_test.go rename to spinifex/domains/network/host/vpc_hostport_test.go diff --git a/spinifex/network/identifiers/mac.go b/spinifex/domains/network/identifiers/mac.go similarity index 100% rename from spinifex/network/identifiers/mac.go rename to spinifex/domains/network/identifiers/mac.go diff --git a/spinifex/network/identifiers/mac_test.go b/spinifex/domains/network/identifiers/mac_test.go similarity index 100% rename from spinifex/network/identifiers/mac_test.go rename to spinifex/domains/network/identifiers/mac_test.go diff --git a/spinifex/network/invariants/doc.go b/spinifex/domains/network/invariants/doc.go similarity index 87% rename from spinifex/network/invariants/doc.go rename to spinifex/domains/network/invariants/doc.go index 96237bd1a..f5def31fe 100644 --- a/spinifex/network/invariants/doc.go +++ b/spinifex/domains/network/invariants/doc.go @@ -7,6 +7,6 @@ // path leads back to the contract, not to the test author. // // The package contains no production code; it exists solely so `go test -// ./spinifex/network/invariants/...` runs the suite without polluting any +// ./spinifex/domains/network/invariants/...` runs the suite without polluting any // layer's own package. package invariants diff --git a/spinifex/network/invariants/federation_isolation_test.go b/spinifex/domains/network/invariants/federation_isolation_test.go similarity index 98% rename from spinifex/network/invariants/federation_isolation_test.go rename to spinifex/domains/network/invariants/federation_isolation_test.go index 38ad1a32c..22738ca53 100644 --- a/spinifex/network/invariants/federation_isolation_test.go +++ b/spinifex/domains/network/invariants/federation_isolation_test.go @@ -33,7 +33,7 @@ func TestS6_FederationIsolated(t *testing.T) { } roots := []string{ - filepath.Join(repoRoot(t), "spinifex", "network"), + filepath.Join(repoRoot(t), "spinifex", "domains", "network"), filepath.Join(repoRoot(t), "spinifex", "daemon"), filepath.Join(repoRoot(t), "spinifex", "handlers"), } diff --git a/spinifex/network/invariants/host_containment_test.go b/spinifex/domains/network/invariants/host_containment_test.go similarity index 98% rename from spinifex/network/invariants/host_containment_test.go rename to spinifex/domains/network/invariants/host_containment_test.go index e5bdb674d..a9a57a014 100644 --- a/spinifex/network/invariants/host_containment_test.go +++ b/spinifex/domains/network/invariants/host_containment_test.go @@ -31,7 +31,7 @@ func TestS2_BridgeModeContainedInL0(t *testing.T) { } roots := []string{ - filepath.Join(repoRoot(t), "spinifex", "network"), + filepath.Join(repoRoot(t), "spinifex", "domains", "network"), filepath.Join(repoRoot(t), "spinifex", "daemon"), filepath.Join(repoRoot(t), "spinifex", "runtime", "compute", "vm"), } diff --git a/spinifex/network/invariants/ipsec_test.go b/spinifex/domains/network/invariants/ipsec_test.go similarity index 100% rename from spinifex/network/invariants/ipsec_test.go rename to spinifex/domains/network/invariants/ipsec_test.go diff --git a/spinifex/network/invariants/layers_classify_test.go b/spinifex/domains/network/invariants/layers_classify_test.go similarity index 100% rename from spinifex/network/invariants/layers_classify_test.go rename to spinifex/domains/network/invariants/layers_classify_test.go diff --git a/spinifex/network/invariants/layers_test.go b/spinifex/domains/network/invariants/layers_test.go similarity index 98% rename from spinifex/network/invariants/layers_test.go rename to spinifex/domains/network/invariants/layers_test.go index ca314a7f7..3ad67406e 100644 --- a/spinifex/network/invariants/layers_test.go +++ b/spinifex/domains/network/invariants/layers_test.go @@ -148,7 +148,7 @@ func (k packageKind) rank() int { return -1 } -const networkRoot = "github.com/mulgadc/spinifex/spinifex/network" +const networkRoot = "github.com/mulgadc/spinifex/spinifex/domains/network" func layerOf(importPath string) packageKind { suffix := strings.TrimPrefix(importPath, networkRoot) diff --git a/spinifex/network/invariants/listener_bind_test.go b/spinifex/domains/network/invariants/listener_bind_test.go similarity index 100% rename from spinifex/network/invariants/listener_bind_test.go rename to spinifex/domains/network/invariants/listener_bind_test.go diff --git a/spinifex/network/invariants/names_test.go b/spinifex/domains/network/invariants/names_test.go similarity index 97% rename from spinifex/network/invariants/names_test.go rename to spinifex/domains/network/invariants/names_test.go index d742dd14c..3d97075ca 100644 --- a/spinifex/network/invariants/names_test.go +++ b/spinifex/domains/network/invariants/names_test.go @@ -151,7 +151,7 @@ func TestS4_OVNNamesL2Owned(t *testing.T) { b.WriteString(strconv.Quote(h.lit)) b.WriteString("\n") } - b.WriteString(" Fix: add a helper to spinifex/network/topology/names.go ") + b.WriteString(" Fix: add a helper to spinifex/domains/network/topology/names.go ") b.WriteString("and call it from the offending site. Do not construct OVN ") b.WriteString("object names outside L2.\n") if len(hits) > limit { @@ -245,7 +245,7 @@ func s4ScanRoots(t *testing.T) []string { t.Helper() root := repoRoot(t) return []string{ - filepath.Join(root, "spinifex", "network"), + filepath.Join(root, "spinifex", "domains", "network"), filepath.Join(root, "spinifex", "vpcd"), filepath.Join(root, "spinifex", "daemon"), filepath.Join(root, "spinifex", "handlers"), diff --git a/spinifex/network/invariants/names_unit_test.go b/spinifex/domains/network/invariants/names_unit_test.go similarity index 100% rename from spinifex/network/invariants/names_unit_test.go rename to spinifex/domains/network/invariants/names_unit_test.go diff --git a/spinifex/network/invariants/nat_mode_test.go b/spinifex/domains/network/invariants/nat_mode_test.go similarity index 98% rename from spinifex/network/invariants/nat_mode_test.go rename to spinifex/domains/network/invariants/nat_mode_test.go index 191c956be..71c45fec1 100644 --- a/spinifex/network/invariants/nat_mode_test.go +++ b/spinifex/domains/network/invariants/nat_mode_test.go @@ -31,7 +31,7 @@ func TestS3_NATModeInitTimeConstant(t *testing.T) { var hits []hit roots := []string{ - filepath.Join(repoRoot(t), "spinifex", "network"), + filepath.Join(repoRoot(t), "spinifex", "domains", "network"), filepath.Join(repoRoot(t), "spinifex", "vpcd"), filepath.Join(repoRoot(t), "spinifex", "daemon"), } diff --git a/spinifex/network/invariants/nats_subjects_test.go b/spinifex/domains/network/invariants/nats_subjects_test.go similarity index 98% rename from spinifex/network/invariants/nats_subjects_test.go rename to spinifex/domains/network/invariants/nats_subjects_test.go index 1f18c538d..9389482a8 100644 --- a/spinifex/network/invariants/nats_subjects_test.go +++ b/spinifex/domains/network/invariants/nats_subjects_test.go @@ -31,7 +31,7 @@ func TestS7_NATSSubjectsCarryAZPrefix(t *testing.T) { subjectLike := regexp.MustCompile(`^vpc\.[a-zA-Z]`) roots := []string{ - filepath.Join(repoRoot(t), "spinifex", "network"), + filepath.Join(repoRoot(t), "spinifex", "domains", "network"), filepath.Join(repoRoot(t), "spinifex", "vpcd"), filepath.Join(repoRoot(t), "spinifex", "daemon"), filepath.Join(repoRoot(t), "spinifex", "handlers"), diff --git a/spinifex/network/invariants/ovn_named_create_test.go b/spinifex/domains/network/invariants/ovn_named_create_test.go similarity index 96% rename from spinifex/network/invariants/ovn_named_create_test.go rename to spinifex/domains/network/invariants/ovn_named_create_test.go index 31a29dea8..42f4ff833 100644 --- a/spinifex/network/invariants/ovn_named_create_test.go +++ b/spinifex/domains/network/invariants/ovn_named_create_test.go @@ -33,8 +33,8 @@ func TestS4_OVNNamedCreatesUseEnsure(t *testing.T) { root := filepath.Join(repoRoot(t), "spinifex") exemptDirs := map[string]struct{}{ - filepath.Join(root, "network", "ovn"): {}, - filepath.Join(root, "network", "invariants"): {}, + filepath.Join(root, "domains", "network", "ovn"): {}, + filepath.Join(root, "domains", "network", "invariants"): {}, } type hit struct { diff --git a/spinifex/network/invariants/policy_no_create_test.go b/spinifex/domains/network/invariants/policy_no_create_test.go similarity index 97% rename from spinifex/network/invariants/policy_no_create_test.go rename to spinifex/domains/network/invariants/policy_no_create_test.go index 092c0f7ad..75d2f814c 100644 --- a/spinifex/network/invariants/policy_no_create_test.go +++ b/spinifex/domains/network/invariants/policy_no_create_test.go @@ -33,7 +33,7 @@ func TestS5_PolicyNeverCreatesOrDeletes(t *testing.T) { "DeleteLogicalRouterPort": {}, } - root := filepath.Join(repoRoot(t), "spinifex", "network", "policy") + root := filepath.Join(repoRoot(t), "spinifex", "domains", "network", "policy") type hit struct { file string line int diff --git a/spinifex/network/invariants/reconciler_singleton_test.go b/spinifex/domains/network/invariants/reconciler_singleton_test.go similarity index 97% rename from spinifex/network/invariants/reconciler_singleton_test.go rename to spinifex/domains/network/invariants/reconciler_singleton_test.go index 6db1e01c3..022fe9f27 100644 --- a/spinifex/network/invariants/reconciler_singleton_test.go +++ b/spinifex/domains/network/invariants/reconciler_singleton_test.go @@ -25,7 +25,7 @@ func TestS9_SingleReconcilerNoRetrofitPasses(t *testing.T) { loopRE := regexp.MustCompile(`^Reconcile[A-Za-z]*Loop$`) passRE := regexp.MustCompile(`^Reconcile[A-Za-z]*Pass\d+$`) - root := filepath.Join(repoRoot(t), "spinifex", "network") + root := filepath.Join(repoRoot(t), "spinifex", "domains", "network") type hit struct { file string line int diff --git a/spinifex/network/ovn/acl_diff.go b/spinifex/domains/network/ovn/acl_diff.go similarity index 95% rename from spinifex/network/ovn/acl_diff.go rename to spinifex/domains/network/ovn/acl_diff.go index 4ea26b542..a13c24ff0 100644 --- a/spinifex/network/ovn/acl_diff.go +++ b/spinifex/domains/network/ovn/acl_diff.go @@ -3,7 +3,7 @@ package ovn import ( "fmt" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" ) // aclKey builds a content-addressable key covering every semantic ACL field so a diff --git a/spinifex/network/ovn/client.go b/spinifex/domains/network/ovn/client.go similarity index 99% rename from spinifex/network/ovn/client.go rename to spinifex/domains/network/ovn/client.go index 83ff02965..bcd6790c0 100644 --- a/spinifex/network/ovn/client.go +++ b/spinifex/domains/network/ovn/client.go @@ -7,7 +7,7 @@ import ( "context" "errors" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" ) // ErrNATNotFound is returned when a NAT rule is absent (use errors.Is for idempotency). diff --git a/spinifex/network/ovn/conformance_test.go b/spinifex/domains/network/ovn/conformance_test.go similarity index 99% rename from spinifex/network/ovn/conformance_test.go rename to spinifex/domains/network/ovn/conformance_test.go index a2d73d0a1..d24132246 100644 --- a/spinifex/network/ovn/conformance_test.go +++ b/spinifex/domains/network/ovn/conformance_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/network/ovn/live.go b/spinifex/domains/network/ovn/live.go similarity index 99% rename from spinifex/network/ovn/live.go rename to spinifex/domains/network/ovn/live.go index 86cb65971..6ae102428 100644 --- a/spinifex/network/ovn/live.go +++ b/spinifex/domains/network/ovn/live.go @@ -9,7 +9,7 @@ import ( "github.com/cenkalti/backoff/v4" "github.com/mulgadc/spinifex/spinifex/bootstrap/config" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" "github.com/ovn-kubernetes/libovsdb/client" "github.com/ovn-kubernetes/libovsdb/model" "github.com/ovn-kubernetes/libovsdb/ovsdb" diff --git a/spinifex/network/ovn/live_ensure_test.go b/spinifex/domains/network/ovn/live_ensure_test.go similarity index 97% rename from spinifex/network/ovn/live_ensure_test.go rename to spinifex/domains/network/ovn/live_ensure_test.go index f2d8e93c0..4204e331f 100644 --- a/spinifex/network/ovn/live_ensure_test.go +++ b/spinifex/domains/network/ovn/live_ensure_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/ovn/ovntest" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/ovntest" ) func liveClient(t *testing.T) (*ovn.LiveClient, context.Context) { diff --git a/spinifex/network/ovn/live_test.go b/spinifex/domains/network/ovn/live_test.go similarity index 97% rename from spinifex/network/ovn/live_test.go rename to spinifex/domains/network/ovn/live_test.go index 02e599c5b..96633246b 100644 --- a/spinifex/network/ovn/live_test.go +++ b/spinifex/domains/network/ovn/live_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/ovn/ovntest" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/ovntest" "github.com/ovn-kubernetes/libovsdb/ovsdb" ) diff --git a/spinifex/network/ovn/mock/mock.go b/spinifex/domains/network/ovn/mock/mock.go similarity index 99% rename from spinifex/network/ovn/mock/mock.go rename to spinifex/domains/network/ovn/mock/mock.go index fcc5caa45..802648b0a 100644 --- a/spinifex/network/ovn/mock/mock.go +++ b/spinifex/domains/network/ovn/mock/mock.go @@ -8,9 +8,9 @@ import ( "slices" "sync" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" awsidentifiers "github.com/mulgadc/spinifex/spinifex/foundation/aws/identifiers" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" ) // Client implements ovn.Client with in-memory storage for testing. diff --git a/spinifex/network/ovn/mock/mock_test.go b/spinifex/domains/network/ovn/mock/mock_test.go similarity index 99% rename from spinifex/network/ovn/mock/mock_test.go rename to spinifex/domains/network/ovn/mock/mock_test.go index 046176845..24b82fb4e 100644 --- a/spinifex/network/ovn/mock/mock_test.go +++ b/spinifex/domains/network/ovn/mock/mock_test.go @@ -6,8 +6,8 @@ import ( "sync" "testing" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" ) // ReplaceACLs must no-op on an unchanged set (stable ACL UUIDs) and swap on a diff --git a/spinifex/network/ovn/nbdb/model.go b/spinifex/domains/network/ovn/nbdb/model.go similarity index 100% rename from spinifex/network/ovn/nbdb/model.go rename to spinifex/domains/network/ovn/nbdb/model.go diff --git a/spinifex/network/ovn/nbdb/model_test.go b/spinifex/domains/network/ovn/nbdb/model_test.go similarity index 100% rename from spinifex/network/ovn/nbdb/model_test.go rename to spinifex/domains/network/ovn/nbdb/model_test.go diff --git a/spinifex/network/ovn/ovntest/encoding_test.go b/spinifex/domains/network/ovn/ovntest/encoding_test.go similarity index 95% rename from spinifex/network/ovn/ovntest/encoding_test.go rename to spinifex/domains/network/ovn/ovntest/encoding_test.go index 8df34cb49..965a2804c 100644 --- a/spinifex/network/ovn/ovntest/encoding_test.go +++ b/spinifex/domains/network/ovn/ovntest/encoding_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" ) // TestStartNB_ColumnEncoding exercises the trickier NB column kinds end-to-end: diff --git a/spinifex/network/ovn/ovntest/ovn-nb.ovsschema b/spinifex/domains/network/ovn/ovntest/ovn-nb.ovsschema similarity index 100% rename from spinifex/network/ovn/ovntest/ovn-nb.ovsschema rename to spinifex/domains/network/ovn/ovntest/ovn-nb.ovsschema diff --git a/spinifex/network/ovn/ovntest/server.go b/spinifex/domains/network/ovn/ovntest/server.go similarity index 98% rename from spinifex/network/ovn/ovntest/server.go rename to spinifex/domains/network/ovn/ovntest/server.go index 67faf9350..58c885351 100644 --- a/spinifex/network/ovn/ovntest/server.go +++ b/spinifex/domains/network/ovn/ovntest/server.go @@ -20,7 +20,7 @@ import ( "github.com/ovn-kubernetes/libovsdb/ovsdb" "github.com/ovn-kubernetes/libovsdb/server" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" ) // nbSchema is the OVN Northbound schema subset covering the tables nbdb models. diff --git a/spinifex/network/ovn/ovntest/server_test.go b/spinifex/domains/network/ovn/ovntest/server_test.go similarity index 89% rename from spinifex/network/ovn/ovntest/server_test.go rename to spinifex/domains/network/ovn/ovntest/server_test.go index 06655f78e..afbc6bb96 100644 --- a/spinifex/network/ovn/ovntest/server_test.go +++ b/spinifex/domains/network/ovn/ovntest/server_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" ) // TestStartNB_RoundTrip proves the in-process NB server accepts our NB schema, diff --git a/spinifex/network/policy/acl.go b/spinifex/domains/network/policy/acl.go similarity index 98% rename from spinifex/network/policy/acl.go rename to spinifex/domains/network/policy/acl.go index 34ec5b0cf..afe51d4f0 100644 --- a/spinifex/network/policy/acl.go +++ b/spinifex/domains/network/policy/acl.go @@ -5,8 +5,8 @@ import ( "strconv" "strings" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // ACL priority bands. Higher wins. Tenants only ever populate 1000. diff --git a/spinifex/network/policy/acl_test.go b/spinifex/domains/network/policy/acl_test.go similarity index 100% rename from spinifex/network/policy/acl_test.go rename to spinifex/domains/network/policy/acl_test.go diff --git a/spinifex/network/policy/nat.go b/spinifex/domains/network/policy/nat.go similarity index 99% rename from spinifex/network/policy/nat.go rename to spinifex/domains/network/policy/nat.go index a8d679507..4e3d36a47 100644 --- a/spinifex/network/policy/nat.go +++ b/spinifex/domains/network/policy/nat.go @@ -9,9 +9,9 @@ import ( "net/netip" "slices" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // GatewayIPExtIDKey is the gateway LRP external_ids key carrying the IP diff --git a/spinifex/network/policy/nat_binder_test.go b/spinifex/domains/network/policy/nat_binder_test.go similarity index 98% rename from spinifex/network/policy/nat_binder_test.go rename to spinifex/domains/network/policy/nat_binder_test.go index 65086f48d..d22738e59 100644 --- a/spinifex/network/policy/nat_binder_test.go +++ b/spinifex/domains/network/policy/nat_binder_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) type recordedBinder struct { diff --git a/spinifex/network/policy/nat_datapath_test.go b/spinifex/domains/network/policy/nat_datapath_test.go similarity index 99% rename from spinifex/network/policy/nat_datapath_test.go rename to spinifex/domains/network/policy/nat_datapath_test.go index d01d61f08..80c98882d 100644 --- a/spinifex/network/policy/nat_datapath_test.go +++ b/spinifex/domains/network/policy/nat_datapath_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" ) // pairResolver maps one public address to its on-wire private one, the shape diff --git a/spinifex/network/policy/nat_gateway_chassis_test.go b/spinifex/domains/network/policy/nat_gateway_chassis_test.go similarity index 100% rename from spinifex/network/policy/nat_gateway_chassis_test.go rename to spinifex/domains/network/policy/nat_gateway_chassis_test.go diff --git a/spinifex/network/policy/nat_host_chassis_test.go b/spinifex/domains/network/policy/nat_host_chassis_test.go similarity index 98% rename from spinifex/network/policy/nat_host_chassis_test.go rename to spinifex/domains/network/policy/nat_host_chassis_test.go index 35675aef2..6364942f3 100644 --- a/spinifex/network/policy/nat_host_chassis_test.go +++ b/spinifex/domains/network/policy/nat_host_chassis_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" ) // ownedBy makes the binder answer "is this port on this chassis" from a fixed diff --git a/spinifex/network/policy/nat_prune_guard_test.go b/spinifex/domains/network/policy/nat_prune_guard_test.go similarity index 92% rename from spinifex/network/policy/nat_prune_guard_test.go rename to spinifex/domains/network/policy/nat_prune_guard_test.go index 1394a3560..d2f078158 100644 --- a/spinifex/network/policy/nat_prune_guard_test.go +++ b/spinifex/domains/network/policy/nat_prune_guard_test.go @@ -5,9 +5,9 @@ import ( "errors" "testing" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // An empty live set is what a failed intent read looks like from here, and the diff --git a/spinifex/network/policy/nat_test.go b/spinifex/domains/network/policy/nat_test.go similarity index 99% rename from spinifex/network/policy/nat_test.go rename to spinifex/domains/network/policy/nat_test.go index 53827ec1c..8927adc92 100644 --- a/spinifex/network/policy/nat_test.go +++ b/spinifex/domains/network/policy/nat_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/host" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) func seedGatewayPort(t *testing.T, m *mock.Client, vpcID, mac string) { diff --git a/spinifex/network/policy/policy.go b/spinifex/domains/network/policy/policy.go similarity index 96% rename from spinifex/network/policy/policy.go rename to spinifex/domains/network/policy/policy.go index b74a3d34d..7ceea97e0 100644 --- a/spinifex/network/policy/policy.go +++ b/spinifex/domains/network/policy/policy.go @@ -4,7 +4,7 @@ package policy import ( - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" ) // NATMode selects distributed vs. centralised NAT (ADR-0006 S3). Fixed at diff --git a/spinifex/network/policy/route.go b/spinifex/domains/network/policy/route.go similarity index 98% rename from spinifex/network/policy/route.go rename to spinifex/domains/network/policy/route.go index c7fe0a95f..bbae9f86d 100644 --- a/spinifex/network/policy/route.go +++ b/spinifex/domains/network/policy/route.go @@ -5,9 +5,9 @@ import ( "fmt" "net/netip" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) const ( diff --git a/spinifex/network/policy/route_test.go b/spinifex/domains/network/policy/route_test.go similarity index 99% rename from spinifex/network/policy/route_test.go rename to spinifex/domains/network/policy/route_test.go index 25a430422..77de0ae2e 100644 --- a/spinifex/network/policy/route_test.go +++ b/spinifex/domains/network/policy/route_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) func findRoute(m *mock.Client, prefix string) *nbdb.LogicalRouterStaticRoute { diff --git a/spinifex/network/policy/sg.go b/spinifex/domains/network/policy/sg.go similarity index 96% rename from spinifex/network/policy/sg.go rename to spinifex/domains/network/policy/sg.go index e3008352c..75accf1ea 100644 --- a/spinifex/network/policy/sg.go +++ b/spinifex/domains/network/policy/sg.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // SGSpec is the policy-layer view of a security group. The OVN port group diff --git a/spinifex/network/policy/sg_test.go b/spinifex/domains/network/policy/sg_test.go similarity index 97% rename from spinifex/network/policy/sg_test.go rename to spinifex/domains/network/policy/sg_test.go index dbe6276f1..eed53a8d9 100644 --- a/spinifex/network/policy/sg_test.go +++ b/spinifex/domains/network/policy/sg_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) func newSGMockWithPG(t *testing.T, sgID string) (*mock.Client, string) { diff --git a/spinifex/network/reconcile/actual.go b/spinifex/domains/network/reconcile/actual.go similarity index 97% rename from spinifex/network/reconcile/actual.go rename to spinifex/domains/network/reconcile/actual.go index d36faed6c..83c3a5d38 100644 --- a/spinifex/network/reconcile/actual.go +++ b/spinifex/domains/network/reconcile/actual.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/mulgadc/spinifex/spinifex/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" ) // ActualState is the live OVN NB snapshot used to diff against IntentState. diff --git a/spinifex/network/reconcile/apply.go b/spinifex/domains/network/reconcile/apply.go similarity index 99% rename from spinifex/network/reconcile/apply.go rename to spinifex/domains/network/reconcile/apply.go index 0a20a3aa6..8422b9626 100644 --- a/spinifex/network/reconcile/apply.go +++ b/spinifex/domains/network/reconcile/apply.go @@ -11,12 +11,12 @@ import ( "sync" "time" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" - "github.com/mulgadc/spinifex/spinifex/network/external" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" ) // Bounds for the post-rebind SB chassis-claim wait. Package vars so tests can shorten. diff --git a/spinifex/network/reconcile/apply_eip_concurrency_test.go b/spinifex/domains/network/reconcile/apply_eip_concurrency_test.go similarity index 97% rename from spinifex/network/reconcile/apply_eip_concurrency_test.go rename to spinifex/domains/network/reconcile/apply_eip_concurrency_test.go index b0f419c99..4ed1231cf 100644 --- a/spinifex/network/reconcile/apply_eip_concurrency_test.go +++ b/spinifex/domains/network/reconcile/apply_eip_concurrency_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // concurrentClaimVerifier reports livePort up and every other port permanently diff --git a/spinifex/network/reconcile/apply_gateway_claim_test.go b/spinifex/domains/network/reconcile/apply_gateway_claim_test.go similarity index 99% rename from spinifex/network/reconcile/apply_gateway_claim_test.go rename to spinifex/domains/network/reconcile/apply_gateway_claim_test.go index 7b13a49dc..a4d7b5f1e 100644 --- a/spinifex/network/reconcile/apply_gateway_claim_test.go +++ b/spinifex/domains/network/reconcile/apply_gateway_claim_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // fakeClaimVerifier scripts a sequence of GatewayPortClaimed results and counts diff --git a/spinifex/network/reconcile/apply_guest_port_backoff_test.go b/spinifex/domains/network/reconcile/apply_guest_port_backoff_test.go similarity index 98% rename from spinifex/network/reconcile/apply_guest_port_backoff_test.go rename to spinifex/domains/network/reconcile/apply_guest_port_backoff_test.go index 66cec46f3..b1f3bb6c8 100644 --- a/spinifex/network/reconcile/apply_guest_port_backoff_test.go +++ b/spinifex/domains/network/reconcile/apply_guest_port_backoff_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // withFastGuestPortBackoff shrinks the post-failure backoff so a test can cross diff --git a/spinifex/network/reconcile/apply_guest_port_idle_test.go b/spinifex/domains/network/reconcile/apply_guest_port_idle_test.go similarity index 98% rename from spinifex/network/reconcile/apply_guest_port_idle_test.go rename to spinifex/domains/network/reconcile/apply_guest_port_idle_test.go index ba06f5c38..ab1638029 100644 --- a/spinifex/network/reconcile/apply_guest_port_idle_test.go +++ b/spinifex/domains/network/reconcile/apply_guest_port_idle_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // captureReconcileLogs swaps the default logger for one writing to a buffer at diff --git a/spinifex/network/reconcile/apply_natgw_live_test.go b/spinifex/domains/network/reconcile/apply_natgw_live_test.go similarity index 95% rename from spinifex/network/reconcile/apply_natgw_live_test.go rename to spinifex/domains/network/reconcile/apply_natgw_live_test.go index bc91f0089..718244c94 100644 --- a/spinifex/network/reconcile/apply_natgw_live_test.go +++ b/spinifex/domains/network/reconcile/apply_natgw_live_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // The live set also gates the host-ingress sweep that prune runs, and a NAT diff --git a/spinifex/network/reconcile/apply_prune_safety_test.go b/spinifex/domains/network/reconcile/apply_prune_safety_test.go similarity index 96% rename from spinifex/network/reconcile/apply_prune_safety_test.go rename to spinifex/domains/network/reconcile/apply_prune_safety_test.go index 833a2f4cc..727495323 100644 --- a/spinifex/network/reconcile/apply_prune_safety_test.go +++ b/spinifex/domains/network/reconcile/apply_prune_safety_test.go @@ -19,9 +19,9 @@ import ( "net/netip" "testing" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // seedGuestPorts converges every named ENI in one pass, so no intermediate diff --git a/spinifex/network/reconcile/apply_test.go b/spinifex/domains/network/reconcile/apply_test.go similarity index 99% rename from spinifex/network/reconcile/apply_test.go rename to spinifex/domains/network/reconcile/apply_test.go index 974ed90f4..4233f4859 100644 --- a/spinifex/network/reconcile/apply_test.go +++ b/spinifex/domains/network/reconcile/apply_test.go @@ -10,11 +10,11 @@ import ( "strings" "testing" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // newTestReconciler builds a reconciler around the in-memory OVN mock. diff --git a/spinifex/network/reconcile/drift.go b/spinifex/domains/network/reconcile/drift.go similarity index 100% rename from spinifex/network/reconcile/drift.go rename to spinifex/domains/network/reconcile/drift.go diff --git a/spinifex/network/reconcile/drift_test.go b/spinifex/domains/network/reconcile/drift_test.go similarity index 100% rename from spinifex/network/reconcile/drift_test.go rename to spinifex/domains/network/reconcile/drift_test.go diff --git a/spinifex/network/reconcile/drift_watch_test.go b/spinifex/domains/network/reconcile/drift_watch_test.go similarity index 100% rename from spinifex/network/reconcile/drift_watch_test.go rename to spinifex/domains/network/reconcile/drift_watch_test.go diff --git a/spinifex/network/reconcile/intent.go b/spinifex/domains/network/reconcile/intent.go similarity index 99% rename from spinifex/network/reconcile/intent.go rename to spinifex/domains/network/reconcile/intent.go index 58bdf45f4..eea9bd2ae 100644 --- a/spinifex/network/reconcile/intent.go +++ b/spinifex/domains/network/reconcile/intent.go @@ -11,15 +11,15 @@ import ( "slices" "strings" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" handlers_ec2_eip "github.com/mulgadc/spinifex/spinifex/handlers/ec2/eip" handlers_ec2_igw "github.com/mulgadc/spinifex/spinifex/handlers/ec2/igw" handlers_ec2_natgw "github.com/mulgadc/spinifex/spinifex/handlers/ec2/natgw" handlers_ec2_routetable "github.com/mulgadc/spinifex/spinifex/handlers/ec2/routetable" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/network/reconcile/intent_test.go b/spinifex/domains/network/reconcile/intent_test.go similarity index 99% rename from spinifex/network/reconcile/intent_test.go rename to spinifex/domains/network/reconcile/intent_test.go index bcdf97ad9..5285edcb6 100644 --- a/spinifex/network/reconcile/intent_test.go +++ b/spinifex/domains/network/reconcile/intent_test.go @@ -9,12 +9,12 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" handlers_ec2_eip "github.com/mulgadc/spinifex/spinifex/handlers/ec2/eip" handlers_ec2_igw "github.com/mulgadc/spinifex/spinifex/handlers/ec2/igw" handlers_ec2_natgw "github.com/mulgadc/spinifex/spinifex/handlers/ec2/natgw" handlers_ec2_routetable "github.com/mulgadc/spinifex/spinifex/handlers/ec2/routetable" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/network/policy" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/network/reconcile/invariants_test.go b/spinifex/domains/network/reconcile/invariants_test.go similarity index 95% rename from spinifex/network/reconcile/invariants_test.go rename to spinifex/domains/network/reconcile/invariants_test.go index b33c2fd1e..8b2640a6e 100644 --- a/spinifex/network/reconcile/invariants_test.go +++ b/spinifex/domains/network/reconcile/invariants_test.go @@ -6,9 +6,9 @@ import ( "net/netip" "testing" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // IMDS-datapath invariants. Guest LSPs and DHCPOptions rows are created by two diff --git a/spinifex/network/reconcile/liveness_test.go b/spinifex/domains/network/reconcile/liveness_test.go similarity index 94% rename from spinifex/network/reconcile/liveness_test.go rename to spinifex/domains/network/reconcile/liveness_test.go index ffe2cb623..da8ec6482 100644 --- a/spinifex/network/reconcile/liveness_test.go +++ b/spinifex/domains/network/reconcile/liveness_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // TestL1_ReconcilerConverges enforces ADR-0006 L1: while KV and OVN NB are diff --git a/spinifex/network/reconcile/lock.go b/spinifex/domains/network/reconcile/lock.go similarity index 100% rename from spinifex/network/reconcile/lock.go rename to spinifex/domains/network/reconcile/lock.go diff --git a/spinifex/network/reconcile/lock_test.go b/spinifex/domains/network/reconcile/lock_test.go similarity index 100% rename from spinifex/network/reconcile/lock_test.go rename to spinifex/domains/network/reconcile/lock_test.go diff --git a/spinifex/network/reconcile/reconcile.go b/spinifex/domains/network/reconcile/reconcile.go similarity index 98% rename from spinifex/network/reconcile/reconcile.go rename to spinifex/domains/network/reconcile/reconcile.go index 8c64980e4..7558d1c4c 100644 --- a/spinifex/network/reconcile/reconcile.go +++ b/spinifex/domains/network/reconcile/reconcile.go @@ -13,10 +13,10 @@ import ( "sync" "time" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // ErrPassIncomplete marks a pass that applied what it could but left at least diff --git a/spinifex/network/reconcile/scenario_egress_live_test.go b/spinifex/domains/network/reconcile/scenario_egress_live_test.go similarity index 93% rename from spinifex/network/reconcile/scenario_egress_live_test.go rename to spinifex/domains/network/reconcile/scenario_egress_live_test.go index 12796700f..81efec0fc 100644 --- a/spinifex/network/reconcile/scenario_egress_live_test.go +++ b/spinifex/domains/network/reconcile/scenario_egress_live_test.go @@ -11,9 +11,9 @@ import ( "strings" "testing" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // TestScenario_IGWDropGatePublicInstance_Live attaches an IGW to a routeless diff --git a/spinifex/network/reconcile/scenario_kitchensink_live_test.go b/spinifex/domains/network/reconcile/scenario_kitchensink_live_test.go similarity index 96% rename from spinifex/network/reconcile/scenario_kitchensink_live_test.go rename to spinifex/domains/network/reconcile/scenario_kitchensink_live_test.go index 3e69f0023..8c74d4525 100644 --- a/spinifex/network/reconcile/scenario_kitchensink_live_test.go +++ b/spinifex/domains/network/reconcile/scenario_kitchensink_live_test.go @@ -16,9 +16,9 @@ import ( "path/filepath" "testing" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // kitchenSinkIntent builds a maximal IntentState touching every applyX path: diff --git a/spinifex/network/reconcile/scenario_kv_live_test.go b/spinifex/domains/network/reconcile/scenario_kv_live_test.go similarity index 100% rename from spinifex/network/reconcile/scenario_kv_live_test.go rename to spinifex/domains/network/reconcile/scenario_kv_live_test.go diff --git a/spinifex/network/reconcile/scenario_live_test.go b/spinifex/domains/network/reconcile/scenario_live_test.go similarity index 95% rename from spinifex/network/reconcile/scenario_live_test.go rename to spinifex/domains/network/reconcile/scenario_live_test.go index 2c0eae658..44d001889 100644 --- a/spinifex/network/reconcile/scenario_live_test.go +++ b/spinifex/domains/network/reconcile/scenario_live_test.go @@ -16,11 +16,11 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/ovntest" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/ovntest" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // uuidRe and ptrRe strip identity churn from NB row dumps so the idempotency diff --git a/spinifex/network/reconcile/scenario_prune_live_test.go b/spinifex/domains/network/reconcile/scenario_prune_live_test.go similarity index 96% rename from spinifex/network/reconcile/scenario_prune_live_test.go rename to spinifex/domains/network/reconcile/scenario_prune_live_test.go index 0271c5999..94584a7ce 100644 --- a/spinifex/network/reconcile/scenario_prune_live_test.go +++ b/spinifex/domains/network/reconcile/scenario_prune_live_test.go @@ -13,8 +13,8 @@ import ( "slices" "testing" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) func TestScenario_OrphanPrune_Live(t *testing.T) { diff --git a/spinifex/network/reconcile/testdata/kitchen_sink_nb.golden b/spinifex/domains/network/reconcile/testdata/kitchen_sink_nb.golden similarity index 100% rename from spinifex/network/reconcile/testdata/kitchen_sink_nb.golden rename to spinifex/domains/network/reconcile/testdata/kitchen_sink_nb.golden diff --git a/spinifex/network/subscribers/events.go b/spinifex/domains/network/subscribers/events.go similarity index 100% rename from spinifex/network/subscribers/events.go rename to spinifex/domains/network/subscribers/events.go diff --git a/spinifex/network/subscribers/respond.go b/spinifex/domains/network/subscribers/respond.go similarity index 100% rename from spinifex/network/subscribers/respond.go rename to spinifex/domains/network/subscribers/respond.go diff --git a/spinifex/network/subscribers/security.go b/spinifex/domains/network/subscribers/security.go similarity index 98% rename from spinifex/network/subscribers/security.go rename to spinifex/domains/network/subscribers/security.go index 2c751b268..1c32d2624 100644 --- a/spinifex/network/subscribers/security.go +++ b/spinifex/domains/network/subscribers/security.go @@ -6,7 +6,7 @@ import ( "log/slog" "time" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" "github.com/nats-io/nats.go" ) diff --git a/spinifex/network/subscribers/security_description_test.go b/spinifex/domains/network/subscribers/security_description_test.go similarity index 95% rename from spinifex/network/subscribers/security_description_test.go rename to spinifex/domains/network/subscribers/security_description_test.go index 2a9553f1a..76f925801 100644 --- a/spinifex/network/subscribers/security_description_test.go +++ b/spinifex/domains/network/subscribers/security_description_test.go @@ -13,9 +13,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // aclFingerprints applies a vpc.update-sg payload through policy.UpdateSG and diff --git a/spinifex/network/subscribers/subscribers.go b/spinifex/domains/network/subscribers/subscribers.go similarity index 96% rename from spinifex/network/subscribers/subscribers.go rename to spinifex/domains/network/subscribers/subscribers.go index 00b010a2a..1170ef615 100644 --- a/spinifex/network/subscribers/subscribers.go +++ b/spinifex/domains/network/subscribers/subscribers.go @@ -8,9 +8,9 @@ import ( "fmt" "log/slog" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/nats-io/nats.go" ) diff --git a/spinifex/network/subscribers/subscribers_test.go b/spinifex/domains/network/subscribers/subscribers_test.go similarity index 98% rename from spinifex/network/subscribers/subscribers_test.go rename to spinifex/domains/network/subscribers/subscribers_test.go index cc921902b..5a400aad5 100644 --- a/spinifex/network/subscribers/subscribers_test.go +++ b/spinifex/domains/network/subscribers/subscribers_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/require" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) const requestTimeout = 2 * time.Second diff --git a/spinifex/network/subscribers/topology.go b/spinifex/domains/network/subscribers/topology.go similarity index 98% rename from spinifex/network/subscribers/topology.go rename to spinifex/domains/network/subscribers/topology.go index 20631bad9..d68cae2be 100644 --- a/spinifex/network/subscribers/topology.go +++ b/spinifex/domains/network/subscribers/topology.go @@ -8,9 +8,9 @@ import ( "net/netip" ec2v1 "github.com/mulgadc/spinifex/contracts/ec2/v1" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/nats-io/nats.go" ) diff --git a/spinifex/network/subscribers/topology_test.go b/spinifex/domains/network/subscribers/topology_test.go similarity index 97% rename from spinifex/network/subscribers/topology_test.go rename to spinifex/domains/network/subscribers/topology_test.go index 0f56236c2..020049cf6 100644 --- a/spinifex/network/subscribers/topology_test.go +++ b/spinifex/domains/network/subscribers/topology_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/require" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // runningSubscriber wires a subscriber to a live NATS server with every topic diff --git a/spinifex/network/topology/dhcp_options.go b/spinifex/domains/network/topology/dhcp_options.go similarity index 100% rename from spinifex/network/topology/dhcp_options.go rename to spinifex/domains/network/topology/dhcp_options.go diff --git a/spinifex/network/topology/dhcp_options_test.go b/spinifex/domains/network/topology/dhcp_options_test.go similarity index 100% rename from spinifex/network/topology/dhcp_options_test.go rename to spinifex/domains/network/topology/dhcp_options_test.go diff --git a/spinifex/network/topology/manager.go b/spinifex/domains/network/topology/manager.go similarity index 100% rename from spinifex/network/topology/manager.go rename to spinifex/domains/network/topology/manager.go diff --git a/spinifex/network/topology/manager_live.go b/spinifex/domains/network/topology/manager_live.go similarity index 98% rename from spinifex/network/topology/manager_live.go rename to spinifex/domains/network/topology/manager_live.go index 14d0c59af..f7e2713a6 100644 --- a/spinifex/network/topology/manager_live.go +++ b/spinifex/domains/network/topology/manager_live.go @@ -9,9 +9,9 @@ import ( "strconv" "strings" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" ) // Option configures a liveManager at construction. diff --git a/spinifex/network/topology/manager_live_test.go b/spinifex/domains/network/topology/manager_live_test.go similarity index 99% rename from spinifex/network/topology/manager_live_test.go rename to spinifex/domains/network/topology/manager_live_test.go index 056c58847..394d2129c 100644 --- a/spinifex/network/topology/manager_live_test.go +++ b/spinifex/domains/network/topology/manager_live_test.go @@ -6,7 +6,7 @@ import ( "net/netip" "testing" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" ) func newLiveManagerForTest(t *testing.T) (Manager, *mock.Client) { diff --git a/spinifex/network/topology/names.go b/spinifex/domains/network/topology/names.go similarity index 100% rename from spinifex/network/topology/names.go rename to spinifex/domains/network/topology/names.go diff --git a/spinifex/network/topology/names_test.go b/spinifex/domains/network/topology/names_test.go similarity index 100% rename from spinifex/network/topology/names_test.go rename to spinifex/domains/network/topology/names_test.go diff --git a/spinifex/handlers/ec2/eip/lease_rebind.go b/spinifex/handlers/ec2/eip/lease_rebind.go index 59186d006..a2fd6154a 100644 --- a/spinifex/handlers/ec2/eip/lease_rebind.go +++ b/spinifex/handlers/ec2/eip/lease_rebind.go @@ -8,8 +8,8 @@ import ( "log/slog" "strings" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/ec2/eip/service_impl.go b/spinifex/handlers/ec2/eip/service_impl.go index 90ce3007b..a96df844f 100644 --- a/spinifex/handlers/ec2/eip/service_impl.go +++ b/spinifex/handlers/ec2/eip/service_impl.go @@ -13,6 +13,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" awsfilters "github.com/mulgadc/spinifex/spinifex/foundation/aws/filters" awsidentifiers "github.com/mulgadc/spinifex/spinifex/foundation/aws/identifiers" @@ -20,7 +21,6 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/foundation/state/migrate" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/handlers/ec2/eip/service_impl_test.go b/spinifex/handlers/ec2/eip/service_impl_test.go index 9b2b35340..bee76e082 100644 --- a/spinifex/handlers/ec2/eip/service_impl_test.go +++ b/spinifex/handlers/ec2/eip/service_impl_test.go @@ -9,9 +9,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/mulgadc/spinifex/internal/testkit" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/handlers/ec2/instance/service_impl.go b/spinifex/handlers/ec2/instance/service_impl.go index 879f7d0a4..c8d317e77 100644 --- a/spinifex/handlers/ec2/instance/service_impl.go +++ b/spinifex/handlers/ec2/instance/service_impl.go @@ -27,12 +27,12 @@ import ( ebspolicy "github.com/mulgadc/spinifex/spinifex/domains/ec2/ebs/policy" "github.com/mulgadc/spinifex/spinifex/domains/ec2/instancetypes" ec2platform "github.com/mulgadc/spinifex/spinifex/domains/ec2/platform" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" awsfilters "github.com/mulgadc/spinifex/spinifex/foundation/aws/filters" awsidentifiers "github.com/mulgadc/spinifex/spinifex/foundation/aws/identifiers" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/providers/ebs" "github.com/mulgadc/spinifex/spinifex/providers/objectstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" diff --git a/spinifex/handlers/ec2/vpc/eni.go b/spinifex/handlers/ec2/vpc/eni.go index 5b8bfa2f0..a1b03c37c 100644 --- a/spinifex/handlers/ec2/vpc/eni.go +++ b/spinifex/handlers/ec2/vpc/eni.go @@ -14,14 +14,14 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" awsfilters "github.com/mulgadc/spinifex/spinifex/foundation/aws/filters" awsidentifiers "github.com/mulgadc/spinifex/spinifex/foundation/aws/identifiers" "github.com/mulgadc/spinifex/spinifex/foundation/aws/paging" "github.com/mulgadc/spinifex/spinifex/foundation/aws/tags" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/ec2/vpc/eni_lease_rebind.go b/spinifex/handlers/ec2/vpc/eni_lease_rebind.go index cddf083d4..7f501fbc3 100644 --- a/spinifex/handlers/ec2/vpc/eni_lease_rebind.go +++ b/spinifex/handlers/ec2/vpc/eni_lease_rebind.go @@ -8,8 +8,8 @@ import ( "log/slog" "strings" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/ec2/vpc/external_ipam.go b/spinifex/handlers/ec2/vpc/external_ipam.go index 992a8d5e0..181661eed 100644 --- a/spinifex/handlers/ec2/vpc/external_ipam.go +++ b/spinifex/handlers/ec2/vpc/external_ipam.go @@ -7,9 +7,9 @@ import ( "net" "net/netip" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/ec2/vpc/external_ipam_test.go b/spinifex/handlers/ec2/vpc/external_ipam_test.go index 0ff4b40b2..6e6700ae5 100644 --- a/spinifex/handlers/ec2/vpc/external_ipam_test.go +++ b/spinifex/handlers/ec2/vpc/external_ipam_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/mulgadc/spinifex/internal/testkit" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/handlers/elbv2/service_impl.go b/spinifex/handlers/elbv2/service_impl.go index e716a821c..b7d1012d5 100644 --- a/spinifex/handlers/elbv2/service_impl.go +++ b/spinifex/handlers/elbv2/service_impl.go @@ -22,6 +22,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/bootstrap/config" acmdomain "github.com/mulgadc/spinifex/spinifex/domains/acm" "github.com/mulgadc/spinifex/spinifex/domains/dns" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" resourcearn "github.com/mulgadc/spinifex/spinifex/foundation/aws/arn" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" awsidentifiers "github.com/mulgadc/spinifex/spinifex/foundation/aws/identifiers" @@ -29,7 +30,6 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go" ) diff --git a/spinifex/runtime/compute/vm/network_helpers.go b/spinifex/runtime/compute/vm/network_helpers.go index 352afabd2..f2e9b75a4 100644 --- a/spinifex/runtime/compute/vm/network_helpers.go +++ b/spinifex/runtime/compute/vm/network_helpers.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/aws/aws-sdk-go/aws" - networkids "github.com/mulgadc/spinifex/spinifex/network/identifiers" - "github.com/mulgadc/spinifex/spinifex/network/topology" + networkids "github.com/mulgadc/spinifex/spinifex/domains/network/identifiers" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // TapSpec parameterises a single tap-on-OVS-bridge plumbing operation. diff --git a/spinifex/runtime/host/command/privilege_invariants_test.go b/spinifex/runtime/host/command/privilege_invariants_test.go index 63227296e..532d94ee3 100644 --- a/spinifex/runtime/host/command/privilege_invariants_test.go +++ b/spinifex/runtime/host/command/privilege_invariants_test.go @@ -14,7 +14,7 @@ import ( // escalation policy in NeedsPrivilege applies. var policyOwners = map[string]bool{ filepath.Join("spinifex", "runtime", "host", "command", "privilege.go"): true, - filepath.Join("spinifex", "network", "host", "run.go"): true, + filepath.Join("spinifex", "domains", "network", "host", "run.go"): true, } // repoRoot walks up from this test file to the directory holding go.mod. diff --git a/spinifex/runtime/roles/awsgw/awsgw.go b/spinifex/runtime/roles/awsgw/awsgw.go index dfeddf6a8..1b3859512 100644 --- a/spinifex/runtime/roles/awsgw/awsgw.go +++ b/spinifex/runtime/roles/awsgw/awsgw.go @@ -28,6 +28,7 @@ import ( ecrauth "github.com/mulgadc/spinifex/spinifex/domains/ecr/auth" awsapi "github.com/mulgadc/spinifex/spinifex/domains/ecr/awsapi" ecrregistry "github.com/mulgadc/spinifex/spinifex/domains/ecr/registry" + "github.com/mulgadc/spinifex/spinifex/domains/network/reconcile" "github.com/mulgadc/spinifex/spinifex/domains/ochre" ochrevector "github.com/mulgadc/spinifex/spinifex/domains/ochre/vector" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/reconciler" @@ -40,7 +41,6 @@ import ( handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" handlers_quota "github.com/mulgadc/spinifex/spinifex/handlers/quota" handlers_sts "github.com/mulgadc/spinifex/spinifex/handlers/sts" - "github.com/mulgadc/spinifex/spinifex/network/reconcile" "github.com/mulgadc/spinifex/spinifex/providers/objectstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/cache" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" diff --git a/spinifex/vpcd/bridge_detect_test.go b/spinifex/vpcd/bridge_detect_test.go index ad44fb43f..0610534dc 100644 --- a/spinifex/vpcd/bridge_detect_test.go +++ b/spinifex/vpcd/bridge_detect_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" ) // captureLogs redirects slog for one test and returns the accumulated output. diff --git a/spinifex/vpcd/host_eip_loop.go b/spinifex/vpcd/host_eip_loop.go index b7d112465..e1dfbd9c0 100644 --- a/spinifex/vpcd/host_eip_loop.go +++ b/spinifex/vpcd/host_eip_loop.go @@ -5,8 +5,8 @@ import ( "log/slog" "time" + "github.com/mulgadc/spinifex/spinifex/domains/network/reconcile" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" - "github.com/mulgadc/spinifex/spinifex/network/reconcile" ) // Host EIP pass cadence. Shorter than the drift interval because the state it diff --git a/spinifex/vpcd/host_eip_loop_test.go b/spinifex/vpcd/host_eip_loop_test.go index 831d8ebf8..a5b705ba0 100644 --- a/spinifex/vpcd/host_eip_loop_test.go +++ b/spinifex/vpcd/host_eip_loop_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/reconcile" + "github.com/mulgadc/spinifex/spinifex/domains/network/reconcile" ) type countingReconciler struct { diff --git a/spinifex/vpcd/lease_datapath_reconcile.go b/spinifex/vpcd/lease_datapath_reconcile.go index f53b03517..a124685f7 100644 --- a/spinifex/vpcd/lease_datapath_reconcile.go +++ b/spinifex/vpcd/lease_datapath_reconcile.go @@ -4,8 +4,8 @@ import ( "context" "log/slog" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" ) // reconcileGatewayLeases points every VPC gateway port at the address its lease diff --git a/spinifex/vpcd/lease_datapath_reconcile_test.go b/spinifex/vpcd/lease_datapath_reconcile_test.go index 9eea2f465..d6e17c0de 100644 --- a/spinifex/vpcd/lease_datapath_reconcile_test.go +++ b/spinifex/vpcd/lease_datapath_reconcile_test.go @@ -6,10 +6,10 @@ import ( "testing" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/vpcd/lease_ip_change_test.go b/spinifex/vpcd/lease_ip_change_test.go index 17d557816..2866773dc 100644 --- a/spinifex/vpcd/lease_ip_change_test.go +++ b/spinifex/vpcd/lease_ip_change_test.go @@ -8,12 +8,12 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/vpcd/lease_reaper.go b/spinifex/vpcd/lease_reaper.go index 31dd3380c..b5c56a8b7 100644 --- a/spinifex/vpcd/lease_reaper.go +++ b/spinifex/vpcd/lease_reaper.go @@ -8,8 +8,8 @@ import ( "log/slog" "time" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" "github.com/nats-io/nats.go" ) diff --git a/spinifex/vpcd/lease_reaper_test.go b/spinifex/vpcd/lease_reaper_test.go index 322c8903a..4c3be9969 100644 --- a/spinifex/vpcd/lease_reaper_test.go +++ b/spinifex/vpcd/lease_reaper_test.go @@ -8,10 +8,10 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" - "github.com/mulgadc/spinifex/spinifex/network/ovn/mock" - "github.com/mulgadc/spinifex/spinifex/network/ovn/nbdb" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/mock" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/nbdb" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/vpcd/ovn_controller_watchdog.go b/spinifex/vpcd/ovn_controller_watchdog.go index e38d03d86..f4a74af3d 100644 --- a/spinifex/vpcd/ovn_controller_watchdog.go +++ b/spinifex/vpcd/ovn_controller_watchdog.go @@ -5,8 +5,8 @@ import ( "log/slog" "time" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" - "github.com/mulgadc/spinifex/spinifex/network/host" ) // Compile-time check: the gateway-claim prober satisfies the watchdog's needs. diff --git a/spinifex/vpcd/pool_select_test.go b/spinifex/vpcd/pool_select_test.go index 2cbbc00d5..adaa1640d 100644 --- a/spinifex/vpcd/pool_select_test.go +++ b/spinifex/vpcd/pool_select_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" ) func TestSelectExternalPools(t *testing.T) { diff --git a/spinifex/vpcd/vpcd.go b/spinifex/vpcd/vpcd.go index 20412e2c4..7ec33e343 100644 --- a/spinifex/vpcd/vpcd.go +++ b/spinifex/vpcd/vpcd.go @@ -20,17 +20,17 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/domains/ec2/guestmetadata" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/dhcp" + "github.com/mulgadc/spinifex/spinifex/domains/network/external/ocinet" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/reconcile" + "github.com/mulgadc/spinifex/spinifex/domains/network/subscribers" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" handlers_ec2_igw "github.com/mulgadc/spinifex/spinifex/handlers/ec2/igw" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/external/dhcp" - "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" - "github.com/mulgadc/spinifex/spinifex/network/host" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/reconcile" - "github.com/mulgadc/spinifex/spinifex/network/subscribers" - "github.com/mulgadc/spinifex/spinifex/network/topology" hostcommand "github.com/mulgadc/spinifex/spinifex/runtime/host/command" hostprocess "github.com/mulgadc/spinifex/spinifex/runtime/host/process" "github.com/nats-io/nats.go" diff --git a/spinifex/vpcd/vpcd_eip_chassis_test.go b/spinifex/vpcd/vpcd_eip_chassis_test.go index 06ba79a33..52473dc6c 100644 --- a/spinifex/vpcd/vpcd_eip_chassis_test.go +++ b/spinifex/vpcd/vpcd_eip_chassis_test.go @@ -9,7 +9,7 @@ import ( "fmt" "testing" - "github.com/mulgadc/spinifex/spinifex/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" ) // ovsIfaceRunner answers the one `ovs-vsctl list Interface` query the chassis diff --git a/spinifex/vpcd/vpcd_nat_test.go b/spinifex/vpcd/vpcd_nat_test.go index af43f293b..878b43224 100644 --- a/spinifex/vpcd/vpcd_nat_test.go +++ b/spinifex/vpcd/vpcd_nat_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" ) func TestVerifyBridgeMode_NATOK(t *testing.T) { diff --git a/spinifex/vpcd/vpcd_test.go b/spinifex/vpcd/vpcd_test.go index a5b9fab21..bf1125394 100644 --- a/spinifex/vpcd/vpcd_test.go +++ b/spinifex/vpcd/vpcd_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/domains/ec2/guestmetadata" - "github.com/mulgadc/spinifex/spinifex/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" ) func TestPreflightOVN_AllPass(t *testing.T) { diff --git a/tests/e2e/harness/imds_diag.go b/tests/e2e/harness/imds_diag.go index 2f356a351..4261f8004 100644 --- a/tests/e2e/harness/imds_diag.go +++ b/tests/e2e/harness/imds_diag.go @@ -7,7 +7,7 @@ import ( "os/exec" "testing" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" ) // DumpIMDSDatapathDiagnostics emits a triage bundle for an IMDS reachability diff --git a/tests/e2e/multinode/listener_invariant_test.go b/tests/e2e/multinode/listener_invariant_test.go index 0218570dd..817144b72 100644 --- a/tests/e2e/multinode/listener_invariant_test.go +++ b/tests/e2e/multinode/listener_invariant_test.go @@ -17,7 +17,7 @@ import ( ) // runListenerInvariant is the runtime half of the listener invariant. The -// static half in spinifex/network/invariants reads install scripts and +// static half in spinifex/domains/network/invariants reads install scripts and // config templates; only this half reads what each node's kernel actually // bound, which is what caught the original OVN NB/SB wildcard defect (spinifex // #765) — that bug was found by hand on a live node with `ss -tulnp`, not by diff --git a/tests/e2e/multinode/ovn_raft_test.go b/tests/e2e/multinode/ovn_raft_test.go index b0d64bc62..1ce462516 100644 --- a/tests/e2e/multinode/ovn_raft_test.go +++ b/tests/e2e/multinode/ovn_raft_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/tests/e2e/harness" "github.com/stretchr/testify/require" ) diff --git a/tests/e2e/natuplink/natuplink_test.go b/tests/e2e/natuplink/natuplink_test.go index 233c5566b..7a7dd8714 100644 --- a/tests/e2e/natuplink/natuplink_test.go +++ b/tests/e2e/natuplink/natuplink_test.go @@ -35,7 +35,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mulgadc/spinifex/spinifex/network/host" + "github.com/mulgadc/spinifex/spinifex/domains/network/host" "github.com/mulgadc/spinifex/tests/e2e/harness" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/tests/fixtures/vpcd/vpcd.go b/tests/fixtures/vpcd/vpcd.go index b8b52dda6..169f02976 100644 --- a/tests/fixtures/vpcd/vpcd.go +++ b/tests/fixtures/vpcd/vpcd.go @@ -15,12 +15,12 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/external" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/ovn/ovntest" - "github.com/mulgadc/spinifex/spinifex/network/policy" - "github.com/mulgadc/spinifex/spinifex/network/subscribers" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/external" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn/ovntest" + "github.com/mulgadc/spinifex/spinifex/domains/network/policy" + "github.com/mulgadc/spinifex/spinifex/domains/network/subscribers" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" ) // connectTimeout bounds the initial OVSDB handshake. The server is in-process diff --git a/tests/integration/vpc_ordering_test.go b/tests/integration/vpc_ordering_test.go index f9bad02d4..4839c81e0 100644 --- a/tests/integration/vpc_ordering_test.go +++ b/tests/integration/vpc_ordering_test.go @@ -8,8 +8,8 @@ import ( "fmt" "testing" - "github.com/mulgadc/spinifex/spinifex/network/subscribers" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/subscribers" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/nats-io/nats.go" "github.com/stretchr/testify/require" ) diff --git a/tests/integration/vpc_sg_test.go b/tests/integration/vpc_sg_test.go index c82522539..5716ab464 100644 --- a/tests/integration/vpc_sg_test.go +++ b/tests/integration/vpc_sg_test.go @@ -8,7 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/stretchr/testify/require" ) diff --git a/tests/integration/vpc_topology_test.go b/tests/integration/vpc_topology_test.go index b1bc21d58..84d2d6456 100644 --- a/tests/integration/vpc_topology_test.go +++ b/tests/integration/vpc_topology_test.go @@ -9,7 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/mulgadc/spinifex/spinifex/network/topology" + "github.com/mulgadc/spinifex/spinifex/domains/network/topology" "github.com/stretchr/testify/require" ) diff --git a/tests/integration/vpcd_lite.go b/tests/integration/vpcd_lite.go index a955426c5..9a75763dc 100644 --- a/tests/integration/vpcd_lite.go +++ b/tests/integration/vpcd_lite.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/network/ovn" - "github.com/mulgadc/spinifex/spinifex/network/subscribers" + "github.com/mulgadc/spinifex/spinifex/domains/network/ovn" + "github.com/mulgadc/spinifex/spinifex/domains/network/subscribers" vpcdfixture "github.com/mulgadc/spinifex/tests/fixtures/vpcd" "github.com/stretchr/testify/require" )