@@ -102,8 +102,7 @@ def get_parser(self, prog_name):
102102 "--rxtx-factor" ,
103103 type = float ,
104104 metavar = "<factor>" ,
105- default = 1.0 ,
106- help = _ ("RX/TX factor (default 1.0)" ),
105+ help = _ ("RX/TX factor" ),
107106 )
108107 public_group = parser .add_mutually_exclusive_group ()
109108 public_group .add_argument (
@@ -177,10 +176,19 @@ def take_action(self, parsed_args):
177176 'id' : flavor_id ,
178177 'ephemeral' : parsed_args .ephemeral ,
179178 'swap' : parsed_args .swap ,
180- 'rxtx_factor' : parsed_args .rxtx_factor ,
181179 'is_public' : parsed_args .public ,
182180 }
183181
182+ if parsed_args .rxtx_factor :
183+ if sdk_utils .supports_microversion (compute_client , '2.102' ):
184+ msg = _ (
185+ 'The --rxtx-factor parameter is only supported until '
186+ 'API microversion 2.101'
187+ )
188+ raise exceptions .CommandError (msg )
189+
190+ args ['rxtx_factor' ] = parsed_args .rxtx_factor
191+
184192 if parsed_args .description :
185193 if not sdk_utils .supports_microversion (compute_client , '2.55' ):
186194 msg = _ (
@@ -206,6 +214,7 @@ def take_action(self, parsed_args):
206214 "Failed to add project %(project)s access to flavor: %(e)s"
207215 )
208216 LOG .error (msg , {'project' : parsed_args .project , 'e' : e })
217+
209218 if parsed_args .properties :
210219 try :
211220 flavor = compute_client .create_flavor_extra_specs (
0 commit comments