From 282f78592866205754ca7f74a1248d7b2f7a8278 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 24 Nov 2021 14:49:05 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E6=89=A9=E5=B1=95=E6=80=A7=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/host/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/host/utils.py b/spug_api/apps/host/utils.py index 4333134..28b3b64 100644 --- a/spug_api/apps/host/utils.py +++ b/spug_api/apps/host/utils.py @@ -216,7 +216,7 @@ def fetch_host_extend(ssh): code, out = ssh.exec_command_raw('lsblk -dbn -o SIZE -e 11 2> /dev/null') if code == 0: - for item in out.strip().splitlines(): + for item in out.strip().splitlines()[:10]: item = item.strip() response['disk'].append(math.ceil(int(item) / 1024 / 1024 / 1024))