* Support 'overlay2' in docker_storage_driver * Fixed the data type in labels * Improve string process with parsing labels
This commit is contained in:
parent
3dd4b3c8a3
commit
0a8f5aba74
1 changed files with 5 additions and 5 deletions
|
@ -66,7 +66,7 @@ options:
|
||||||
- Image id the cluster will be based on
|
- Image id the cluster will be based on
|
||||||
labels:
|
labels:
|
||||||
description:
|
description:
|
||||||
- One or more key/value pairs
|
- One or more key/value pairs wrapped in string
|
||||||
http_proxy:
|
http_proxy:
|
||||||
description:
|
description:
|
||||||
- Address of a proxy that will receive all HTTP requests and relay them
|
- Address of a proxy that will receive all HTTP requests and relay them
|
||||||
|
@ -189,9 +189,9 @@ cluster_template:
|
||||||
type: str
|
type: str
|
||||||
sample: 05567ec6-85f5-44cb-bd63-242a8e7f0e9d
|
sample: 05567ec6-85f5-44cb-bd63-242a8e7f0e9d
|
||||||
labels:
|
labels:
|
||||||
description: One or more key/value pairs
|
description: One or more key/value pairs wrapped in string
|
||||||
type: dict
|
type: str
|
||||||
sample: {'key1': 'value1', 'key2': 'value2'}
|
sample: 'key1=value1, key2=value2'
|
||||||
http_proxy:
|
http_proxy:
|
||||||
description:
|
description:
|
||||||
- Address of a proxy that will receive all HTTP requests and relay them
|
- Address of a proxy that will receive all HTTP requests and relay them
|
||||||
|
@ -277,7 +277,7 @@ def _parse_labels(labels):
|
||||||
labels_dict = {}
|
labels_dict = {}
|
||||||
for kv_str in labels.split(","):
|
for kv_str in labels.split(","):
|
||||||
k, v = kv_str.split("=")
|
k, v = kv_str.split("=")
|
||||||
labels_dict[k] = v
|
labels_dict[k.strip()] = v.strip()
|
||||||
return labels_dict
|
return labels_dict
|
||||||
if not labels:
|
if not labels:
|
||||||
return {}
|
return {}
|
||||||
|
|
Loading…
Reference in a new issue