Repository: aurora
Updated Branches:
  refs/heads/master aabb69281 -> 7a69ca22f


Improve client update json output to consistently use last_modified.

Bugs closed: AURORA-1316

Reviewed at https://reviews.apache.org/r/34015/


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

Branch: refs/heads/master
Commit: 7a69ca22f650932fa6d3433a541c66c7a9bddade
Parents: aabb692
Author: Joe Smith <yasumo...@gmail.com>
Authored: Mon May 11 17:41:25 2015 -0700
Committer: Bill Farner <wfar...@apache.org>
Committed: Mon May 11 17:41:25 2015 -0700

----------------------------------------------------------------------
 src/main/python/apache/aurora/client/cli/update.py       | 4 ++--
 src/test/python/apache/aurora/client/cli/test_supdate.py | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/7a69ca22/src/main/python/apache/aurora/client/cli/update.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/update.py 
b/src/main/python/apache/aurora/client/cli/update.py
index 58f0db0..70f6c69 100644
--- a/src/main/python/apache/aurora/client/cli/update.py
+++ b/src/main/python/apache/aurora/client/cli/update.py
@@ -414,7 +414,7 @@ updates matching any of the specified statuses will be 
included."""),
             "id": summary.key.id,
             "user": summary.user,
             "started": format_timestamp(summary.state.createdTimestampMs),
-            "lastModified": 
format_timestamp(summary.state.lastModifiedTimestampMs),
+            "last_modified": 
format_timestamp(summary.state.lastModifiedTimestampMs),
             "status": JobUpdateStatus._VALUES_TO_NAMES[summary.state.status]
         }
         result.append(job_entry)
@@ -470,7 +470,7 @@ class UpdateInfo(Verb):
         "updateId": ("%s" % details.update.summary.key.id),
         "job": str(context.options.jobspec),
         "started": details.update.summary.state.createdTimestampMs,
-        "last_updated": details.update.summary.state.lastModifiedTimestampMs,
+        "last_modified": 
format_timestamp(details.update.summary.state.lastModifiedTimestampMs),
         "status": 
JobUpdateStatus._VALUES_TO_NAMES[details.update.summary.state.status],
         "update_events": [],
         "instance_update_events": []

http://git-wip-us.apache.org/repos/asf/aurora/blob/7a69ca22/src/test/python/apache/aurora/client/cli/test_supdate.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_supdate.py 
b/src/test/python/apache/aurora/client/cli/test_supdate.py
index 158d330..c6b6ccc 100644
--- a/src/test/python/apache/aurora/client/cli/test_supdate.py
+++ b/src/test/python/apache/aurora/client/cli/test_supdate.py
@@ -273,7 +273,7 @@ west/bozo/test/hello                            update_id
         {
             "status": "ROLLED_FORWARD",
             "started": "1970-01-17T08:03:24",
-            "lastModified": "1970-06-13T08:34:16",
+            "last_modified": "1970-06-13T08:34:16",
             "user": "me",
             "job": "west/bozo/test/hello",
             "id": "update_id"
@@ -281,7 +281,7 @@ west/bozo/test/hello                            update_id
         {
             "status": "ROLLED_FORWARD",
             "started": "1970-01-17T08:03:24",
-            "lastModified": "1970-06-13T08:34:16",
+            "last_modified": "1970-06-13T08:34:16",
             "user": "me",
             "job": "west/bozo/test/hello",
             "id": "update_id"
@@ -289,7 +289,7 @@ west/bozo/test/hello                            update_id
         {
             "status": "ROLLED_FORWARD",
             "started": "1970-01-17T08:03:24",
-            "lastModified": "1970-06-13T08:34:16",
+            "last_modified": "1970-06-13T08:34:16",
             "user": "me",
             "job": "west/bozo/test/hello",
             "id": "update_id"
@@ -530,7 +530,7 @@ Instance events:
     ]
     assert json.loads(self._fake_context.get_out_str()) == {
         "status": "ROLLING_FORWARD",
-        "last_updated": 2000,
+        "last_modified": "1970-01-01T00:00:02",
         "started": 1000,
         "update_events": [
             {

Reply via email to