Skip to content

Commit 7d05466

Browse files
Vasanthm, RaviGitHub Enterprise
authored andcommitted
Addressed the performance issue of show interface transceiver summary cmmand (#135)
1 parent 7fa58f8 commit 7d05466

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CLI/actioner/sonic-cli-pfm.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def run(func, args):
283283
n = nm.replace("/", "%2F")
284284
path = cc.Path(
285285
"/restconf/data/openconfig-platform:components/component="
286-
+ n)
286+
+ n + "/openconfig-platform-transceiver:transceiver")
287287
response = aa.get(path)
288288
if not response.ok():
289289
print((response.error_message()))
@@ -293,7 +293,7 @@ def run(func, args):
293293
continue
294294
try:
295295
xcvrInfo[nm] = response.content[
296-
"openconfig-platform:component"][0]
296+
"openconfig-platform-transceiver:transceiver"]
297297
except:
298298
xcvrInfo[nm] = {}
299299

@@ -303,8 +303,7 @@ def run(func, args):
303303
key=lambda x: ifutils.name_to_int_val(x)):
304304
d2 = OrderedDict()
305305
try:
306-
d = xcvrInfo[val][
307-
"openconfig-platform-transceiver:transceiver"]["state"]
306+
d = xcvrInfo[val]["state"]
308307
for k in d:
309308
a = k
310309
b = d[k]

0 commit comments

Comments
 (0)