#!/usr/bin/env bash
# fake maas: 'admin subnets read' -> provider subnet with gateway $GW (default 10.12.4.1)
if [ "${1:-}" = admin ] && [ "${2:-}" = subnets ] && [ "${3:-}" = read ]; then
  printf '[{"id":1,"cidr":"10.12.4.0/22","gateway_ip":"%s"}]\n' "${GW:-10.12.4.1}"
fi
