From b6fdf8b84c7e8011734bc1c8d82365208d1d4ee3 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 25 Nov 2008 12:50:49 +0000
Subject: [PATCH] Show disk access mode in gnt-instance info

The mode parameter needs to be exported and shown in the info output.

Reviewed-by: imsnah
---
 lib/cmdlib.py        | 1 +
 scripts/gnt-instance | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 8299dad97..94fe313f7 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4602,6 +4602,7 @@ class LUQueryInstanceData(NoHooksLU):
       "pstatus": dev_pstatus,
       "sstatus": dev_sstatus,
       "children": dev_children,
+      "mode": dev.mode,
       }
 
     return data
diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index a28a9979f..95496b0e9 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -913,6 +913,7 @@ def _FormatBlockDevInfo(buf, dev, indent_level, static):
     data = "  - %s, " % dev["iv_name"]
   else:
     data = "  - "
+  data += "access mode: %s, " % dev["mode"]
   data += "type: %s" % dev["dev_type"]
   if dev["logical_id"] is not None:
     data += ", logical_id: %s" % (dev["logical_id"],)
-- 
GitLab