#!/usr/bin/env bash
# fake maas: only 'maas admin subnets read' and 'maas admin ipranges read' are emulated,
# each emitting the env-pointed fixture. Anything else emits nothing. Never emulates
# 'maas list' (the real one prints the API key -- DOCFIX-016; the verify must not call it).
prof="${1:-}"; obj="${2:-}"; act="${3:-}"
if [ "$prof" = "admin" ] && [ "$obj" = "subnets" ] && [ "$act" = "read" ]; then
  cat "${FIX_SUBNETS:?FIX_SUBNETS not set}"
elif [ "$prof" = "admin" ] && [ "$obj" = "ipranges" ] && [ "$act" = "read" ]; then
  cat "${FIX_IPRANGES:?FIX_IPRANGES not set}"
fi
