|
25 | 25 | from xml.sax.xmlreader import InputSource |
26 | 26 |
|
27 | 27 | from jwt.exceptions import PyJWTError |
28 | | -from milc import set_metadata # this function needed to set metadata immediately below |
| 28 | +# milc metadata will be set after cli import |
29 | 29 | from pygments import highlight |
30 | 30 | from pygments.formatters import Terminal256Formatter |
31 | 31 | from pygments.lexers import get_lexer_by_name, load_lexer_from_file |
|
42 | 42 | from .organization import Organization |
43 | 43 | from .utility import DC_PROVIDERS, EMBED_NET_RESOURCES, IDENTITY_ID_PROPERTIES, MUTABLE_NET_RESOURCES, MUTABLE_RESOURCE_ABBREV, RESOURCE_ABBREV, RESOURCES, any_in, get_generic_resource_by_type_and_id, normalize_caseless, plural, propid2type, singular |
44 | 44 |
|
45 | | -# must precend import milc.cli |
46 | | -set_metadata(version=f"v{netfoundry_version}", author="NetFoundry", name="nfctl") |
47 | | -# this uses metadata set above |
| 45 | +# import milc cli |
48 | 46 | from milc import cli, questions # noqa: E402 |
| 47 | +# set milc options using new API |
| 48 | +cli.milc_options(name='nfctl', author='NetFoundry', version=f'v{netfoundry_version}') |
49 | 49 | # this creates the config subcommand |
50 | 50 | from milc.subcommand import config # noqa: F401,E402 |
51 | 51 |
|
@@ -871,7 +871,7 @@ def delete(cli): |
871 | 871 | sysexit(1) |
872 | 872 |
|
873 | 873 |
|
874 | | -@cli.argument("-p", "--prefix", default=f"{cli.prog_name}-demo", help="choose a network name prefix to identify all of your demos") |
| 874 | +@cli.argument("-p", "--prefix", default="nfctl-demo", help="choose a network name prefix to identify all of your demos") |
875 | 875 | @cli.argument("-j", "--jwt", action="store_boolean", default=True, help="save the one-time enroll token for each demo identity in the current directory") |
876 | 876 | @cli.argument("-e", "--echo-name", arg_only=True, action="store_true", default=False, help="only echo a friendly network name then exit") |
877 | 877 | @cli.argument("-s", "--size", default="medium", help=argparse.SUPPRESS) # troubleshoot scale-up instance size factor |
|
0 commit comments