summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Asir <tjeyasin@redhat.com>2011-12-08 18:45:56 +0530
committerTimothy Asir <tjeyasin@redhat.com>2011-12-08 18:45:56 +0530
commit7cf5f329aa930ecdecb97670b8b4c53d7c67ff69 (patch)
tree3d4d21182dcbde18d0df9f1afb51773dbcac8224 /src
parent67746b5007b62d0f205858408de89eaf4f29bd0a (diff)
Enhanced get_server_details.py to return partition type as 'swap' if the file system type is 'swap'
Diffstat (limited to 'src')
-rwxr-xr-xsrc/org.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py
index bdb6caa0..956a9e44 100755
--- a/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py
+++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py
@@ -160,6 +160,8 @@ def getDiskDom():
diskTag.appendChild(diskDom.createTag("type", "BOOT"))
elif "UNINITIALIZED" == status:
diskTag.appendChild(diskDom.createTag("type", "UNKNOWN"))
+ elif "swap" == value["FsType"]:
+ diskTag.appendChild(diskDom.createTag("type", "SWAP"))
else:
diskTag.appendChild(diskDom.createTag("type", "DATA"))
diskTag.appendChild(diskDom.createTag("fsType", value["FsType"]))
@@ -182,7 +184,10 @@ def getDiskDom():
partitionTag.appendChild(diskDom.createTag("type", "BOOT"))
elif partValues["FsType"]:
partitionTag.appendChild(diskDom.createTag("status", "INITIALIZED"))
- partitionTag.appendChild(diskDom.createTag("type", "DATA"))
+ if "swap" == partValues["FsType"]:
+ partitionTag.appendChild(diskDom.createTag("type", "SWAP"))
+ else:
+ partitionTag.appendChild(diskDom.createTag("type", "DATA"))
else:
partitionTag.appendChild(diskDom.createTag("status", "UNINITIALIZED"))
partitionTag.appendChild(diskDom.createTag("type", "UNKNOWN"))