1212
1313
1414@click .command (epilog = "See 'slcli server create-options' for valid options." )
15- @click .option ('--hostname' , '-H' ,
16- help = "Host portion of the FQDN" ,
17- required = True ,
18- prompt = True )
19- @click .option ('--domain' , '-D' ,
20- help = "Domain portion of the FQDN" ,
21- required = True ,
22- prompt = True )
23- @click .option ('--size' , '-s' ,
24- help = "Hardware size" ,
25- required = True ,
26- prompt = True )
27- @click .option ('--os' , '-o' , help = "OS install code" ,
28- required = True ,
29- prompt = True )
30- @click .option ('--datacenter' , '-d' , help = "Datacenter shortname" ,
31- required = True ,
32- prompt = True )
33- @click .option ('--port-speed' ,
34- type = click .INT ,
35- help = "Port speeds" ,
36- required = True ,
37- prompt = True )
38- @click .option ('--billing' ,
15+ @click .option ('--hostname' , '-H' , required = True , prompt = True ,
16+ help = "Host portion of the FQDN" )
17+ @click .option ('--domain' , '-D' , required = True , prompt = True ,
18+ help = "Domain portion of the FQDN" )
19+ @click .option ('--size' , '-s' , required = True , prompt = True ,
20+ help = "Hardware size" )
21+ @click .option ('--os' , '-o' , required = True , prompt = True ,
22+ help = "OS Key value" )
23+ @click .option ('--datacenter' , '-d' , required = True , prompt = True ,
24+ help = "Datacenter shortname" )
25+ @click .option ('--port-speed' , type = click .INT , required = True , prompt = True ,
26+ help = "Port speeds. DEPRECATED, use --network" )
27+ @click .option ('--no-public' , is_flag = True ,
28+ help = "Private network only. DEPRECATED, use --network." )
29+ @click .option ('--network' ,
30+ help = "Network Option Key." )
31+ @click .option ('--billing' , default = 'hourly' , show_default = True ,
3932 type = click .Choice (['hourly' , 'monthly' ]),
40- default = 'hourly' ,
41- show_default = True ,
4233 help = "Billing rate" )
43- @click .option ('--postinstall' , '-i' , help = "Post-install script to download" )
44- @helpers .multi_option ('--key' , '-k' ,
45- help = "SSH keys to add to the root user" )
46- @click .option ('--no-public' ,
47- is_flag = True ,
48- help = "Private network only" )
49- @helpers .multi_option ('--extra' , '-e' , help = "Extra options" )
50- @click .option ('--test' ,
51- is_flag = True ,
34+ @click .option ('--postinstall' , '-i' ,
35+ help = "Post-install script. Should be a HTTPS URL." )
36+ @click .option ('--test' , is_flag = True ,
5237 help = "Do not actually create the server" )
53- @click .option ('--template' , '-t' ,
54- is_eager = True ,
38+ @click .option ('--template' , '-t' , is_eager = True ,
5539 callback = template .TemplateCallback (list_args = ['key' ]),
5640 help = "A template file that defaults the command-line options" ,
5741 type = click .Path (exists = True , readable = True , resolve_path = True ))
58- @click .option ('--export' ,
59- type = click .Path (writable = True , resolve_path = True ),
42+ @click .option ('--export' , type = click .Path (writable = True , resolve_path = True ),
6043 help = "Exports options to a template file" )
61- @click .option ('--wait' ,
62- type = click .INT ,
44+ @click .option ('--wait' , type = click .INT ,
6345 help = "Wait until the server is finished provisioning for up to "
6446 "X seconds before returning" )
47+ @helpers .multi_option ('--key' , '-k' , help = "SSH keys to add to the root user" )
48+ @helpers .multi_option ('--extra' , '-e' , help = "Extra option Key Names" )
6549@environment .pass_env
6650def cli (env , ** args ):
6751 """Order/create a dedicated server."""
@@ -86,6 +70,7 @@ def cli(env, **args):
8670 'port_speed' : args .get ('port_speed' ),
8771 'no_public' : args .get ('no_public' ) or False ,
8872 'extras' : args .get ('extra' ),
73+ 'network' : args .get ('network' )
8974 }
9075
9176 # Do not create hardware server with --test or --export
0 commit comments