You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Tomaz Muraus (JIRA)" <ji...@apache.org> on 2014/01/06 19:07:53 UTC

[jira] [Commented] (LIBCLOUD-385) Provider.CLOUDFILES_SWIFT/CloudFilesSwiftConnection invalid endpoint.

    [ https://issues.apache.org/jira/browse/LIBCLOUD-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13863174#comment-13863174 ] 

Tomaz Muraus commented on LIBCLOUD-385:
---------------------------------------

[~jrevote] Sorry it took so long, but I've finally fixed this issue in trunk.

Besides that, I also added some documentation which shows how to use a generic CloudFiles driver - https://libcloud.readthedocs.org/en/latest/storage/drivers/openstack_swift.html.



> 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 was sent by Atlassian JIRA
(v6.1.5#6160)