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
9a993992
Commit
9a993992
authored
Sep 08, 2013
by
Charles Blonde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wait_for conversion between String to int
parent
ddb09f11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
library/cloud/nova_compute
+2
-2
No files found.
library/cloud/nova_compute
View file @
9a993992
...
@@ -135,7 +135,7 @@ def _delete_server(module, nova):
...
@@ -135,7 +135,7 @@ def _delete_server(module, nova):
module
.
fail_json
(
msg
=
"Error in deleting vm:
%
s"
%
e
.
message
)
module
.
fail_json
(
msg
=
"Error in deleting vm:
%
s"
%
e
.
message
)
if
module
.
params
[
'wait'
]
==
'no'
:
if
module
.
params
[
'wait'
]
==
'no'
:
module
.
exit_json
(
changed
=
True
,
result
=
"deleted"
)
module
.
exit_json
(
changed
=
True
,
result
=
"deleted"
)
expire
=
time
.
time
()
+
module
.
params
[
'wait_for'
]
expire
=
time
.
time
()
+
int
(
module
.
params
[
'wait_for'
])
while
time
.
time
()
<
expire
:
while
time
.
time
()
<
expire
:
name
=
nova
.
servers
.
list
(
True
,
{
'name'
:
module
.
params
[
'name'
]})
name
=
nova
.
servers
.
list
(
True
,
{
'name'
:
module
.
params
[
'name'
]})
if
not
name
:
if
not
name
:
...
@@ -160,7 +160,7 @@ def _create_server(module, nova):
...
@@ -160,7 +160,7 @@ def _create_server(module, nova):
except
Exception
as
e
:
except
Exception
as
e
:
module
.
fail_json
(
msg
=
"Error in creating instance:
%
s "
%
e
.
message
)
module
.
fail_json
(
msg
=
"Error in creating instance:
%
s "
%
e
.
message
)
if
module
.
params
[
'wait'
]
==
'yes'
:
if
module
.
params
[
'wait'
]
==
'yes'
:
expire
=
time
.
time
()
+
module
.
params
[
'wait_for'
]
expire
=
time
.
time
()
+
int
(
module
.
params
[
'wait_for'
])
while
time
.
time
()
<
expire
:
while
time
.
time
()
<
expire
:
try
:
try
:
server
=
nova
.
servers
.
get
(
server
.
id
)
server
=
nova
.
servers
.
get
(
server
.
id
)
...
...
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