placement_client.py (openstack-cyborg-8.0.0) | : | placement_client.py (openstack-cyborg-9.0.0) | ||
---|---|---|---|---|
skipping to change at line 319 | skipping to change at line 319 | |||
# On conflict, the caller may wish to delete allocations and | # On conflict, the caller may wish to delete allocations and | |||
# redrive. (Note that this is not the same as a | # redrive. (Note that this is not the same as a | |||
# PlacementAPIConflict case.) | # PlacementAPIConflict case.) | |||
if resp.status_code == 409: | if resp.status_code == 409: | |||
raise exception.ResourceProviderInUse() | raise exception.ResourceProviderInUse() | |||
raise exception.ResourceProviderDeletionFailed(uuid=rp_uuid) | raise exception.ResourceProviderDeletionFailed(uuid=rp_uuid) | |||
def delete_rc_by_name(self, context, name): | def delete_rc_by_name(self, context, name): | |||
"""Delete resource class from placement by name.""" | """Delete resource class from placement by name.""" | |||
resp = self.delete( | resp = self.delete( | |||
"/resouce_classes/%s" % name, global_request_id=context.global_id) | "/resource_classes/%s" % name, global_request_id=context.global_id) | |||
if not resp: | if not resp: | |||
msg = ("Failed to delete resource class record with placement " | msg = ("Failed to delete resource class record with placement " | |||
"API for resource class %(rc_name)s. Got " | "API for resource class %(rc_name)s. Got " | |||
"%(status_code)d: %(err_text)s.") | "%(status_code)d: %(err_text)s.") | |||
args = { | args = { | |||
'rc_name': name, | 'rc_name': name, | |||
'status_code': resp.status_code, | 'status_code': resp.status_code, | |||
'err_text': resp.text, | 'err_text': resp.text, | |||
} | } | |||
LOG.error(msg, args) | LOG.error(msg, args) | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |