summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-23 15:32:30 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-23 15:32:30 +0900
commit247ae24d08fa0c695b13ea29dad5294b0e3fa418 (patch)
tree4e7a66bea8c4b38283a10594c205b4abd5c4acce
parent07310dec12ca1d8e9dc0f04798ed4cac9bd0dd6d (diff)
table: rename Time in Path to Age
More appropriate. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rwxr-xr-xcli/gobgpcli4
-rw-r--r--table/path.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/cli/gobgpcli b/cli/gobgpcli
index 0656c290..15b3f75e 100755
--- a/cli/gobgpcli
+++ b/cli/gobgpcli
@@ -242,7 +242,7 @@ class Show(object):
if timestamp:
f = "{:2s} {:18s} {:15s} {:10s} {:10s} {:s}"
- print(f.format("", "Network", "Next Hop", "AS_PATH", "Time", "Attrs"))
+ print(f.format("", "Network", "Next Hop", "AS_PATH", "Age", "Attrs"))
else:
f = "{:2s} {:18s} {:15s} {:10s} {:s}"
print(f.format("", "Network", "Next Hop", "AS_PATH", "Attrs"))
@@ -274,7 +274,7 @@ class Show(object):
else:
header = ""
if timestamp:
- print(f.format(header, p["Network"], p["Nexthop"], AS, self.format_timedelta(p["Time"]), self._format_attrs(p["Attrs"])))
+ print(f.format(header, p["Network"], p["Nexthop"], AS, self.format_timedelta(p["Age"]), self._format_attrs(p["Attrs"])))
else:
print(f.format(header, p["Network"], p["Nexthop"], AS, self._format_attrs(p["Attrs"])))
diff --git a/table/path.go b/table/path.go
index 391e3298..d847dc1d 100644
--- a/table/path.go
+++ b/table/path.go
@@ -89,12 +89,12 @@ func (pd *PathDefault) MarshalJSON() ([]byte, error) {
Network string
Nexthop string
Attrs []bgp.PathAttributeInterface
- Time float64
+ Age float64
}{
Network: pd.getPrefix(),
Nexthop: pd.nexthop.String(),
Attrs: pd.getPathAttrs(),
- Time: time.Now().Sub(pd.timestamp).Seconds(),
+ Age: time.Now().Sub(pd.timestamp).Seconds(),
})
}