|
12 | 12 |
|
13 | 13 |
|
14 | 14 | @click.command(cls=SoftLayer.CLI.command.SLCommand, context_settings=CONTEXT_SETTINGS)
|
15 |
| -@click.option('--storage-type', |
16 |
| - help='Type of file storage volume', |
17 |
| - type=click.Choice(['performance', 'endurance']), |
18 |
| - required=True) |
19 |
| -@click.option('--size', |
20 |
| - type=int, |
21 |
| - help='Size of file storage volume in GB', |
22 |
| - required=True) |
23 |
| -@click.option('--iops', |
24 |
| - type=int, |
| 15 | +@click.option('--storage-type', required=True, type=click.Choice(['performance', 'endurance']), |
| 16 | + help='Type of file storage volume') |
| 17 | +@click.option('--size', type=int, required=True, |
| 18 | + help='Size of file storage volume in GB') |
| 19 | +@click.option('--iops', type=int, |
25 | 20 | help="""Performance Storage IOPs. Options vary based on storage size.
|
26 | 21 | [required for storage-type performance]""")
|
27 |
| -@click.option('--tier', |
28 |
| - help='Endurance Storage Tier (IOP per GB) [required for storage-type endurance]', |
29 |
| - type=click.Choice(['0.25', '2', '4', '10'])) |
30 |
| -@click.option('-l', '--location', |
31 |
| - help='Datacenter short name (e.g.: dal09)', |
32 |
| - required=True) |
33 |
| -@click.option('--snapshot-size', |
34 |
| - type=int, |
| 22 | +@click.option('--tier', type=click.Choice(['0.25', '2', '4', '10']), |
| 23 | + help='Endurance Storage Tier (IOP per GB) [required for storage-type endurance]') |
| 24 | +@click.option('-l', '--location', required=True, |
| 25 | + help='Datacenter short name (e.g.: dal09)') |
| 26 | +@click.option('--snapshot-size', type=int, |
35 | 27 | help='Optional parameter for ordering snapshot '
|
36 | 28 | 'space along with endurance file storage; specifies '
|
37 | 29 | 'the size (in GB) of snapshot space to order')
|
|
43 | 35 | 'storage_as_a_service',
|
44 | 36 | 'enterprise',
|
45 | 37 | 'performance']))
|
46 |
| -@click.option('--billing', |
47 |
| - type=click.Choice(['hourly', 'monthly']), |
48 |
| - default='monthly', |
| 38 | +@click.option('--billing', type=click.Choice(['hourly', 'monthly']), default='monthly', |
49 | 39 | help="Optional parameter for Billing rate (default to monthly)")
|
50 | 40 | @click.option('--force', default=False, is_flag=True, help="Force order file storage volume without confirmation")
|
51 | 41 | @environment.pass_env
|
@@ -83,6 +73,7 @@ def cli(env, storage_type, size, iops, tier,
|
83 | 73 | 'Hourly billing is only available for the storage_as_a_service service offering'
|
84 | 74 | )
|
85 | 75 |
|
| 76 | + order = {} |
86 | 77 | if storage_type == 'performance':
|
87 | 78 | if iops is None:
|
88 | 79 | raise exceptions.CLIAbort('Option --iops required with Performance')
|
|
0 commit comments