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
71b5a117
Commit
71b5a117
authored
Apr 11, 2014
by
Matt Bray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docker: from API 1.10 dns and volumes_from should be passed to start()
parent
bb3ce0c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
library/cloud/docker
+10
-2
No files found.
library/cloud/docker
View file @
71b5a117
...
...
@@ -301,6 +301,7 @@ import sys
from
urlparse
import
urlparse
try
:
import
docker.client
import
docker.utils
from
requests.exceptions
import
*
except
ImportError
,
e
:
HAS_DOCKER_PY
=
False
...
...
@@ -524,10 +525,8 @@ class DockerManager:
'command'
:
self
.
module
.
params
.
get
(
'command'
),
'ports'
:
self
.
exposed_ports
,
'volumes'
:
self
.
volumes
,
'volumes_from'
:
self
.
module
.
params
.
get
(
'volumes_from'
),
'mem_limit'
:
_human_to_bytes
(
self
.
module
.
params
.
get
(
'memory_limit'
)),
'environment'
:
self
.
env
,
'dns'
:
self
.
module
.
params
.
get
(
'dns'
),
'hostname'
:
self
.
module
.
params
.
get
(
'hostname'
),
'detach'
:
self
.
module
.
params
.
get
(
'detach'
),
'name'
:
self
.
module
.
params
.
get
(
'name'
),
...
...
@@ -535,6 +534,10 @@ class DockerManager:
'tty'
:
self
.
module
.
params
.
get
(
'tty'
),
}
if
docker
.
utils
.
compare_version
(
'1.10'
,
self
.
client
.
version
()[
'ApiVersion'
])
<
0
:
params
[
'dns'
]
=
self
.
module
.
params
.
get
(
'dns'
)
params
[
'volumes_from'
]
=
self
.
module
.
params
.
get
(
'volumes_from'
)
def
do_create
(
count
,
params
):
results
=
[]
for
_
in
range
(
count
):
...
...
@@ -562,6 +565,11 @@ class DockerManager:
'privileged'
:
self
.
module
.
params
.
get
(
'privileged'
),
'links'
:
self
.
links
,
}
if
docker
.
utils
.
compare_version
(
'1.10'
,
self
.
client
.
version
()[
'ApiVersion'
])
>=
0
:
params
[
'dns'
]
=
self
.
module
.
params
.
get
(
'dns'
)
params
[
'volumes_from'
]
=
self
.
module
.
params
.
get
(
'volumes_from'
)
for
i
in
containers
:
self
.
client
.
start
(
i
[
'Id'
],
**
params
)
self
.
increment_counter
(
'started'
)
...
...
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