libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomaz Muraus (JIRA)" <>
Subject [jira] [Commented] (LIBCLOUD-275) Utility APIs for containers
Date Mon, 07 Apr 2014 15:34:18 GMT


Tomaz Muraus commented on LIBCLOUD-275:

[~rgbkrk] Sorry for the delay.

It sounds like a reasonable first step would be to add `ex_copy_object` extension method to
the driver.

If you feel like doing a bigger chunk of work, you can look at adding this method to the base
API (copy_object).

Also, you said this method only allows you to copy an object within one datacenter. It would
be good to research if any other providers provide a similar functionality which also allows
you to copy an object between different regions. This will help us design a better API.

> Utility APIs for containers
> ---------------------------
>                 Key: LIBCLOUD-275
>                 URL:
>             Project: Libcloud
>          Issue Type: New Feature
>          Components: Storage
>            Reporter: Mahendra M
>            Assignee: Mahendra M
>            Priority: Minor
> While working with libcloud, I thought it will be good to have some utility APIs to containers,
which will help in easier use. Some APIs will have a base class implementation, which can
be easily over-written in each driver based on the storage provider.
> Some APIs that I have in mind are:
> 1. container.copy_object(obj, target_container)
> Copies an object from one container to another. Base class implementation can be
>    target_container.upload_object_via_stream(container.download_object_as_stream(obj),
> In each driver, this can be over-written to use specific methods to do this (AWS, Azure
etc. provide APIs for doing this).
> 2. container.move_object(obj, target_container)
>  Base class implementation can be:
>    container.copy_object(obj, target_container)
>    obj.delete()
>  Again, driver specific extensions can be done.
> 3. container.sync_to_local(local_path, only_missing=True, only_newer=False)
> 4. container.sync_from_local(local_path, followlinks=False, prefix='', only_missing=True,
> The above two functions are good for syncing local folder repos with cloud. The functions
are ridiculously easy to implement and will provide good mechanism for sync. (For eg: syncing
a folder which contains 500 HLS chunks of a video)
> The parameters used are:
> * only_missing - sync only files that missing in the target (container or folder)
> * only_newer - sync only files that have last-modified (or m_time) more than the target
> * prefix - A prefix to be prefixed to each object name while syncing from a local folder.
> I am just opening a ticket so that we can discuss this and finalize it. Once everyone
agree, I can submit/check-in a patch

This message was sent by Atlassian JIRA

View raw message