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
902c7a76
Kaydet (Commit)
902c7a76
authored
Agu 24, 2016
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Docs and tests for pids_limit.
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
bf2235bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
hostconfig.md
docs/hostconfig.md
+5
-3
utils_test.py
tests/unit/utils_test.py
+9
-0
No files found.
docs/hostconfig.md
Dosyayı görüntüle @
902c7a76
...
...
@@ -111,11 +111,12 @@ for example:
CPU period.
*
cpu_shares (int): CPU shares (relative weight)
*
cpuset_cpus (str): CPUs in which to allow execution (0-3, 0,1)
*
blkio_weight: Block IO weight (relative weight), accepts a weight value between 10 and 1000.
*
blkio_weight: Block IO weight (relative weight), accepts a weight value
between 10 and 1000.
*
blkio_weight_device: Block IO weight (relative device weight) in the form of:
`[{"Path": "device_path", "Weight": weight}]`
*
device_read_bps: Limit read rate (bytes per second) from a device in the
form of:
`[{"Path": "device_path", "Rate": rate}]`
*
device_read_bps: Limit read rate (bytes per second) from a device in the
form of:
`[{"Path": "device_path", "Rate": rate}]`
*
device_write_bps: Limit write rate (bytes per second) from a device.
*
device_read_iops: Limit read rate (IO per second) from a device.
*
device_write_iops: Limit write rate (IO per second) from a device.
...
...
@@ -128,6 +129,7 @@ for example:
*
sysctls (dict): Kernel parameters to set in the container.
*
userns_mode (str): Sets the user namespace mode for the container when user
namespace remapping option is enabled. Supported values are:
`host`
*
pids_limit (int): Tune a container’s pids limit. Set -1 for unlimited.
**Returns**
(dict) HostConfig dictionary
...
...
tests/unit/utils_test.py
Dosyayı görüntüle @
902c7a76
...
...
@@ -185,6 +185,15 @@ class HostConfigTest(base.BaseTestCase):
InvalidVersion
,
lambda
:
create_host_config
(
version
=
'1.20'
,
kernel_memory
=
67108864
))
def
test_create_host_config_with_pids_limit
(
self
):
config
=
create_host_config
(
version
=
'1.23'
,
pids_limit
=
1024
)
self
.
assertEqual
(
config
.
get
(
'PidsLimit'
),
1024
)
with
pytest
.
raises
(
InvalidVersion
):
create_host_config
(
version
=
'1.22'
,
pids_limit
=
1024
)
with
pytest
.
raises
(
TypeError
):
create_host_config
(
version
=
'1.22'
,
pids_limit
=
'1024'
)
class
UlimitTest
(
base
.
BaseTestCase
):
def
test_create_host_config_dict_ulimit
(
self
):
...
...
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