Use of typing.Literal in standardized op-mode scripts provides arpgparse 'choices' for the CLI script and enum types for the API.
For example, adding:
ArgFamily = typing.Literal["inet", "inet6"] ... def show(raw: bool, family: ArgFamily, ...
to op-mode/route.py, may be used by opmode.py, respectively, schema_from_op_mode.py to provide:
root@vyos:/usr/libexec/vyos/op_mode# ./route.py show -h usage: route.py show [-h] [--raw] --family {inet,inet6} ...
respectively:
enum FamilyRoute { inet inet6 } input ShowRouteInput { key: String family: FamilyRoute! net: String = null table: Int = null protocol: String = null vrf: String = null tag: String = null ...