Skip to content

Commit

Permalink
dummy down GET-STORAGE-INFO so not broken on lvm, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-moody committed Oct 19, 2016
1 parent 4872853 commit 6c6fe3e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion roles/xsce-admin/files/cmdsrv/xsce-cmdsrv
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def cmd_handler(cmd_msg):
"SET-CONF": set_config_vars,
"GET-MEM-INFO": get_mem_info,
"GET-SPACE-AVAIL": get_space_avail,
"GET-STORAGE-INFO": get_storage_info,
"GET-STORAGE-INFO": get_storage_info_lite,
"RUN-ANSIBLE": run_ansible,
"RESET-NETWORK": run_ansible,
"GET-JOB-STAT": get_last_jobs_stat,
Expand Down Expand Up @@ -786,6 +786,14 @@ def get_space_avail(cmd_info):
resp = cmd_error(cmd_info['cmd'], "No root partition found")
return (resp)

def get_storage_info_lite(cmd_info):
outp = subprocess.check_output(["/usr/bin/df", "-l"])
json_outp = json_array("system_fs", outp)
return (json_outp)

# the following does not work on lvm or raid or iso usb drives
# we wil fix later

def get_storage_info(cmd_info):
system_storage = []
cmd = "lsblk -aP -o NAME,FSTYPE,TYPE,SIZE,MOUNTPOINT,LABEL,UUID,PARTLABEL,PARTUUID,MODEL"
Expand Down

0 comments on commit 6c6fe3e

Please sign in to comment.