|
12 | 12 | @click.command() |
13 | 13 | @click.argument('identifier') |
14 | 14 | @click.option('--domain', '-D', help="Domain portion of the FQDN") |
15 | | -@click.option('--userfile', '-F', |
16 | | - help="Read userdata from file", |
17 | | - type=click.Path(exists=True, readable=True, resolve_path=True)) |
18 | | -@click.option('--tag', '-g', |
19 | | - multiple=True, |
| 15 | +@click.option('--userfile', '-F', type=click.Path(exists=True, readable=True, resolve_path=True), |
| 16 | + help="Read userdata from file") |
| 17 | +@click.option('--tag', '-g', multiple=True, |
20 | 18 | help="Tags to set or empty string to remove all") |
21 | 19 | @click.option('--hostname', '-H', help="Host portion of the FQDN") |
22 | 20 | @click.option('--userdata', '-u', help="User defined metadata string") |
23 | | -@click.option('--public-speed', |
24 | | - help="Public port speed.", |
25 | | - default=None, |
26 | | - type=click.Choice(['0', '10', '100', '1000', '10000'])) |
27 | | -@click.option('--private-speed', |
28 | | - help="Private port speed.", |
29 | | - default=None, |
30 | | - type=click.Choice(['0', '10', '100', '1000', '10000'])) |
| 21 | +@click.option('--public-speed', default=None, type=click.Choice(['0', '10', '100', '1000', '10000', '-1']), |
| 22 | + help="Public port speed. -1 is best speed available") |
| 23 | +@click.option('--private-speed', default=None, type=click.Choice(['0', '10', '100', '1000', '10000', '-1']), |
| 24 | + help="Private port speed. -1 is best speed available") |
31 | 25 | @environment.pass_env |
32 | | -def cli(env, identifier, domain, userfile, tag, hostname, userdata, |
33 | | - public_speed, private_speed): |
| 26 | +def cli(env, identifier, domain, userfile, tag, hostname, userdata, public_speed, private_speed): |
34 | 27 | """Edit hardware details.""" |
35 | 28 |
|
36 | 29 | if userdata and userfile: |
|
0 commit comments