You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2013/08/19 20:32:02 UTC

[1/2] git commit: Store last_modified timestamp in the Object extra dictionary in the S3 driver.

Updated Branches:
  refs/heads/trunk d173f21b8 -> b42a58b8e


Store last_modified timestamp in the Object extra dictionary in the S3 driver.

Contributed by Stefan Friesel, part of LIBCLOUD-373.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/af8b747a
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/af8b747a
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/af8b747a

Branch: refs/heads/trunk
Commit: af8b747a3d9f3893a9b0d52566acb71a563d57f8
Parents: d173f21
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Aug 19 19:37:32 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Aug 19 19:38:59 2013 +0200

----------------------------------------------------------------------
 CHANGES                          | 4 ++++
 libcloud/storage/drivers/s3.py   | 6 +++++-
 libcloud/test/storage/test_s3.py | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/af8b747a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2c1be7c..5f29488 100644
--- a/CHANGES
+++ b/CHANGES
@@ -71,6 +71,10 @@ Changes with Apache Libcloud in development
       and CloudFiles driver. (LIBCLOUD-369)
       [Stefan Friesel]
 
+    - Store last_modified timestamp in the Object extra dictionary in the S3
+      driver. (LIBCLOUD-373)
+      [Stefan Friesel]
+
   *) Load Balancer
 
    - Expose CloudStack driver directly through the Provider.CLOUDSTACK

http://git-wip-us.apache.org/repos/asf/libcloud/blob/af8b747a/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index db22c7f..9930641 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -881,6 +881,10 @@ class S3StorageDriver(StorageDriver):
                                       namespace=self.namespace)
         meta_data = {'owner': {'id': owner_id,
                                'display_name': owner_display_name}}
+        last_modified = findtext(element=element,
+                                 xpath='LastModified',
+                                 namespace=self.namespace)
+        extra = {'last_modified': last_modified}
 
         obj = Object(name=findtext(element=element, xpath='Key',
                                    namespace=self.namespace),
@@ -888,7 +892,7 @@ class S3StorageDriver(StorageDriver):
                                        namespace=self.namespace)),
                      hash=findtext(element=element, xpath='ETag',
                                    namespace=self.namespace).replace('"', ''),
-                     extra=None,
+                     extra=extra,
                      meta_data=meta_data,
                      container=container,
                      driver=self

http://git-wip-us.apache.org/repos/asf/libcloud/blob/af8b747a/libcloud/test/storage/test_s3.py
----------------------------------------------------------------------
diff --git a/libcloud/test/storage/test_s3.py b/libcloud/test/storage/test_s3.py
index 9de324e..75c6789 100644
--- a/libcloud/test/storage/test_s3.py
+++ b/libcloud/test/storage/test_s3.py
@@ -460,6 +460,7 @@ class S3Tests(unittest.TestCase):
         self.assertEqual(obj.hash, '4397da7a7649e8085de9916c240e8166')
         self.assertEqual(obj.size, 1234567)
         self.assertEqual(obj.container.name, 'test_container')
+        self.assertEqual(obj.extra['last_modified'], '2011-04-09T19:05:18.000Z')
         self.assertTrue('owner' in obj.meta_data)
 
     def test_list_container_objects_iterator_has_more(self):


[2/2] git commit: docs: Fix some Sphinx build warnings.

Posted by to...@apache.org.
docs: Fix some Sphinx build warnings.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b42a58b8
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b42a58b8
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b42a58b8

Branch: refs/heads/trunk
Commit: b42a58b8efc571fad2a76f585452c1e713c72213
Parents: af8b747
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Aug 19 20:30:13 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Aug 19 20:30:13 2013 +0200

----------------------------------------------------------------------
 docs/developer_information.rst | 6 +++---
 docs/development.rst           | 3 ++-
 docs/supported_providers.rst   | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b42a58b8/docs/developer_information.rst
----------------------------------------------------------------------
diff --git a/docs/developer_information.rst b/docs/developer_information.rst
index bb3add5..f7459cf 100644
--- a/docs/developer_information.rst
+++ b/docs/developer_information.rst
@@ -11,12 +11,12 @@ lists.
 
 * `users@libcloud.apache.org`_ - Mailing list for general talk about Libcloud
   and other off-topic things
-  (`archive <https://mail-archives.apache.org/mod_mbox/libcloud-users/>`_)
+  (`users-archive <https://mail-archives.apache.org/mod_mbox/libcloud-users/>`_)
 * `dev@libcloud.apache.org`_ - General mailing list for developers
-  (`archive <https://mail-archives.apache.org/mod_mbox/libcloud-dev/>`_)
+  (`dev-archive <https://mail-archives.apache.org/mod_mbox/libcloud-dev/>`_)
 * `commits@libcloud.apache.org`_ - Commits messages go to this mailing list.
   Keep ind mind that unlike the others, this mailing list is fairly noisy.
-  (`archive <https://mail-archives.apache.org/mod_mbox/libcloud-commits/>`_)
+  (`commits-archive <https://mail-archives.apache.org/mod_mbox/libcloud-commits/>`_)
 
 Archive of old incubator mailing lists:
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/b42a58b8/docs/development.rst
----------------------------------------------------------------------
diff --git a/docs/development.rst b/docs/development.rst
index 40d7fe4..b7b24ad 100644
--- a/docs/development.rst
+++ b/docs/development.rst
@@ -63,6 +63,7 @@ of date.
 You are advised to add a separate remote for the official upstream repository:
 
 .. sourcecode:: bash
+
     git remote add upstream https://git-wip-us.apache.org/repos/asf/libcloud.git
 
 Github read-only mirror is used only for pull requests and code review. Once a
@@ -71,7 +72,7 @@ ready to be merged, user who submitted the pull request must close the pull
 request, create a patch and attach it to the original JIRA ticket.
 
 Contributing Bigger Changes
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
 If you are contributing a bigger change (e.g. large new feature or a new
 provider driver) you need to have have signed Apache Individual Contributor
 License Agreement (ICLA) in order to have your patch accepted.

http://git-wip-us.apache.org/repos/asf/libcloud/blob/b42a58b8/docs/supported_providers.rst
----------------------------------------------------------------------
diff --git a/docs/supported_providers.rst b/docs/supported_providers.rst
index cb53e07..3612e61 100644
--- a/docs/supported_providers.rst
+++ b/docs/supported_providers.rst
@@ -4,7 +4,7 @@ Supported Providers
 This pages lists supported providers and methods for all the APIs.
 
 Compute
-------
+-------
 
 Provider Matrix
 ~~~~~~~~~~~~~~~