modify spelling error of resource

Change-Id: I921ead0076b87173a4627370cbcd5fd2ee344437
This commit is contained in:
lvxianguo 2018-01-17 17:11:13 +08:00
parent 68077c61af
commit d42e200b87

View File

@ -188,7 +188,7 @@ def _get_entity(cloud, resource, name_or_id, filters, **kwargs):
return name_or_id return name_or_id
# If a uuid is passed short-circuit it calling the # If a uuid is passed short-circuit it calling the
# get_<resorce_name>_by_id method # get_<resource_name>_by_id method
if getattr(cloud, 'use_direct_get', False) and _is_uuid_like(name_or_id): if getattr(cloud, 'use_direct_get', False) and _is_uuid_like(name_or_id):
get_resource = getattr(cloud, 'get_%s_by_id' % resource, None) get_resource = getattr(cloud, 'get_%s_by_id' % resource, None)
if get_resource: if get_resource: