@@ -218,30 +218,6 @@ def take_action(self, parsed_args):
218218 ) for s in data ))
219219
220220
221- class ShowFlavor (command .ShowOne ):
222- """Display flavor details"""
223-
224- def get_parser (self , prog_name ):
225- parser = super (ShowFlavor , self ).get_parser (prog_name )
226- parser .add_argument (
227- "flavor" ,
228- metavar = "<flavor>" ,
229- help = "Flavor to display (name or ID)" ,
230- )
231- return parser
232-
233- def take_action (self , parsed_args ):
234- compute_client = self .app .client_manager .compute
235- resource_flavor = utils .find_resource (compute_client .flavors ,
236- parsed_args .flavor )
237- flavor = resource_flavor ._info .copy ()
238- flavor .pop ("links" , None )
239-
240- flavor ['properties' ] = utils .format_dict (resource_flavor .get_keys ())
241-
242- return zip (* sorted (six .iteritems (flavor )))
243-
244-
245221class SetFlavor (command .Command ):
246222 """Set flavor properties"""
247223
@@ -267,6 +243,30 @@ def take_action(self, parsed_args):
267243 flavor .set_keys (parsed_args .property )
268244
269245
246+ class ShowFlavor (command .ShowOne ):
247+ """Display flavor details"""
248+
249+ def get_parser (self , prog_name ):
250+ parser = super (ShowFlavor , self ).get_parser (prog_name )
251+ parser .add_argument (
252+ "flavor" ,
253+ metavar = "<flavor>" ,
254+ help = "Flavor to display (name or ID)" ,
255+ )
256+ return parser
257+
258+ def take_action (self , parsed_args ):
259+ compute_client = self .app .client_manager .compute
260+ resource_flavor = utils .find_resource (compute_client .flavors ,
261+ parsed_args .flavor )
262+ flavor = resource_flavor ._info .copy ()
263+ flavor .pop ("links" , None )
264+
265+ flavor ['properties' ] = utils .format_dict (resource_flavor .get_keys ())
266+
267+ return zip (* sorted (six .iteritems (flavor )))
268+
269+
270270class UnsetFlavor (command .Command ):
271271 """Unset flavor properties"""
272272
0 commit comments