[
https://issues.apache.org/jira/browse/LIBCLOUD-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288087#comment-13288087
]
Tomaz Muraus commented on LIBCLOUD-205:
---------------------------------------
Some feedback:
1. Python doesn't support method overloading so if we decide to go with this
approach we need to remove the old get_endpoint method
2. This potentially changes the behavior of the existing drivers (currently all
the drivers explicitly specify a region) so I would do the following:
- Change get_endpoint signature to get_endpoint(self, service_type=None,
name=None) and make it return a first endpoint in the catalog - basically what
you already do
- Add new get_endpoint_for_region(self, service_type=None, name=None,
region=None) method which does the same thing as the current get_endpoint
implementation
- Update all the existing drivers besides cloudfiles to preserve the current
behavior and use get_endpoint_for_region
- Add tests
> Cloud Files Storage driver doesn't work for accounts with DFW endpoints
> -----------------------------------------------------------------------
>
> Key: LIBCLOUD-205
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-205
> Project: Libcloud
> Issue Type: Bug
> Components: Storage
> Affects Versions: 0.10.1
> Environment: OS X 10.7.4, Python 2.7.1
> Reporter: Geoff Greer
> Priority: Minor
> Attachments: example_storage.py, fix_cloud_files.patch, response.json
>
>
> The Cloud Files storage driver assumes the service catalog will have an
> endpoint for ORD. Some Cloud Files accounts have endpoints in DFW instead of
> ORD. Trying to list containers gives the following error for those accounts:
> File "/Users/ggreer/code/libcloud/libcloud/storage/drivers/cloudfiles.py",
> line 229, in list_containers
> response = self.connection.request('')
> File "/Users/ggreer/code/libcloud/libcloud/storage/drivers/cloudfiles.py",
> line 149, in request
> self._populate_hosts_and_request_paths()
> File "/Users/ggreer/code/libcloud/libcloud/common/openstack.py", line 471,
> in _populate_hosts_and_request_paths
> (self.host, self.port, self.secure, self.request_path) =
> self._tuple_from_url(self._ex_force_base_url or self.get_endpoint())
> File "/Users/ggreer/code/libcloud/libcloud/storage/drivers/cloudfiles.py",
> line 136, in get_endpoint
> raise LibcloudError('Could not find specified endpoint')
> libcloud.common.types.LibcloudError: <LibcloudError in None 'Could not find
> specified endpoint'>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira