add support for creating volume and network with label definition

Signed-off-by: dbdd <wangtong2712@gmail.com>
This commit is contained in:
dbdd 2016-09-27 11:02:56 +08:00
commit bdcce13f4a
9 changed files with 211 additions and 5 deletions

View file

@ -361,6 +361,9 @@ def load_mapping(config_files, get_func, entity_type):
config['driver_opts']
)
if 'labels' in config:
config['labels'] = parse_labels(config['labels'])
return mapping

View file

@ -246,7 +246,8 @@
"name": {"type": "string"}
},
"additionalProperties": false
}
},
"labels": {"$ref": "#/definitions/list_or_dict"}
},
"additionalProperties": false
},
@ -268,6 +269,7 @@
"name": {"type": "string"}
}
},
"labels": {"$ref": "#/definitions/list_or_dict"},
"additionalProperties": false
},
"additionalProperties": false