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
986a14a1
Kaydet (Commit)
986a14a1
authored
Haz 27, 2016
tarafından
Joffrey F
Kaydeden (comit)
GitHub
Haz 27, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #1108 from docker/1107-link-local-ips
Add support for link-local IPs in endpoint config
üst
9010d594
0de366da
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
network.py
docker/api/network.py
+3
-2
utils.py
docker/utils/utils.py
+9
-1
api.md
docs/api.md
+10
-0
networks.md
docs/networks.md
+1
-0
No files found.
docker/api/network.py
Dosyayı görüntüle @
986a14a1
...
...
@@ -60,12 +60,13 @@ class NetworkApiMixin(object):
@minimum_version
(
'1.21'
)
def
connect_container_to_network
(
self
,
container
,
net_id
,
ipv4_address
=
None
,
ipv6_address
=
None
,
aliases
=
None
,
links
=
None
):
aliases
=
None
,
links
=
None
,
link_local_ips
=
None
):
data
=
{
"Container"
:
container
,
"EndpointConfig"
:
self
.
create_endpoint_config
(
aliases
=
aliases
,
links
=
links
,
ipv4_address
=
ipv4_address
,
ipv6_address
=
ipv6_address
ipv6_address
=
ipv6_address
,
link_local_ips
=
link_local_ips
),
}
...
...
docker/utils/utils.py
Dosyayı görüntüle @
986a14a1
...
...
@@ -873,7 +873,8 @@ def create_networking_config(endpoints_config=None):
def
create_endpoint_config
(
version
,
aliases
=
None
,
links
=
None
,
ipv4_address
=
None
,
ipv6_address
=
None
):
ipv4_address
=
None
,
ipv6_address
=
None
,
link_local_ips
=
None
):
if
version_lt
(
version
,
'1.22'
):
raise
errors
.
InvalidVersion
(
'Endpoint config is not supported for API version < 1.22'
...
...
@@ -896,6 +897,13 @@ def create_endpoint_config(version, aliases=None, links=None,
if
ipam_config
:
endpoint_config
[
'IPAMConfig'
]
=
ipam_config
if
link_local_ips
is
not
None
:
if
version_lt
(
version
,
'1.24'
):
raise
errors
.
InvalidVersion
(
'link_local_ips is not supported for API version < 1.24'
)
endpoint_config
[
'LinkLocalIPs'
]
=
link_local_ips
return
endpoint_config
...
...
docs/api.md
Dosyayı görüntüle @
986a14a1
...
...
@@ -179,6 +179,16 @@ Connect a container to a network.
*
container (str): container-id/name to be connected to the network
*
net_id (str): network id
*
aliases (list): A list of aliases for this endpoint. Names in that list can
be used within the network to reach the container. Defaults to
`None`
.
*
links (list): A list of links for this endpoint. Containers declared in this
list will be
[
linked
](
https://docs.docker.com/engine/userguide/networking/work-with-networks/#linking-containers-in-user-defined-networks
)
to this container. Defaults to
`None`
.
*
ipv4_address (str): The IP address of this container on the network,
using the IPv4 protocol. Defaults to
`None`
.
*
ipv6_address (str): The IP address of this container on the network,
using the IPv6 protocol. Defaults to
`None`
.
*
link_local_ips (list): A list of link-local (IPv4/IPv6) addresses.
## copy
Identical to the
`docker cp`
command. Get files/folders from the container.
...
...
docs/networks.md
Dosyayı görüntüle @
986a14a1
...
...
@@ -107,6 +107,7 @@ Create an endpoint config dictionary to be used with
using the IPv4 protocol. Defaults to
`None`
.
*
ipv6_address (str): The IP address of this container on the network,
using the IPv6 protocol. Defaults to
`None`
.
*
link_local_ips (list): A list of link-local (IPv4/IPv6) addresses.
**Returns**
An endpoint config dictionary.
...
...
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