#!/usr/bin/env bash
# fake maas: serves read endpoints from fixture files; dry-run never calls mutations.
prof="${1:-}"; obj="${2:-}"; act="${3:-}"
[ "$obj" = machines ]   && [ "$act" = read ] && { cat "${FIX_MACHINES:?}"; exit 0; }
[ "$obj" = machine ]    && [ "$act" = read ] && { cat "${FIX_MACHINE:?}";  exit 0; }
[ "$obj" = subnets ]    && [ "$act" = read ] && { cat "${FIX_SUBNETS:?}";  exit 0; }
[ "$obj" = interfaces ] && [ "$act" = read ] && { cat "${FIX_IFACES:?}";   exit 0; }
echo "{}"; exit 0   # unexpected (mutations) -- never hit in dry-run
