@@ -1039,12 +1039,10 @@ def _resize(self, req, instance_id, flavor_id, auto_disk_config=None):
1039
1039
try :
1040
1040
self .compute_api .resize (context , instance , flavor_id ,
1041
1041
auto_disk_config = auto_disk_config )
1042
- except (exception .QuotaError ,
1043
- exception .ForbiddenWithAccelerators ) as error :
1042
+ except exception .QuotaError as error :
1044
1043
raise exc .HTTPForbidden (
1045
1044
explanation = error .format_message ())
1046
1045
except (
1047
- exception .OperationNotSupportedForVDPAInterface ,
1048
1046
exception .InstanceIsLocked ,
1049
1047
exception .InstanceNotReady ,
1050
1048
exception .MixedInstanceNotSupportByComputeService ,
@@ -1067,7 +1065,6 @@ def _resize(self, req, instance_id, flavor_id, auto_disk_config=None):
1067
1065
exception .CannotResizeDisk ,
1068
1066
exception .CannotResizeToSameFlavor ,
1069
1067
exception .FlavorNotFound ,
1070
- exception .ForbiddenPortsWithAccelerator ,
1071
1068
exception .ExtendedResourceRequestOldCompute ,
1072
1069
) as e :
1073
1070
raise exc .HTTPBadRequest (explanation = e .format_message ())
@@ -1212,11 +1209,7 @@ def _action_rebuild(self, req, id, body):
1212
1209
image_href ,
1213
1210
password ,
1214
1211
** kwargs )
1215
- except (
1216
- exception .InstanceIsLocked ,
1217
- exception .OperationNotSupportedForVTPM ,
1218
- exception .OperationNotSupportedForVDPAInterface ,
1219
- ) as e :
1212
+ except exception .InstanceIsLocked as e :
1220
1213
raise exc .HTTPConflict (explanation = e .format_message ())
1221
1214
except exception .InstanceInvalidState as state_error :
1222
1215
common .raise_http_conflict_for_instance_invalid_state (state_error ,
@@ -1230,8 +1223,7 @@ def _action_rebuild(self, req, id, body):
1230
1223
except exception .KeypairNotFound :
1231
1224
msg = _ ("Invalid key_name provided." )
1232
1225
raise exc .HTTPBadRequest (explanation = msg )
1233
- except (exception .QuotaError ,
1234
- exception .ForbiddenWithAccelerators ) as error :
1226
+ except exception .QuotaError as error :
1235
1227
raise exc .HTTPForbidden (explanation = error .format_message ())
1236
1228
except (exception .AutoDiskConfigDisabledByImage ,
1237
1229
exception .CertificateValidationFailed ,
0 commit comments