from notario.validators import types
from notario.decorators import optional


def list_of_hosts(value):
    assert isinstance(value, list), "requires format: ['host1', 'host2']"


install_schema = (
    (optional("adjust-repos"), types.boolean),
    (optional("gpg-url"), types.string),
    ("hosts", list_of_hosts),
    (optional("release"), types.string),
    (optional("repo-only"), types.boolean),
    (optional("repo-url"), types.string),
)

@@ -202,245 +202,79 @@
    (
-optional(%22adjust-repos%22), types.boolean),%0A    (optional(%22gpg-url%22), types.string),%0A    (%22hosts%22, list_of_hosts),%0A    (optional(%22release%22), types.string),%0A    (optional(%22repo-only%22), types.boolean),%0A    (optional(%22repo-url%22), types.string
+%22hosts%22, list_of_hosts),%0A    (optional(%22redhat_storage%22), types.boolean
 ),%0A)

remove unsupported fields from the install schema; adds redhat_storage