diff options
author | Aravinda VK <avishwan@redhat.com> | 2015-05-05 18:20:19 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-07 03:20:54 -0700 |
commit | f93bf09cdb417cf5e09206164a16ad9435285b45 (patch) | |
tree | e10a47a58733d98c5ae5b205075ab9bb73833388 | |
parent | 394246d5416c3166e8fb3c8f92a5027c86decebd (diff) |
geo-rep: Fix Default values in Xml output
Default Values for last_synced, checkpoint_time and
checkpoint_completion_time was zero instead of 'N/A'
BUG: 1212410
Change-Id: Ie775508f8dcb9ba6f311946a2039739e4336d9a6
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/10580
Reviewed-by: darshan n <dnarayan@redhat.com>
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | geo-replication/syncdaemon/gsyncdstatus.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/gsyncdstatus.py b/geo-replication/syncdaemon/gsyncdstatus.py index a49b9c23dea..7268e26d629 100644 --- a/geo-replication/syncdaemon/gsyncdstatus.py +++ b/geo-replication/syncdaemon/gsyncdstatus.py @@ -310,6 +310,15 @@ class GeorepStatus(object): if data["worker_status"] not in ["Active", "Passive"]: data["slave_node"] = DEFAULT_STATUS + if data["last_synced_utc"] == 0: + data["last_synced_utc"] = DEFAULT_STATUS + + if data["checkpoint_completion_time_utc"] == 0: + data["checkpoint_completion_time_utc"] = DEFAULT_STATUS + + if data["checkpoint_time_utc"] == 0: + data["checkpoint_time_utc"] = DEFAULT_STATUS + return data def print_status(self, checkpoint_time=0): |