Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
c2818870
Commit
c2818870
authored
Jan 04, 2016
by
wangyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix aliyun disk bug
parent
ed6559bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
asset_api.py
jasset/asset_api.py
+1
-3
No files found.
jasset/asset_api.py
View file @
c2818870
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment