Jerico Revote created LIBCLOUD-385:
--------------------------------------
Summary: Provider.CLOUDFILES_SWIFT/CloudFilesSwiftConnection
invalid endpoint.
Key: LIBCLOUD-385
URL: https://issues.apache.org/jira/browse/LIBCLOUD-385
Project: Libcloud
Issue Type: Bug
Reporter: Jerico Revote
I'm using Provider.CLOUDFILES_SWIFT to interact with our private swift service.
Any container commands (e.g list_containers, get_container, etc.) I issue gives
the following error:
raise LibcloudError('Could not find specified endpoint')
libcloud.common.types.LibcloudError: <LibcloudError in None 'Could not find
specified endpoint'>
Looking at the code, seems like the service name parameter in get_endpoint is
hard-coded to "swift":
class CloudFilesSwiftConnection(CloudFilesConnection):
"""
Connection class for the Cloudfiles Swift endpoint.
"""
def __init__(self, *args, **kwargs):
self.region_name = kwargs.pop('ex_region_name', None)
super(CloudFilesSwiftConnection, self).__init__(*args, **kwargs)
def get_endpoint(self, *args, **kwargs):
if '2.0' in self._auth_version:
endpoint = self.service_catalog.get_endpoint(
service_type='object-store',
name='swift',
region=self.region_name)
elif ('1.1' in self._auth_version) or ('1.0' in self._auth_version):
endpoint = self.service_catalog.get_endpoint(
name='swift', region=self.region_name)
if 'publicURL' in endpoint:
return endpoint['publicURL']
else:
raise LibcloudError('Could not find specified endpoint')
Our service name is called "Object Storage Service", so any service name other
than swift fill result in the same endpoint error.
So, could this be parameterised instead of being a hard-coded value?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira