libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomaz Muraus (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LIBCLOUD-385) Provider.CLOUDFILES_SWIFT/CloudFilesSwiftConnection invalid endpoint.
Date Wed, 04 Sep 2013 19:02:56 GMT

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

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

Sorry for the delay, I've missed out this issue.

Yes, I do think both service_type and name should be parameterised. I'll try to get a patch
out in the next couple of days.
                
> 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

Mime
View raw message