11import click
22from . import _init , _list , _show , _create , _update , _delete , _act
33
4- headers = ['name' , 'flavor' , 'zone' , 'tags' , 'uuid' , 'status' ]
4+ headers = ['name' , 'image' , ' flavor' , 'zone' , 'tags' , 'server_groups ' , 'uuid' , 'status' ]
55
66@click .group ()
77@click .option ('--api-token' , '-a' , envvar = 'CLOUDSCALE_API_TOKEN' , help = "API token." )
@@ -41,17 +41,17 @@ def cmd_show(cloudscale, uuid):
4141@click .option ('--flavor' , required = True )
4242@click .option ('--image' , required = True )
4343@click .option ('--zone' )
44- @click .option ('--volume-size' , type = int )
45- @click .option ('--volumes' , multiple = True )
46- @click .option ('--interfaces' , multiple = True )
47- @click .option ('--ssh-keys ' , multiple = True )
44+ @click .option ('--volume-size' , type = int , default = 10 )
45+ @click .option ('--volume' , ' volumes' , multiple = True )
46+ @click .option ('--interface' , ' interfaces' , multiple = True )
47+ @click .option ('--ssh-key' , 'ssh_keys ' , multiple = True )
4848@click .option ('--password' )
49- @click .option ('--use-public-network' , is_flag = True , default = True )
50- @click .option ('--use-private-network' , is_flag = True )
51- @click .option ('--use-ipv6' , is_flag = True )
52- @click .option ('--server-groups ' , multiple = True )
49+ @click .option ('--use-public-network/--no-use-public-network' , default = True )
50+ @click .option ('--use-private-network/--no-use-private-network ' , default = False )
51+ @click .option ('--use-ipv6/--no-use-ipv6 ' , default = True )
52+ @click .option ('--server-group' , 'server_groups ' , multiple = True )
5353@click .option ('--user-data' )
54- @click .option ('--tags' , multiple = True )
54+ @click .option ('--tag' , ' tags' , multiple = True )
5555@server .command ("create" )
5656@click .pass_obj
5757def cmd_create (
@@ -95,12 +95,13 @@ def cmd_create(
9595@click .argument ('uuid' , required = True )
9696@click .option ('--name' )
9797@click .option ('--flavor' )
98- @click .option ('--tags' , multiple = True )
99- @click .option ('--clear-tags' , multiple = True )
98+ @click .option ('--interface' , 'interfaces' , multiple = True )
99+ @click .option ('--tag' , 'tags' , multiple = True )
100+ @click .option ('--clear-tag' , 'clear_tags' , multiple = True )
100101@click .option ('--clear-all-tags' , is_flag = True )
101102@server .command ("update" )
102103@click .pass_obj
103- def cmd_update (cloudscale , uuid , name , flavor , tags , clear_tags , clear_all_tags ):
104+ def cmd_update (cloudscale , uuid , name , flavor , interfaces , tags , clear_tags , clear_all_tags ):
104105 resource = cloudscale .server
105106 _update (
106107 resource = resource ,
@@ -110,6 +111,7 @@ def cmd_update(cloudscale, uuid, name, flavor, tags, clear_tags, clear_all_tags)
110111 clear_all_tags = clear_all_tags ,
111112 name = name ,
112113 flavor = flavor ,
114+ interfaces = interfaces ,
113115 )
114116
115117@click .argument ('uuid' , required = True )
0 commit comments