3232
3333
3434class CreateKeypair (command .ShowOne ):
35- """Create new public key"""
35+ """Create new public or private key for server ssh access """
3636
3737 def get_parser (self , prog_name ):
3838 parser = super (CreateKeypair , self ).get_parser (prog_name )
3939 parser .add_argument (
4040 'name' ,
4141 metavar = '<name>' ,
42- help = _ ("New public key name" )
42+ help = _ ("New public or private key name" )
4343 )
4444 parser .add_argument (
4545 '--public-key' ,
4646 metavar = '<file>' ,
47- help = _ ("Filename for public key to add" )
47+ help = _ ("Filename for public key to add. If not used, "
48+ "creates a private key." )
4849 )
4950 return parser
5051
@@ -82,15 +83,15 @@ def take_action(self, parsed_args):
8283
8384
8485class DeleteKeypair (command .Command ):
85- """Delete public key(s)"""
86+ """Delete public or private key(s)"""
8687
8788 def get_parser (self , prog_name ):
8889 parser = super (DeleteKeypair , self ).get_parser (prog_name )
8990 parser .add_argument (
9091 'name' ,
9192 metavar = '<key>' ,
9293 nargs = '+' ,
93- help = _ ("Public key(s) to delete (name only)" )
94+ help = _ ("Name of key(s) to delete (name only)" )
9495 )
9596 return parser
9697
@@ -104,19 +105,19 @@ def take_action(self, parsed_args):
104105 compute_client .keypairs .delete (data .name )
105106 except Exception as e :
106107 result += 1
107- LOG .error (_ ("Failed to delete public key with name "
108+ LOG .error (_ ("Failed to delete key with name "
108109 "'%(name)s': %(e)s" )
109110 % {'name' : n , 'e' : e })
110111
111112 if result > 0 :
112113 total = len (parsed_args .name )
113- msg = (_ ("%(result)s of %(total)s public keys failed "
114+ msg = (_ ("%(result)s of %(total)s keys failed "
114115 "to delete." ) % {'result' : result , 'total' : total })
115116 raise exceptions .CommandError (msg )
116117
117118
118119class ListKeypair (command .Lister ):
119- """List public key fingerprints"""
120+ """List key fingerprints"""
120121
121122 def take_action (self , parsed_args ):
122123 compute_client = self .app .client_manager .compute
@@ -133,20 +134,20 @@ def take_action(self, parsed_args):
133134
134135
135136class ShowKeypair (command .ShowOne ):
136- """Display public key details"""
137+ """Display key details"""
137138
138139 def get_parser (self , prog_name ):
139140 parser = super (ShowKeypair , self ).get_parser (prog_name )
140141 parser .add_argument (
141142 'name' ,
142143 metavar = '<key>' ,
143- help = _ ("Public key to display (name only)" )
144+ help = _ ("Public or private key to display (name only)" )
144145 )
145146 parser .add_argument (
146147 '--public-key' ,
147148 action = 'store_true' ,
148149 default = False ,
149- help = _ ("Show only bare public key (name only) " )
150+ help = _ ("Show only bare public key paired with the generated key " )
150151 )
151152 return parser
152153
0 commit comments