Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
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
OpenEdx
ansible
Commits
19dbff91
Commit
19dbff91
authored
May 13, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly cast the size_gb value for vpshere disks
Fixes #7385
parent
187619c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
library/cloud/vsphere_guest
+3
-5
No files found.
library/cloud/vsphere_guest
View file @
19dbff91
...
...
@@ -725,14 +725,12 @@ def create_vm(vsphere_client, module, esxi, resource_pool, cluster_name, guest,
msg
=
"Error on
%
s definition. datastore needs to be"
" specified."
%
disk
)
try
:
disksize
=
vm_disk
[
disk
][
'size_gb'
]
disksize
=
int
(
vm_disk
[
disk
][
'size_gb'
])
# Convert the disk size to kiloboytes
disksize
=
disksize
*
1024
*
1024
except
KeyError
:
except
(
KeyError
,
ValueError
)
:
vsphere_client
.
disconnect
()
module
.
fail_json
(
msg
=
"Error on
%
s definition. size needs to be"
" specified."
%
disk
)
module
.
fail_json
(
msg
=
"Error on
%
s definition. size needs to be specified as an integer."
%
disk
)
try
:
disktype
=
vm_disk
[
disk
][
'type'
]
except
KeyError
:
...
...
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