Adapt regex validation to allow docker images from other registries (#608)

* Adapt regex validation to allow images from other registries than dockerhub

Issue #564

* Update validate.py
This commit is contained in:
Simon Holzmayer 2018-07-30 12:34:42 +02:00 committed by Pascal Vizeli
parent a0fb91af29
commit 2c17fe5da8

View File

@ -129,7 +129,8 @@ SCHEMA_ADDON_CONFIG = vol.Schema({
vol.Coerce(str): vol.Any(SCHEMA_ELEMENT, [SCHEMA_ELEMENT])
}))
}), False),
vol.Optional(ATTR_IMAGE): vol.Match(r"^[\w{}]+/[\-\w{}]+$"),
vol.Optional(ATTR_IMAGE):
vol.Match(r"^([a-zA-Z.:\d{}]+/)*?([\w{}]+)/([\-\w{}]+)$"),
vol.Optional(ATTR_TIMEOUT, default=10):
vol.All(vol.Coerce(int), vol.Range(min=10, max=120)),
}, extra=vol.REMOVE_EXTRA)