Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
docker-py
Commits
3ac73a28
Kaydet (Commit)
3ac73a28
authored
Eki 01, 2016
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix endpoint spec and networks params in update_service
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
be2ae8df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
service.py
docker/api/service.py
+13
-4
services.md
docs/services.md
+1
-1
No files found.
docker/api/service.py
Dosyayı görüntüle @
3ac73a28
...
...
@@ -83,7 +83,16 @@ class ServiceApiMixin(object):
@utils.check_resource
def
update_service
(
self
,
service
,
version
,
task_template
=
None
,
name
=
None
,
labels
=
None
,
mode
=
None
,
update_config
=
None
,
networks
=
None
,
endpoint_config
=
None
):
networks
=
None
,
endpoint_config
=
None
,
endpoint_spec
=
None
):
if
endpoint_config
is
not
None
:
warnings
.
warn
(
'endpoint_config has been renamed to endpoint_spec.'
,
DeprecationWarning
)
endpoint_spec
=
endpoint_config
url
=
self
.
_url
(
'/services/{0}/update'
,
service
)
data
=
{}
headers
=
{}
...
...
@@ -104,9 +113,9 @@ class ServiceApiMixin(object):
if
update_config
is
not
None
:
data
[
'UpdateConfig'
]
=
update_config
if
networks
is
not
None
:
data
[
'Networks'
]
=
networks
if
endpoint_
config
is
not
None
:
data
[
'Endpoint
'
]
=
endpoint_config
data
[
'Networks'
]
=
utils
.
convert_service_networks
(
networks
)
if
endpoint_
spec
is
not
None
:
data
[
'Endpoint
Spec'
]
=
endpoint_spec
resp
=
self
.
_post_json
(
url
,
data
=
data
,
params
=
{
'version'
:
version
},
headers
=
headers
...
...
docs/services.md
Dosyayı görüntüle @
3ac73a28
...
...
@@ -137,7 +137,7 @@ Update a service.
See the
[
UpdateConfig class
](
#UpdateConfig
)
for details. Default:
`None`
.
*
networks (list): List of network names or IDs to attach the service to.
Default:
`None`
.
*
endpoint_
config
(dict): Properties that can be configured to access and load
*
endpoint_
spec
(dict): Properties that can be configured to access and load
balance a service. Default:
`None`
.
**Returns:**
`True`
if successful. Raises an
`APIError`
otherwise.
...
...
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