From c2818870d3929e94508327c791a00d6d3607fd62 Mon Sep 17 00:00:00 2001 From: wangyong <864072399@qq.com> Date: Mon, 4 Jan 2016 16:37:02 +0800 Subject: [PATCH] fix aliyun disk bug --- jasset/asset_api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jasset/asset_api.py b/jasset/asset_api.py index ca733cad0..3385fd4b8 100644 --- a/jasset/asset_api.py +++ b/jasset/asset_api.py @@ -311,13 +311,11 @@ def excel_to_db(excel_file): def get_ansible_asset_info(asset_ip, setup_info): - print asset_ip disk_need = {} disk_all = setup_info.get("ansible_devices") if disk_all: for disk_name, disk_info in disk_all.iteritems(): - print disk_name, disk_info - if disk_name.startswith('sd') or disk_name.startswith('hd') or disk_name.startswith('vd'): + if disk_name.startswith('sd') or disk_name.startswith('hd') or disk_name.startswith('vd') or disk_name.startswith('xvd'): disk_size = disk_info.get("size", '') if 'M' in disk_size: disk_format = round(float(disk_size[:-2]) / 1000, 0)