Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Fix - disk size key
Browse files Browse the repository at this point in the history
  • Loading branch information
azzamsa committed May 19, 2020
1 parent 811c9a2 commit 043b52e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyvcloud/vcd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,10 @@ def disk_to_dict(disk):
result['name'] = disk.get('name')
result['id'] = extract_id(disk.get('id'))
result['status'] = disk.get('status')
result['size'] = humanfriendly.format_size(int(disk.get('size')))
result['size_bytes'] = disk.get('size')
if 'sizeMb' in disk.keys():
size_key = 'sizeMb'
result['size'] = humanfriendly.format_size(int(disk.get(size_key)))
result['size_bytes'] = disk.get(size_key)
result['busType'] = disk.get('busType')
result['busSubType'] = disk.get('busSubType')
result['iops'] = disk.get('iops')
Expand Down

0 comments on commit 043b52e

Please sign in to comment.