libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Monthe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LIBCLOUD-733) RunAbove Object storage
Date Wed, 19 Aug 2015 14:34:45 GMT

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

Anthony Monthe commented on LIBCLOUD-733:
-----------------------------------------

My driver actually do the following things:
- list containers
- get container
- create container
- delete container
- list container objects
- upload object
- delete object

I've got an issue with download object:
Like in other driver it uses ``self._save_object`` and ``self._get_object`` for write objects
to disk,
But the the first raises an error:
{noformat}
/home/zulu/projects/libcloud/libcloud/storage/base.pyc in download(self, destination_path,
overwrite_existing, delete_on_failure)
     98         return self.driver.download_object(self, destination_path,
     99                                            overwrite_existing,
--> 100                                            delete_on_failure)
    101
    102     def as_stream(self, chunk_size=None):

/home/zulu/projects/libcloud/libcloud/storage/drivers/runabove.py in download_object(self,
obj, destination_path, overwrite_existing, delete_on_failure)
    160         response = conn.request(action, raw=True)
    161         import ipdb; ipdb.set_trace()
--> 162         return self._get_object(
    163             obj=obj, callback=self._save_object, response=response,
    164             callback_kwargs={'response': response, 'obj': obj,

/home/zulu/projects/libcloud/libcloud/storage/base.pyc in _get_object(self, obj, callback,
callback_kwargs, response, success_status_code)
    504
    505         if response.status == success_status_code:
--> 506             return callback(**callback_kwargs)
    507         elif response.status == httplib.NOT_FOUND:
    508             raise ObjectDoesNotExistError(object_name=obj.name,

/home/zulu/projects/libcloud/libcloud/storage/base.pyc in _save_object(self, response, obj,
destination_path, overwrite_existing, delete_on_failure, chunk_size)
    567
    568         try:
--> 569             data_read = next(stream)
    570         except StopIteration:
    571             # Empty response?

/home/zulu/projects/libcloud/libcloud/utils/py3.pyc in next(i)
    178
    179     def next(i):
--> 180         return i.next()
    181
    182     def dictvalues(d):

/home/zulu/projects/libcloud/libcloud/utils/files.pyc in read_in_chunks(iterator, chunk_size,
fill_size, yield_empty)
     72         if not empty:
     73             try:
---> 74                 chunk = b(get_data(*args))
     75                 if len(chunk) > 0:
     76                     data += chunk

/home/zulu/projects/libcloud/libcloud/utils/py3.pyc in next(i)
    178
    179     def next(i):
--> 180         return i.next()
    181
    182     def dictvalues(d):
AttributeError: 'RawResponse' object has no attribute 'next'
{noformat}

Download method's code is here: https://github.com/ZuluPro/libcloud/blob/runabove_storage/libcloud/storage/drivers/runabove.py#L156

> RunAbove Object storage
> -----------------------
>
>                 Key: LIBCLOUD-733
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-733
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Storage
>            Reporter: Anthony Monthe
>            Priority: Minor
>              Labels: features, patch
>
> I began to write RunAbove Object storage driver.
> Current work is here: https://github.com/ZuluPro/libcloud/tree/runabove_storage



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message